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.

Web page: ERR_EMPTY_RESPONSE

See original GitHub issue

OS: Ubuntu Server 18.04 and Ubuntu 20.04 Python Version: Python 3.8.2 King Phisher Commit: 9b0c5bc7663dc2c22c1a50f75684be3a8a115edc

When using Python3.8 and vhosts set to true, navigating to any site will return an empty response. image

To reproduce: On ubuntu 18.04 you will need to install python 3.8 and set it to default for python3. Ubuntu 20.04 python 3.8 will be installed by default and already set to python3.

Git clone down King Phisher. Then update Pipefile to have package pyproj==2.6.1 or pipenv install pyproj==2.6.1 the other version that would get auto selected by pipenv during the pipenv installation process will fail, due to incompatable wheel. tools/install.sh edit server config to set vhosts to true.

stop and start server, and try to navigate to IP address/domain of the server. Recieve the empty response (image above) and the stack trace below.

----------------------------------------
DEBUG    192.168.146.1:46510 tid: 0x7f819486b700 running http request handler
----------------------------------------
Exception happened during processing of request from ('192.168.146.1', 46510)
Traceback (most recent call last):
  File "/usr/lib/python3.8/socketserver.py", line 650, in process_request_thread
    self.finish_request(request, client_address)
  File "/opt/king-phisher/.venv/lib/python3.8/site-packages/advancedhttpserver.py", line 763, in finish_request
    super(ServerNonThreaded, self).finish_request(request, client_address)
  File "/usr/lib/python3.8/socketserver.py", line 360, in finish_request
    self.RequestHandlerClass(request, client_address, self)
  File "/opt/king-phisher/king_phisher/server/server.py", line 103, in __init__
    super(KingPhisherRequestHandler, self).__init__(request, client_address, server, **kwargs)
  File "/opt/king-phisher/.venv/lib/python3.8/site-packages/advancedhttpserver.py", line 856, in __init__
    self.on_init()
  File "/opt/king-phisher/king_phisher/server/server.py", line 110, in on_init
    for path, handler in self.handler_map.items():
RuntimeError: dictionary keys changed during iteration
----------------------------------------
DEBUG    192.168.146.1:46512 tid: 0x7f819486b700 running http request handler
----------------------------------------
Exception happened during processing of request from ('192.168.146.1', 46512)
Traceback (most recent call last):
  File "/usr/lib/python3.8/socketserver.py", line 650, in process_request_thread
    self.finish_request(request, client_address)
  File "/opt/king-phisher/.venv/lib/python3.8/site-packages/advancedhttpserver.py", line 763, in finish_request
    super(ServerNonThreaded, self).finish_request(request, client_address)
  File "/usr/lib/python3.8/socketserver.py", line 360, in finish_request
    self.RequestHandlerClass(request, client_address, self)
  File "/opt/king-phisher/king_phisher/server/server.py", line 103, in __init__
    super(KingPhisherRequestHandler, self).__init__(request, client_address, server, **kwargs)
  File "/opt/king-phisher/.venv/lib/python3.8/site-packages/advancedhttpserver.py", line 856, in __init__
    self.on_init()
  File "/opt/king-phisher/king_phisher/server/server.py", line 110, in on_init
    for path, handler in self.handler_map.items():
RuntimeError: dictionary keys changed during iteration
----------------------------------------

From the minimal research into this. Dictionary .keys() or .items() return an iterator instead of a list so removing a key during the loop used with one of those functions will cause the iterator to failure to number of keys available, and loose its place.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
zeroSteinercommented, Jul 31, 2020

Pretty confident I got this fixed in 2181ba508d5fa3fc2517cbedc459e536ecc7b22e. Let me know if you’re still running into the issue.

0reactions
wolfthefallencommented, Jul 31, 2020

I can confirm this corrected the issue. You Rock @zeroSteiner

Read more comments on GitHub >

github_iconTop Results From Across the Web

Why do I get ERR_EMPTY_RESPONSE and how do I fix it?
The err_empty_response (err empty response) message can occur when using the Chrome browser and you are trying access a website.
Read more >
How To Fix the "ERR_EMPTY_RESPONSE" Error (5 Potential ...
The ERR_EMPTY_RESPONSE error is a browser-related issue that indicates that the server did not respond to the request to visit a website:.
Read more >
How To Fix Err_empty_response: Try These Simple Tips
It means that the website you're trying to access isn't processing your requests or sending any data. The error ERR EMPTY RESPONSE: The...
Read more >
How to Fix an “Err_empty_response” Error in Google Chrome
When this error occurs, you can't load the website that you're trying to open. This is because Chrome is unable to transmit any...
Read more >
How to Fix ERR_EMPTY_RESPONSE Error on Google Chrome
You may be having the ERR_EMPTY_RESPONSE error because your connection to the website is being interrupted. You should try using a VPN to...
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