Open lijiayi0921 opened 4 months ago
If you open the network tab in the dev tools, are there any requests that fail in 4.7 that wasn't in 4.6?
Nothing fails in Network tab. Btw in order to have a working version of iTwin, I took the same implementation from the simple example from : "npx create-react-app .... --template @itwin/web-viewer " The simple viewer loads the model correctly. But my implementation does not - even if I change every property of Viewer to be the same.
<Viewer
iTwinId={props.file?.platformBucket}
iModelId={props.file?.platformModel}
authClient={authClient}
viewCreatorOptions={viewCreatorOptions}
enablePerformanceMonitors={process.env.MODE === 'DEBUG'}
onIModelAppInit={onIModelAppInit}
// onIModelConnected={onIModelConnected}
// additionalI18nNamespaces={['safe', 'safeTools']}
uiProviders={[
new ViewerNavigationToolsProvider(),
new ViewerContentToolsProvider({
vertical: {
measureGroup: false,
},
}),
new ViewerStatusbarItemsProvider(),
new TreeWidgetUiItemsProvider(),
new PropertyGridUiItemsProvider({
propertyGridProps: {
autoExpandChildCategories: true,
ancestorsNavigationControls: (props) => (
<AncestorsNavigationControls {...props} />
),
contextMenuItems: [
(props) => <CopyPropertyTextContextMenuItem {...props} />,
],
settingsMenuItems: [
(props) => (
<ShowHideNullValuesSettingsMenuItem
{...props}
persist={true}
/>
),
],
},
}),
new MeasureToolsUiItemsProvider(),
...(safeExt?.uiProviders ?? [])
]}
/>
Is the simple example from npx create-react-app
also using 4.7 packages? And that is loading the model correctly?
Hi @hl662, thank you so much for following my issue. Yes the sample works correctly (package list as in my original post)
Comparing the network traffic, both seem to load the 3d model :
Sample viewer :
My app
I was comparing the resulting css in the navigator, didn't find anything significant yet. Could that be the issue ?
I can't see CSS being the cause... if the tree on the side is shown, and you're able to see some stuff rendered on the page, and within the viewport... I'm surprised that there aren't any errors in the console?
The only error is this (yet not everytime) : Root font size must not be overridden. See https://github.com/iTwin/iTwinUI/wiki/iTwinUI-react-v2-migration-guide#relative-font-size There are warnings related to deprecated UI component as well.
It happens on localhost or deployed, with Chrome and with FF... Is there some viewer settings that could be the cause ?
It's not too clear what the root cause is yet... I see from your package.json that you jumped straight to 4.7.5. Could you downgrade that to 4.7.0
? Let's see if we could nail down which version of 4.7 is causing this problem, and compare that against the release change logs.
Going back to 4.6.2 (for all packages that are at 4.7.5), problem solved, the model reappears. I'll try to go up again to see where it brreaks
At 4.7.0 the model is not showing
In the network tab, can you filter for these following requests that start with api.bentley.com/imodel/rpc/v4
? If any are failing, please provide the x-correlation-id header value of those errors, so we can check on our side
There were no request that were failing...
if you were to compare the network requests and the waterfall between the sample viewer and your implementation of the viewer, are there discrepancies in the flow? Maybe some requests in one app weren't executed?
Yes in my app there are some more requests (redundant ?).
Here they are filtered with "api.bentley.com/imodel/rpc/v4"
My app :
<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:x="urn:schemas-microsoft-com:office:excel" xmlns="http://www.w3.org/TR/REC-html40">
| | | | | | | -- | -- | -- | -- | -- | -- | -- | -- IModelReadRpcInterface-3.6.0-getConnectionProps?pa…mMmJmYWZmNjQ0N2ZmNTE3YzlmMzMwOGUyZjdlIn19XQ%3D%3D | 200 | h2 | api.bentley.com | fetch | WebAppRpcRequest.ts:200 | 1.0 kB | 137 ms IModelReadRpcInterface-3.6.0-getConnectionProps?pa…mMmJmYWZmNjQ0N2ZmNTE3YzlmMzMwOGUyZjdlIn19XQ%3D%3D | 200 | h2 | api.bentley.com | fetch | WebAppRpcRequest.ts:200 | 0 B | 113 ms PresentationRpcInterface-4.1.0-getSelectionScopes | 200 | h2 | api.bentley.com | fetch | WebAppRpcRequest.ts:200 | 498 B | 45 ms PresentationRpcInterface-4.1.0-getSelectionScopes | 200 | h2 | api.bentley.com | fetch | WebAppRpcRequest.ts:200 | 239 B | 81 ms IModelReadRpcInterface-3.6.0-getCustomViewState3dD…0N2ZmNTE3YzlmMzMwOGUyZjdlIiwiaW5kZXgiOjEwfX0se31d | 200 | h2 | api.bentley.com | fetch | WebAppRpcRequest.ts:200 | (disk cache) | 1 ms IModelReadRpcInterface-3.6.0-hydrateViewState?para…GVjdG9yU3RhdGVNb2RlbHMiOiIrMjAwMDAwMDAwMEMifV0%3D | 200 | h2 | api.bentley.com | fetch | WebAppRpcRequest.ts:200 | (disk cache) | 1 ms IModelReadRpcInterface-3.6.0-querySubCategories?pa…rMUUrNDIrMyoyKzExKzEyKzE5KzUxNyszNDgrM0YrQytFNiJd | 200 | h2 | api.bentley.com | fetch | WebAppRpcRequest.ts:200 | (disk cache) | 1 ms IModelTileRpcInterface-3.2.0-requestTileTreeProps?…XgiOjEwfX0sIjIyXzFkLUU6MF8weDIwMDAwMDAwMDBjIl0%3D | 200 | h2 | api.bentley.com | fetch | WebAppRpcRequest.ts:200 | (disk cache) | 4 ms IModelReadRpcInterface-3.6.0-queryModelProps | 200 | h2 | api.bentley.com | fetch | WebAppRpcRequest.ts:200 | 490 B | 42 ms PresentationRpcInterface-4.1.0-getPagedNodes | 200 | h2 | api.bentley.com | fetch | index.ts:102 | 535 B | 325 ms PresentationRpcInterface-4.1.0-getPagedNodes | 200 | h2 | api.bentley.com | fetch | index.ts:102 | 502 B | 322 ms IModelTileRpcInterface-3.2.0-getTileCacheConfig | 200 | h2 | api.bentley.com | fetch | WebAppRpcRequest.ts:200 | 333 B | 42 ms PresentationRpcInterface-4.1.0-getPagedNodes | 200 | h2 | api.bentley.com | fetch | index.ts:102 | 533 B | 137 ms PresentationRpcInterface-4.1.0-getPagedNodes | 200 | h2 | api.bentley.com | fetch | index.ts:102 | 567 B | 81 ms IModelReadRpcInterface-3.6.0-queryRows | 200 | h2 | api.bentley.com | fetch | WebAppRpcRequest.ts:200 | 421 B | 30 ms IModelReadRpcInterface-3.6.0-queryRows | 200 | h2 | api.bentley.com | fetch | WebAppRpcRequest.ts:200 | 408 B | 37 ms
Hi,
My iModel view does not load the 3D model. It loads the point clouds correctly.
No error from console. Scopes are : imodelaccess:read imodels:read itwinjs (I tried itwin-platform but the same)
This happens since I moved from 4.6 to 4.7 (although many other issues are solved thanks to the help from this forum) I'm using the packages from the latest "npx create-react-app .... --template @itwin/web-viewer " : (Which might not be the latest for every package)
In the Tree View everything is shown. Any idea why this happens ?
Thank you Jiayi