mirror of
https://github.com/hoppscotch/hoppscotch.git
synced 2026-04-26 09:16:03 +03:00
[GH-ISSUE #704] Error: Network Error. Check console for details #245
Labels
No labels
CodeDay
a11y
browser limited
bug
bug fix
cli
core
critical
design
desktop
discussion
docker
documentation
duplicate
enterprise
feature
feature
fosshack
future
good first issue
hacktoberfest
help wanted
i18n
invalid
major
minor
need information
need testing
not applicable to hoppscotch
not reproducible
pull-request
question
refactor
resolved
sandbox
self-host
spam
stale
testmu
wip
wont fix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/hoppscotch#245
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @HappinerWinnie on GitHub (Mar 24, 2020).
Original GitHub issue: https://github.com/hoppscotch/hoppscotch/issues/704
Describe the bug
To Reproduce
Steps to reproduce the behavior:
Expected behavior
response OK
Screenshots

Desktop (please complete the following information):
@liyasthomas commented on GitHub (Mar 24, 2020):
If your endpoint is in
localhost, please install official browser extensions to supportlocalhostendpoints and fixCORSerrors.Official extensions
@HappinerWinnie commented on GitHub (Mar 24, 2020):
It's the same effect if I use ip

@liyasthomas commented on GitHub (Mar 24, 2020):
Are you sure the requested endpoint have CROS disabled?
@Slaviusz commented on GitHub (Mar 27, 2020):
Can we reopen this? I have the same issue, with/without the extension. I cannot open any connection to localhost.
@liyasthomas commented on GitHub (Mar 27, 2020):
@AndrewBastin
@Slaviusz commented on GitHub (Mar 27, 2020):
Thanks.
Basically, my symptoms are exactly the same. Trying to call rest API endpoint on localhost results in :
Access to XMLHttpRequest at 'http://127.0.0.1:9000/api/auth/login' from origin 'http://localhost:3000' 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.I tried installing the extension and also including the URL into unsafely-treat-insecure-origin-as-secure origins to no avail.
Thanks for help.
@liyasthomas commented on GitHub (Mar 27, 2020):
Please check these hotfixes:
@Slaviusz commented on GitHub (Mar 27, 2020):
However when I explicitly enabled CORS with Access-Control-Allow-Origin: * everything works now. Is it now enforced that the host MUST enable CORS otherwise the behavior is equal to invalid origin?
Honestly I don't remember such behavior and it is enforced at the application level. When I do plain cURL request everything works just fine. Is maybe one of your dependency packages enforcing this?
@liyasthomas commented on GitHub (Mar 27, 2020):
If that's the case, we'll have to look further into it. Huge thanks for debugging and reporting the issue.
@Slaviusz commented on GitHub (Mar 27, 2020):
You're welcome. Thanks for having a look.
@AndrewBastin commented on GitHub (Mar 27, 2020):
Hi there,
Sorry for the late response, I am really swamped with personal stuff and end of the semester university work.
Due to security concerns of allowing open access to the extension hooks, the Postwoman Extension only hooks into the following domains
What that implies is that, you aren't allowed to access the extension if you are not in the above domains, so your locally hosted Postwoman builds can't access the official browser extension.
If you are using localhost, you will need to make your own build of the extension (more info on that here) with the permissions activated for your localhost page in the manifest.
I would love to make the extension an open system but this is implemented to prevent unauthorized bypassing of CORS by malicious sites that are not Postwoman.
Feel free to ask questions regarding this though, but I am closing this issue as this is an intended safeguard.
Thanks for using Postwoman ❤️
@liuxueyiTest commented on GitHub (Dec 4, 2020):
how to do ?
@liyasthomas commented on GitHub (Dec 4, 2020):
CORSis a security mechanism imposed on API endpoints. Its easily discoverable from the developers side. You can simply try hitting the endpoint from Hoppscotch.io and if there's no issue, and you gotOkay 200response, then it doesn't have CORS. If API response got any error, check console logs to know whether it's due to CORS restrictions. You can fix CORS issues with Hoppscotch Extension.@liuxueyiTest commented on GitHub (Dec 4, 2020):
thank you very much.
Could you tell me how to turn off the cros ?I am is tester。 I would appreciate it if you could give me some advice at your convenience.
------------------ Original ------------------
From: "Liyas Thomas"<notifications@github.com>;
Date: Fri, Dec 4, 2020 06:36 PM
To: "hoppscotch/hoppscotch"<hoppscotch@noreply.github.com>;
Cc: "刘学义"<liuxueyi@xsyxsc.com>; "Comment"<comment@noreply.github.com>;
Subject: Re: [hoppscotch/hoppscotch] Error: Network Error. Check console for details (#704)
Check endpoints don't have CROS restrictions
how to do ?
CORS is a security mechanism imposed on API endpoints. Its easily discoverable from the developers side. You can simple try hitting the endpoint from Hoppscotch.io and if there's no issue, and you got Okay 200 response, then it doesn't have CORS. If API response got any error, check console to know where it's due to CORS restrictions. You can fix CORS issues with Hoppscotch Extension.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or unsubscribe.
@liyasthomas commented on GitHub (Dec 4, 2020):
https://stackoverflow.com/questions/3102819/disable-same-origin-policy-in-chrome
@liuxueyiTest commented on GitHub (Dec 4, 2020):
Thank you very much for your help.Hoppscotch is installed to my local computer, which is the same computer as my browser.According to your information, There is something wrong with my Browser extension.
------------------ Original ------------------
From: "Liyas Thomas"<notifications@github.com>;
Date: Fri, Dec 4, 2020 06:45 PM
To: "hoppscotch/hoppscotch"<hoppscotch@noreply.github.com>;
Cc: "刘学义"<liuxueyi@xsyxsc.com>; "Comment"<comment@noreply.github.com>;
Subject: Re: [hoppscotch/hoppscotch] Error: Network Error. Check console for details (#704)
https://stackoverflow.com/questions/3102819/disable-same-origin-policy-in-chrome
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or unsubscribe.
@liuxueyiTest commented on GitHub (Dec 4, 2020):
Why can't My self-installed server show Extension Version. Could you please tell me where I am wrong? If you are convenient, please guide me.
------------------ Original ------------------
From: "刘学义"<liuxueyi@xsyxsc.com>;
Date: Fri, Dec 4, 2020 07:21 PM
To: "hoppscotch/hoppscotch"<reply@reply.github.com>;
Subject: Re: [hoppscotch/hoppscotch] Error: Network Error. Check console for details (#704)
Thank you very much for your help.Hoppscotch is installed to my local computer, which is the same computer as my browser.According to your information, There is something wrong with my Browser extension.
------------------ Original ------------------
From: "Liyas Thomas"<notifications@github.com>;
Date: Fri, Dec 4, 2020 06:45 PM
To: "hoppscotch/hoppscotch"<hoppscotch@noreply.github.com>;
Cc: "刘学义"<liuxueyi@xsyxsc.com>; "Comment"<comment@noreply.github.com>;
Subject: Re: [hoppscotch/hoppscotch] Error: Network Error. Check console for details (#704)
https://stackoverflow.com/questions/3102819/disable-same-origin-policy-in-chrome
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or unsubscribe.
@liuxueyiTest commented on GitHub (Dec 4, 2020):
如果我访问我本地的自己部署的 hoppscotch 意思我要自己弄个浏览器扩展。