jkomoros / card-web

The web app behind thecompendium.cards
Apache License 2.0
46 stars 8 forks source link

Opening a second instance of a card-web silently fails #668

Open jkomoros opened 9 months ago

jkomoros commented 9 months ago

Ever since we switched to the new longPolling with the provisional fix in #665, it introduced a subtle bug.

If you try to open a second tab (instance) of a card web (which can happen if you have a tab you forgot about) then the second instance fails to load with a "No such card" loading indicator. If you inspect hte console it's firebase complaining about a second instance existing.

We should at the very least handle that error gracefully with a user visbile message (maybe even if it's possible, closing that tab and focusing the other one by rendevouzing in the service worker). But ideally we just skip this problem in the first place.

jkomoros commented 8 months ago

The originally broke due to fix in #659