Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
API calls on cached page before websocket handshake causes 401/403s, UI breaks #1364
There's a race condition in the following scenario:
If settings request now arrives at server before the initial websocket handshake can cause the UI API Key to be updated, the settings request responds with a 401 and the viewmodels are consequently never bound in the initial application startup.
Looks like this on the JS console:
To reproduce for debugging:
Make sure settings GET is only run AFTER initial handshake with server has completed and ensured a valid UI API Key. Same also holds true for the