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.

CORS Requests failing from v0.41.0 onwards

See original GitHub issue

NWJS Version : 0.41.0 and later Operating System : Windows 10 64bit

I tried updating a project I haven’t worked on in a while to the latest nwjs version. However, requests to my local dev server using window.fetch fail with the following errors visible in the console:

Access to fetch at ‘https://localhost:8080/some/url/’ from origin ‘http://localhost:9090’ has been blocked by CORS policy: Response to preflight request doesn’t pass access control check: No ‘Access-Control-Allow-Origin’ header is present on the requested resource. If an opaque response serves your needs, set the request’s mode to ‘no-cors’ to fetch the resource with CORS disabled.

:8080/some/url/:1 Failed to load resource: net::ERR_FAILED

The maximum version I can use with the requests still working is 0.40.2, with 0.41.0 up to even 0.41.3 it will result in these errors. Did I breaking changes?

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:10 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
rogerwangcommented, Dec 16, 2019

Thanks for the sample. It works in the latest 0.43.0. Looks like it got fixed in that version. Closing for now.

1reaction
WesSouzacommented, Dec 13, 2019

@rogerwang I just stumbled upon this problem.

Here’s a reproduction setup with both 0.40.1 and 0.41.0: https://github.com/WesSouza/nwjs-7182-cors-sample

Let me know if this is clear enough and helpful.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Reason: CORS request did not succeed - HTTP | MDN
The HTTP request which makes use of CORS failed because the HTTP connection failed at either the network or protocol level. The error...
Read more >
CORS errors and how to solve them - Topcoder
Open a network tab in your console. In the response header look for the Access-Control-Allow-Origin header. If it does not exist then add...
Read more >
CHANGES.md · 2d295a4be92894d18d71512548db8629a3ed4b50 ...
(#11446); Fix an LruCache corruption bug, introduced in Synapse 1.38.0, that would cause certain requests to fail until the next Synapse restart.
Read more >
docker Cookbook - Chef Supermarket
It exists to help run newer Docker versions from 1.11.0 onwards. ... String | nil; api_cors_header - Set CORS headers in the remote...
Read more >
https://es.tldp.org/mirror/OpenBSD/Changelogs/Chan...
We must keep them around during the 7.0 cycle, but 7.1 onwards will not require ... distinfo modules.inc Log message: Update to v0.46.0...
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