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

Can't connect to cloud in desktop build 71, same issue as in 69 #2408

Closed
alastajj opened this issue Dec 6, 2018 · 12 comments
Closed

Can't connect to cloud in desktop build 71, same issue as in 69 #2408

alastajj opened this issue Dec 6, 2018 · 12 comments

Comments

@alastajj
Copy link

alastajj commented Dec 6, 2018

See my comment from here #2029, identical issue

@alastajj alastajj changed the title Can't connect to cloud google drive in desktop build 71 Can't connect to cloud in desktop build 71, same issue as in 69 Dec 6, 2018
@bilgekaan
Copy link

Same here. I can't log in to Google Drive. I get "Failed to refresh file list" error.

Dropbox is working.

@shortercode
Copy link

Could be CORB related again, any changes to that magic flag @AshleyScirra ?

@AshleyScirra
Copy link
Member

Yeah I suspect so - it sucks that we have to rely on a flag, Google specifically say those can't be relied upon, so it seems likely they changed some detail about the flag. It's a shame we can't find a real solution, even if we update the flag it could be changed again, so this is very brittle...

@shortercode
Copy link

I'm not really sure why CORB is being triggered in this situation and not in the browser. I wonder if Google has some magic whitelist in place that is only in Chrome, not Chromium which is allowing their APIs to work correctly.

I don't think I found any other workaround related to this when I looked at it last time.

@AshleyScirra
Copy link
Member

Looking at the comments from #2029, I'd guess Google Drive is doing some kind of user agent sniffing, fails to recognise the NW.js user agent, falls through some kind of browser check, sends the wrong MIME type, and then fails CORB.

Here's the UA for the latest desktop build:

Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (@ac9418ba9c3bd7f6baaffa0b055dfe147e0f8364) NWjs/0.35.0 (like Chrome/71.0.3578.80)

And for actual Chrome 71:

Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.80 Safari/537.36

Maybe if we make NW.js' user agent more like Chrome's we'll get away with it.

@AshleyScirra
Copy link
Member

Nope, still fails to load even with the identical UA that Chrome 71 uses. Also I can see it's making Google API calls which respond 200 OK, and have a content-type: application/json; charset=UTF-8 which looks correct, so I guess it's something else specific to CORB in NW.js...

@shortercode
Copy link

I don't think that content-type is correct, according to their explainer it must be "text/json", "application/json", or any MIME type whose subtype ends in "+json"

So it could be they don't understand the charset value

@AshleyScirra
Copy link
Member

So after some more investigation, yes, the flag was changed - it was removed entirely! (Serves us right for using a band-aid solution...) So now we have no way to disable CORB in NW.js other than disabling the same-origin security policy entirely, which seems dangerous.

It's not clear why NW.js only is affected by CORB. Maybe they made a change that affects it. I filed an NW.js issue here to see if they can help: nwjs/nw.js#6889

If we cannot find any resolution from there, our only recourse would be --disable-web-security...

@AshleyScirra
Copy link
Member

NW.js fixed the issue quickly which is great. The latest desktop download should be working now: https://www.construct.net/en/forum/construct-3/general-discussion-7/construct-3-desktop-build-beta-131317 - can someone confirm the fix is working?

@alastajj
Copy link
Author

Fixed, thanks!

@bilgekaan
Copy link

It works, thank you!

@AshleyScirra
Copy link
Member

Thanks for confirming!

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

No branches or pull requests

4 participants