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

Random disconnects when running webapp locally #306

Closed
dschoepe opened this issue Oct 12, 2016 · 2 comments
Closed

Random disconnects when running webapp locally #306

dschoepe opened this issue Oct 12, 2016 · 2 comments

Comments

@dschoepe
Copy link

After running the webapp using grunt and logging in, the session will disconnect after some minutes of inactivity of the client with the message "Trying to connect. Wire may not be able to deliver messages". Incoming messages are still received, but it is no longer possible to send messages. The webapp does not manage to reconnect without logging in again.

(Only tested on the prod branch.)

@gregor
Copy link
Contributor

gregor commented Oct 12, 2016

This is due to CORS limitations. Running the webapp locally we will not be able to refresh the access token. The backend expects the request to originate from certain domains that are whitelisted. As of now the backend is not open sourced and we have no means to change this whitelist for security reasons. We need do that roughly every 14 minutes. As this fails. we try to log you out. One of the few other calls that are limited by CORS. Thus you get stuck in this reconnecting state. Currently nothing we can avoid.

But you can always start the Chrome browser with the --disable-web-security flag. Depending on the Chrome version and platform you are on you might also have to set a separate --user-data-dir="C:\ChromeProfile" folder for the profile to be used. This will ignore the CORS check and we can properly refresh the access token. (or log you out or register an account for that matter)

@dschoepe
Copy link
Author

I can confirm that running Chrom(e|ium) with --disable-web-security and a different data directory fixes the issue.

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

2 participants