Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

请问无法打开游戏该如何解决 #1

Closed
totpil opened this issue Jan 25, 2021 · 7 comments
Closed

请问无法打开游戏该如何解决 #1

totpil opened this issue Jan 25, 2021 · 7 comments

Comments

@totpil
Copy link

totpil commented Jan 25, 2021

Access to XMLHttpRequest at 'file:///D:/bigwaterlemon-main/res/import/07/079499991.json' from origin 'null' has been blocked by CORS policy: Cross origin requests are only supported for protocol schemes: http, data, chrome, chrome-extension, chrome-untrusted, https.
Failed to load resource: net::ERR_FAILED
Access to XMLHttpRequest at 'file:///D:/bigwaterlemon-main/res/import/07/07ce7530a.json' from origin 'null' has been blocked by CORS policy: Cross origin requests are only supported for protocol schemes: http, data, chrome, chrome-extension, chrome-untrusted, https.
cocos2d-js-min.js:6382 Error 4916, please go to https://github.com/cocos-creator/engine/blob/master/EngineErrorMap.md#4916 to see details. Arguments: 6dkeWRTOBGXICfYQ7JUBnG

请问进度条卡100%,chrome控制台报错,该如何解决

@HarbinBear
Copy link

同问

1 similar comment
@gj009351
Copy link

同问

@sunjiesama
Copy link

Access to XMLHttpRequest at 'file:///D:/bigwaterlemon-main/res/import/07/079499991.json' from origin 'null' has been blocked by CORS policy: Cross origin requests are only supported for protocol schemes: http, data, chrome, chrome-extension, chrome-untrusted, https.
Failed to load resource: net::ERR_FAILED
Access to XMLHttpRequest at 'file:///D:/bigwaterlemon-main/res/import/07/07ce7530a.json' from origin 'null' has been blocked by CORS policy: Cross origin requests are only supported for protocol schemes: http, data, chrome, chrome-extension, chrome-untrusted, https.
cocos2d-js-min.js:6382 Error 4916, please go to https://github.com/cocos-creator/engine/blob/master/EngineErrorMap.md#4916 to see details. Arguments: 6dkeWRTOBGXICfYQ7JUBnG

请问进度条卡100%,chrome控制台报错,该如何解决
json跨域了,live server 端口协议打开就可以了,

@bxz123
Copy link

bxz123 commented Jan 26, 2021

用手机怎么打开?

@bullhe4d
Copy link
Owner

bullhe4d commented Jan 26, 2021

用手机怎么打开?

手机的话需要上传到web服务器上。可以用公有云的对象存储。

@bxz123
Copy link

bxz123 commented Jan 26, 2021

上传到服务器上了,但是他还是因为跨域卡100%,这样怎么解决啊

@bullhe4d
Copy link
Owner

上传到服务器上了,但是他还是因为跨域卡100%,这样怎么解决啊

project.js 1407行 url换成自己的域名,注释去掉。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants