iTwin / viewer-components-react

Components built on iTwin.js for usability in an iTwin.js based Viewer.
MIT License
24 stars 34 forks source link

Error in Spatial tree when the browser tab is inactive for more than 10 minutes #737

Closed muthubentley closed 9 months ago

muthubentley commented 9 months ago

Issue: Error in Spatial tree when the browser tab is inactive for more than 10 minutes. Refer the below screenshot for error description: 画像 (2)

Steps to reproduce: Partner has developed a site with iTwin viewer. Issue is occurring in their website.

  1. Open multiple tabs of iTwin viewer
  2. Select an element in viewport and confirm that Property Grid pops up
  3. Switch the tab and leave it as it is for around 10 to 15 minutes
  4. Come back to the tab . Error occurs at this point. If they refresh the browser then it comes back to normal

Request URL: https://api.bentley.com/imodel/rpc/v4/mode/1/context/850ef36a-18a0-4595-8fa7-9285d7276980/imodel/2064aefd-8bc6-4e0a-b670-374f87e023e0/changeset/12b84bed1ef6c6534ef0a65d11142fe00776a985/PresentationRpcInterface-4.0.0-getPagedContent Response: {"statusCode": 401, "message": "Invalid JWT."}

Please investigate why this error is occurring and let us know if there are any workarounds.

aruniverse commented 9 months ago

As per the error message, the users access token expired and they need a new one

grigasp commented 9 months ago

Duplicate of https://github.com/iTwin/viewer-components-react/issues/736, closing this one.