itwinjs-core icon indicating copy to clipboard operation
itwinjs-core copied to clipboard

Error: IModelReadRpcInterface.openForRead() is not available

Open Malashree99 opened this issue 4 years ago • 1 comments
trafficstars

Error: IModelReadRpcInterface.openForRead() is not available and Error: Invalid hook call. Hooks can only be called inside of the body of a function component.

Screenshot_7

Expected behavior I think I may done some mistake in above code please check

Screenshot_8

I'm_ trying to call onIModelConnected in ViewerStartup.tsx ( by import onIModelConnected from "./App";)

But im getting the below error Screenshot_9 Screenshot_5

Malashree99 avatar Oct 11 '21 09:10 Malashree99

The code you've shared looks fine, but I can't tell if there's an issue with the SmartDetector.tsx file.

Like the error says, invalid hook call, and it list 3 potential reasons why, please take a look at: https://reactjs.org/warnings/invalid-hook-call-warning.html.

aruniverse avatar Oct 11 '21 15:10 aruniverse

closing this issue due to inactivity. feel free to re-open when providing more details.

calebmshafer avatar Aug 19 '22 16:08 calebmshafer