googlearchive / realtime-playground

Google Drive Realtime API Playground helps you to try out the features of the Realtime API
https://realtimeplayground.appspot.com/
Apache License 2.0
241 stars 116 forks source link

401 Token Refresh Error silently causes realtime connection to fail and edits are lost #6

Open ruswerner opened 11 years ago

ruswerner commented 11 years ago

If I open or create a realtime document, make changes, then leave the page open for about an hour I get the following errors on the console:

GET https://drive.google.com/otservice/bind?id=1foZRE7k3IRUxWnQaOHDrsN_OfSi3gjs…RID=rpc&SID=FFE129C546C61272&CI=0&AID=201&TYPE=xmlhttp&zx=f2rvegin3z1g&t=1 401 (Unauthorized) api:80
Drive Realtime API Error: token_refresh_required: The OAuth token must be refreshed. api:186

There is no error presented in the UI, or anywhere else. Then if I continue to make changes to the realtime data model they appear to be applied successfully (i.e. no errors and the changes show in the "Event Log" panel on the right). However, when I refresh the page and re-open the document, none of the changes I made after the previously mentioned error (401) occurred were actually saved.

This is a problem since data was silently lost without any indication in the UI. Can the app automatically re-authorize when a 401 occurs and still maintain the realtime connection to the data model? Is there an error/event which indicates when updates to the data model are not actually saved?

eden-lane commented 9 years ago

Got the same error in my app and I have no idea how I can catch it.

johnrivelt commented 7 years ago

+1