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.

Request was aborted before response was completed - Python 3

See original GitHub issue

My ReactJs application successfully consumes a python 2 / flask with flask-cors web services app.

After migrating the application to python 3, the first endpoint returns successfully but the subsequent calls to a second endpoint are aborted before the response is completed.

The service is responding 200 on the web services side, but the browser aborts the request. Again, the same app works just fine in Python 2.

I have tried all combinations, even the obe below. I am one week trying to solve this but am really frustrated right now…

Any suggestions?

Thanks,

Eduardo

CORS(app,
     supports_credentials=True,
     allow_headers="*",
     expose_headers="*",
     always_send=True,
     resources={r"/api/*": {"origins": "*",
                            "allow_headers": "*",
                            "expose_headers": "*",
                            "supports_credentials": True,
                            "always_send": True
                            }})

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
eduardoroliveiracommented, Jun 5, 2021

Nevermind! Found the problem was nonrelated. The structure of the JWT changed and because that my application keep invalidating the call and retrying, so keep sending a new call aborting the web services calls…

Thanks for your help anyway!

Have a great weekend!

0reactions
corydolphincommented, Jun 5, 2021

Glad to hear it! One request: is there anything you would change in the documentation to help a future version of yourself figure this out more easily?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Python Requests getting ('Connection aborted ...
The error you get indicates the host isn't responding in the expected manner. In this case, it's because it detects that you're trying...
Read more >
Issue 41345: Remote end closed connection without response
Issue is that from time to time i'm getting exception from python when sending request to server which has http keepalive option turned...
Read more >
urllib3.exceptions.ProtocolError: ('Connection aborted ...
When i try to use findByElementById method, the element was found but error happens "urllib3.exceptions.ProtocolError: ('Connection aborted.', ...
Read more >
response.close() - Python requests - GeeksforGeeks
Check that Connection closed at the start of the output, which means the response.close() has been successfully executed. Advanced Concepts.
Read more >
XMLHttpRequest - Web APIs | MDN
Chrome Edge XMLHttpRequest Full support. Chrome1. Toggle history Full support. Edge12... XMLHttpRequest() constructor Full support. Chrome1. Toggle history Full support. Edge12... abort Full support. Chrome1. Toggle...
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