dilanx / flutter-codespaces

Use Flutter on GitHub Codespaces
93 stars 54 forks source link

CORS Error. #6

Open sheng-di opened 8 months ago

sheng-di commented 8 months ago
supreme-broccoli-jrr495p4qfpj59-3000.app.github.dev/:1 Access to manifest at 'https://github.dev/pf-signin?id=neat-plane-hqb5zbh&cluster=asse&name=supreme-broccoli-jrr495p4qfpj59&port=3000&pb=https%3A%2F%2Fsupreme-broccoli-jrr495p4qfpj59-3000.app.github.dev%2Fauth%2Fpostback%2Ftunnel%3Frd%3D%252Fmanifest.json%26tunnel%3D1' (redirected from 'https://supreme-broccoli-jrr495p4qfpj59-3000.app.github.dev/manifest.json') from origin 'https://supreme-broccoli-jrr495p4qfpj59-3000.app.github.dev' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
github.dev/pf-signin?id=neat-plane-hqb5zbh&cluster=asse&name=supreme-broccoli-jrr495p4qfpj59&port=3000&pb=https%3A%2F%2Fsupreme-broccoli-jrr495p4qfpj59-3000.app.github.dev%2Fauth%2Fpostback%2Ftunnel%3Frd%3D%252Fmanifest.json%26tunnel%3D1:1 

       Failed to load resource: net::ERR_FAILED
supreme-broccoli-jrr495p4qfpj59-3000.app.github.dev/:1 Access to internal resource at 'https://github.dev/pf-signin?id=neat-plane-hqb5zbh&cluster=asse&name=supreme-broccoli-jrr495p4qfpj59&port=3000&pb=https%3A%2F%2Fsupreme-broccoli-jrr495p4qfpj59-3000.app.github.dev%2Fauth%2Fpostback%2Ftunnel%3Frd%3D%252Fmanifest.json%26tunnel%3D1' (redirected from 'https://supreme-broccoli-jrr495p4qfpj59-3000.app.github.dev/manifest.json') from origin 'https://supreme-broccoli-jrr495p4qfpj59-3000.app.github.dev' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
sheng-di commented 8 months ago

After using following command to start a chrome instance without CORS checking:

open -n -a /Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --args --disable-web-security --allow-running-insecure-content --user-data-dir="/tmp/chrome_dev"

The following error shows:

Manifest: Line: 1, column: 1, Syntax error.

manifest.json content:

<!doctype html><html lang="en"><head><meta charset="UTF-8"/><meta name="authUrl" content="https://github.com/codespaces/auth/supreme-broccoli-jrr495p4qfpj59"/><meta name="correlationId" content="7acba00d-e523-4b20-8bc8-5fac3b208cb3"/><meta name="iKey" content="f772ffaa012e4fc6bb0a245dd176fc6c-ca6358be-0b85-4e74-ade1-c7857dd7d8c9-7394"/><link id="js-favicon" rel="shortcut icon" href="https://github.githubassets.com/favicon.ico"/><script defer="defer" src="/static/commons-app~bootstrap~pfHelper-bn.js.934018f1c72f29efc040.js"></script><script defer="defer" src="/static/commons-app~bootstrap~pfHelper-index.js.720e8ed0a686a03f8379.js"></script><script defer="defer" src="/static/commons-app~bootstrap~pfHelper-_stream_readable.js.9597f6e437ffc3eaca99.js"></script><script defer="defer" src="/static/commons-app~bootstrap~pfHelper-_stream_writable.js.1c81b0940bc879574af0.js"></script><script defer="defer" src="/static/commons-app~bootstrap~pfHelper-source-map-consumer.js.216c951187d5a778b7cd.js"></script><script defer="defer" src="/static/commons-app~bootstrap~pfHelper-main.js.8391bc1e0c46c9d4b944.js"></script><script defer="defer" src="/static/commons-app~bootstrap~pfHelper-secp256k1.js.ec08957dbf4618d00700.js"></script><script defer="defer" src="/static/commons-app~bootstrap~pfHelper-browser.js.8cc84f19667d165a43b6.js"></script><script defer="defer" src="/static/commons-app~bootstrap~pfHelper-short.js.099d976ab674df52e32a.js"></script><script defer="defer" src="/static/commons-app~bootstrap~pfHelper-ast.js.ae375b0de8e8f39f1f22.js"></script><script defer="defer" src="/static/commons-app~bootstrap~pfHelper-source-map-support.js.b894d23e06f770790687.js"></script><script defer="defer" src="/static/commons-app~pfHelper-moment.js.2219b85bb0cf5293f376.js"></script><script defer="defer" src="/static/commons-app~pfHelper-HttpManager.js.5254ed0a698fdcccc447.js"></script><script defer="defer" src="/static/commons-app~pfHelper-PostChannel.js.53595609fe09dac36fc3.js"></script><script defer="defer" src="/static/commons-app~pfHelper-dynamicproto-js.js.819b3e68f4ef6ba24964.js"></script><script defer="defer" src="/static/commons-app~pfHelper-BaseCore.js.7bffb053b234d15329f3.js"></script><script defer="defer" src="/static/commons-app~pfHelper-HelperFuncs.js.103dae03006e8f1731a8.js"></script><script defer="defer" src="/static/commons-app~pfHelper-EventHelpers.js.1e553a203cb083b0529f.js"></script><script defer="defer" src="/static/commons-app~pfHelper-ProcessTelemetryContext.js.47b66726377975287258.js"></script><script defer="defer" src="/static/commons-app~pfHelper-Utils.js.3f0be0d6723595fe04c3.js"></script><script defer="defer" src="/static/371.a061e5ce422731d05401.js"></script><script defer="defer" src="/static/779.6dcb34ef20b545337173.js"></script><script defer="defer" src="/static/351.be67b8db556492a3720f.js"></script><script defer="defer" src="/static/211.ade8fb2c66a8e5f372a3.js"></script><script defer="defer" src="/static/pfHelper.64a62adb4d8ab2633942.js"></script></head><body style="text-align:center"><div class="github-icon" style="margin-top:6rem"><svg id="circle" viewBox="0 0 16 16" fill="none" style="box-sizing:content-box;color:var(--color-icon-primary)" width="64" height="64"><circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke"/><path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke"></path></svg></div><div class="body" style="font-size:1rem;font-weight:700;text-align:center;font-family:-apple-system,BlinkMacSystemFont,sans-serif;margin-top:2rem"><p id="text" class="vsonline-port-forwarding__status">Connecting to the forwarded port...</p><form method="POST" id="tokenForm"><input type="hidden" id="cascadeToken" name="cascadeToken"/> <input type="hidden" id="featureFlags" name="featureFlags"/> <input type="hidden" id="accessToken" name="accessToken"/> <input type="hidden" id="accessToken" name="accessToken"/> <input type="checkbox" id="skipAntiPhishing" name="skipAntiPhishing" style="display:none"/></form></div></body></html>
hairy-tortoise commented 6 months ago

I have the same error. Did you find some kind of solution?

WingCH commented 5 months ago

use ./run.sh