iTwin / itwinjs-core

Monorepo for iTwin.js Library
https://www.itwinjs.org
MIT License
600 stars 210 forks source link

Not able to run app #829

Closed jonigloo closed 2 years ago

jonigloo commented 3 years ago

I get to the part where it says "open imodel" or "sign out" and get the following error in the console -

Error |imodeljs-frontend.RpcInterface| Error: Invalid iModelToken for RPC operation request {"ExceptionType":"IModelError","ActivityId":"40db321d-ab3f-4a83-8660-2d086e4bb532","SessionId":"cae0a95a-d9ba-45ef-8e62-6adb9b2ac98f","ApplicationId":"2686","ApplicationVersion":"1.0.0"}

and

Warning |imodeljs-frontend.RpcInterface| Unable to discover backend capabilities. {"errorNumber":32768,"name":"Error","ActivityId":"40db321d-ab3f-4a83-8660-2d086e4bb532","SessionId":"cae0a95a-d9ba-45ef-8e62-6adb9b2ac98f","ApplicationId":"2686","ApplicationVersion":"1.0.0"}


⚠ Do not edit this section. It is required for imodeljs.github.io ➟ GitHub issue linking

pmconne commented 3 years ago

This error will occur if you npm run start:webserver (which starts only the frontend) instead of npm run start or npm run start:servers (which starts the frontend and the backend). Please reread the instructions. I just ran through them and confirmed I can open and view an iModel.

jonigloo commented 3 years ago

I did use the command "npm run start:servers" but still received the error and have just tried on a second machine and got the same error, unless I'm missing something I think there must be a step missing in the quickstart guide.

pmconne commented 3 years ago

The error suggests the backend isn't running or couldn't be contacted by the frontend. Maybe @ramanujam-raman or @swbsi knows some other reason you might observe that. Can you specify what operating system, browser, etc you are using?

jonigloo commented 3 years ago

I am on Windows 10 home, using Chrome, running on a laptop with an i7-8750H, 16gb of ram and a 1660ti. I did eventually get the app to load on my second computer by just waiting, but it was too slow and unresponsive to be useable.

swbsi commented 3 years ago

@jonigloo Can you set a breakpoint here so we can analyze the error?

https://github.com/imodeljs/imodeljs/blob/b221545cfcbc11cce8fd0ef66169342bed909a21/core/common/src/rpc/web/BentleyCloudRpcProtocol.ts#L102

When you hit that breakpoint, can you tell us the value of operationId and token in that function?

calebmshafer commented 2 years ago

closing due to inactivity. feel free to re-open if the issue persists.