Embedded viewer with Anonymous User


I am trying to use the embedded viewer in a website where the users of the viewer might not have a Speckle account or be logged in to Speckle. I have enabled Link Sharing on the Stream and embedded it into my website, but as soon as I open up the website in incognito I get an error in the GraphQL websocket stream “You need a token to subscribe” and there is no geometry that loads in. I can see the preview image but the stream won’t load.



Are you using Brave browser?

“Shields up” will block permissions required by the embedded viewer.

1 Like

Hey, just tested down here in chrome and firefox, and couldn’t reproduce. Send us your browser & OS details (last resort, the stream as well!)

PS: does this example work for you?

It does work great here in Safari.
On my M1 Mini with latest macOS Ventura Public Beta


If I launch the viewer when I am logged into the speckle systems it works, but if I copy paste the thread url and launch it in incognito without logging in prior then I get the error

Thanks for getting back to me.

I am using Firefox, but I have been able to reproduce with Chrome as well.

Just making sure, those that have said it works did you test in private/incognito mode and didn’t login first?

I think the problem is here: speckle-server/app.ts at 4d01e13a8463509301c86e7ded2b2172f17d27ac · specklesystems/speckle-server · GitHub the server is trying to resolve the user’s token for a websocket connection but they might not have one. I would assume if I enable “Linking Sharing” then an anonymous user should be able to view the stream?

Here is the display of one of the graphql connections, you can see that on the connection_init the payload is empty and getting an error in return.


Are you able to share the specific commit/stream? I know it doesn’t sound like it should make a difference, but so we can all be working to a common reference.

What you describe should definitely work for a non-logged-in user if link sharing is on. It also works in an incognito/private cacheless browser session.

I believe I should be able to just paste the iframe here right?

Okay, so i have a hunch this is a self-goal induced by incognito mode. We should be handling the subscriptions gracefully, so if there’s no user present things don’t crash and burn - we simply do not subscribe to the events.

The important error is:

Which leads me to remembering that browsers block access to indexdb (the viewer’s cache) in incognito mode, and that’s why stuff isn’t loading.

Nevertheless, a normal user, not signed into speckle, should not have this problem. Just tested this by signing out from xyz and loading your iframe:

Note, this didn’t work in incognito mode.

TL;DR: Only we (the developers) have this problem, the users won’t (as long as they don’t use incognito/private tabs) :sweat_smile:

1 Like

Makes a lot of sense, thanks so much for following up with that and providing details.