question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

aiohttp.server message="Bad status line 'Invalid method encountered'"

See original GitHub issue

The problem

After upgrade to newest 2022.6.7 i see this error at logs

What version of Home Assistant Core has the issue?

2022.6.7

What was the last working version of Home Assistant Core?

i dont remember

What type of installation are you running?

Home Assistant OS

Integration causing the issue

No response

Link to integration documentation on our website

No response

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

Logger: aiohttp.server
Source: /usr/local/lib/python3.9/site-packages/aiohttp/web_protocol.py:405
First occurred: 03:36:42 (3 occurrences)
Last logged: 08:20:30

Error handling request
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/aiohttp/web_protocol.py", line 334, in data_received
    messages, upgraded, tail = self._request_parser.feed_data(data)
  File "aiohttp/_http_parser.pyx", line 551, in aiohttp._http_parser.HttpParser.feed_data
aiohttp.http_exceptions.BadStatusLine: 400, message="Bad status line 'Invalid method encountered'"

Additional information

No response

Issue Analytics

  • State:open
  • Created a year ago
  • Reactions:2
  • Comments:11

github_iconTop GitHub Comments

1reaction
m-reinercommented, Nov 22, 2022

Same issue here, any updates on this?

I have a feeling it relates back to Nginx, which I’m using to reverse-proxy to my HA instance. I don’t have any issues (I don’t think) from the app on iOS, but when using Firefox on my laptop it can take ages to load HA through the reverse proxy and I see the same errors others are reporting…

0reactions
GarnetSunsetcommented, Jan 2, 2023

Same issue here for me!

Logger: aiohttp.server
Source: /usr/local/lib/python3.10/site-packages/aiohttp/web_protocol.py:405
First occurred: 11:43:34 AM (5 occurrences)
Last logged: 11:44:11 AM

Error handling request
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/aiohttp/web_protocol.py", line 334, in data_received
    messages, upgraded, tail = self._request_parser.feed_data(data)
  File "aiohttp/_http_parser.pyx", line 551, in aiohttp._http_parser.HttpParser.feed_data
aiohttp.http_exceptions.BadStatusLine: 400, message="Bad status line 'Invalid method encountered'"
Read more comments on GitHub >

github_iconTop Results From Across the Web

Log Error 400, message="Bad status line 'invalid HTTP method'"
Hello, I am running the latest Home Assistant installation in a VM using Unraid. I have a SWAG/letsencrypt docker that controls my SSL ......
Read more >
I keep "Bad status line 'invalid HTTP method'" randomly, what ...
This could mean that someone is sending you a method that isn't valid, or maybe that an HTTP request was started and then...
Read more >
Handling incorrect methods in AIOHTTP - Stack Overflow
The actual problem seems to be validating the http request as a proper request. This has to be done outside of aiohttp it...
Read more >
"Bad status line 'Invalid method encountered'"
BadStatusLine: 400, message="Bad status line 'Invalid method encountered'" 2022-08-26 05:13:56.237 ERROR (MainThread) [aiohttp.server] Error ...
Read more >
Web Server Exceptions — aiohttp 4.0.0a2.dev0 documentation
web defines a set of exceptions for every HTTP status code. Each exception is a subclass of HTTPException and relates to a single...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found