FAQ: Why am I getting a 502 error in the Web Viewer?

QUESTION: We use authentication provided by hosting services such as Firebase and also Microsoft Azure. When using such authentication, we get the message “Websocket connection failed” – so basically a 502 gateway error. What’s going on here? Note, if we use authentication directly – that is, without Firebase or Azure – there is no such error and the model loads as expected in the Web Viewer.

The failure to properly connect could be due to the size of the cookies. More specifically, the cookie size is too big. To check the size of all cookies in Chrome, open the Developer Console by pressing F12 and do the following:

  1. Navigate to the Application tab
  2. Expand the Cookies section
  3. Check the size of the cookie for the application in question

To support modern browsers, cookies should be less than 4K bytes.

Now, as a quick test, decrease the size of the cookie by manually changing the value field to see if that resolves the 502 error:


Once the value has been changed, refresh the webpage (F5).