spitfire
spitfire

Reputation: 78

Django React js: ConnectionAbortedError: [WinError 10053] An established connection was aborted by the software in your host machine

I'm creating a web app using React in the frontend and Django in the backend. I used this blog to integrate react with backend. However I get a strange error called

ConnectionAbortedError: [WinError 10053] An established connection was aborted by the software in your host machine

I searched the internet a lot found this question, did what the answer says but the problem persists. I don't think the database has something to do with my issue, because the pure django pages work fine but only react powered page throw this error. I found a question that is closest to mine, this one, but the question is unanswered, and apparently the problem is with loading some media page, but I just want to load <h1>Hello World!</h1>. Here's full traceback

Traceback (most recent call last):
  File "c:\users\ilqar\appdata\local\programs\python\python38-32\lib\socketserver.py", line 650, in process_request_thread
    self.finish_request(request, client_address)
  File "c:\users\ilqar\appdata\local\programs\python\python38-32\lib\socketserver.py", line 360, in finish_request
    self.RequestHandlerClass(request, client_address, self)
  File "c:\users\ilqar\appdata\local\programs\python\python38-32\lib\socketserver.py", line 720, in __init__
    self.handle()
  File "C:\Users\Ilqar\.virtualenvs\django-react-reddit-XsnOy92e\lib\site-packages\django\core\servers\basehttp.py", line 174, in handle
    self.handle_one_request()
  File "C:\Users\Ilqar\.virtualenvs\django-react-reddit-XsnOy92e\lib\site-packages\django\core\servers\basehttp.py", line 182, in handle_one_request        
    self.raw_requestline = self.rfile.readline(65537)
  File "c:\users\ilqar\appdata\local\programs\python\python38-32\lib\socket.py", line 669, in readinto
    return self._sock.recv_into(b)
ConnectionAbortedError: [WinError 10053] An established connection was aborted by the software in your host machine

By the way, I did not include the code because it is exactly the same as in that blog.(except models and stuff, I don't do any api calls or something just Hello World!.

And I also tried to turn off firewall and try, but the result was the same, error is persisting.

I have debug_toolbar in my INSTALLED_APPS so it shows in the every page. Strangely only React side of page is not rendered, all the others, including debug toolbar, page title and stuff is there. So what can I do about this?

Thanks in advance.

Upvotes: 1

Views: 358

Answers (1)

amsousa
amsousa

Reputation: 66

I had a similar problem, and putting the event.preventDefault(); in the submit event; I had no more problems

Upvotes: 1

Related Questions