Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Token race condition? #647

Closed
kring opened this issue Sep 15, 2021 · 3 comments · Fixed by #654
Closed

Token race condition? #647

kring opened this issue Sep 15, 2021 · 3 comments · Fixed by #654
Labels
bug Something isn't working

Comments

@kring
Copy link
Member

kring commented Sep 15, 2021

Cesium for Unreal seems to (sometimes) use the wrong access token for the assets created through the Cesium ion UI.

I saw this while investigating https://community.cesium.com/t/vricon-3dtilesets-are-not-appearing-in-ue4-scene-editor/15277. I started out logged in to my personal ion account, which doesn't have access to the tilesets mentioned. So I clicked the Sign Out button, then "Connect to Cesium ion", then in the web browser I switched to a different ion account that did have access, hit Authorize, and switched back to Unreal. So far so good.

Then I navigated to a Vricon dataset in the Cesium ion Assets panel and added it and got a 404 error. Weird. I copied down the key that the UI had assigned to the Tileset, and then in the ion web UI I confirmed that this was not the right key for the new account. In fact, it was the key for my personal account that I had just signed out of.

So I signed out again, signed back in, re-added the dataset... and this time it worked fine. In fact, I haven't been able to reproduce the problem since.

Which reminded me that I saw a similar problem awhile ago. In that case, I was adding a new Imagery dataset as a raster overlay, and the UI didn't assign it a token at all (it was just blank). That time, too, just trying again fixed it.

So I'm not sure exactly what's going on here, but it's pretty clear that something is wrong with the token management.

@kring kring added the bug Something isn't working label Sep 15, 2021
@kring kring added this to Needs Triage in Cesium for Unreal via automation Sep 15, 2021
@javagl
Copy link
Contributor

javagl commented Sep 15, 2021

This may be something that will be solved "implicitly" (but should dedicatedly be checked) when #598 is addressed.

@argallegos
Copy link
Contributor

For what it's worth, I'm actually not able to view Vricon datasets in Cesium for Unreal either. Tested with a few different cities, and I'm positive they're using the right token, because I created a token specifically for access to a Vricon dataset and copied it straight in. Always results in errors like:

LogCesium: Error: [2021-09-16 16:48:28.794] [error] [Tileset.cpp:158] Received status code 401 for asset response https://api.cesium.com/v1/assets/97228/endpoint
LogCesium: Loading tileset for asset ID 97228
LogCesium: Loading tileset for asset ID 97228 done
LogCesium: Error: [2021-09-16 16:48:33.080] [error] [Tileset.cpp:158] Received status code 404 for asset response https://api.cesium.com/v1/assets/97228/endpoint?access_token=[token]

I did try signing out and back in.

@kring
Copy link
Member Author

kring commented Sep 17, 2021

@mramato pointed out on Slack that these Vricon datasets are forbidden from use outside of Cesium ion / Cesium Stories, and that ion enforces that. I believe the key mixup issue described here is still a thing, though.

Cesium for Unreal automation moved this from Needs Triage to Done Oct 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Development

Successfully merging a pull request may close this issue.

3 participants