iTwin / itwinjs-core

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

"Unhandled Rejection (Bad Model): ViewCreator3d.createDefaultView: no 3D models found in iModel #2370

Closed Malashree99 closed 2 years ago

Malashree99 commented 2 years ago

Describe the bug "Unhandled Rejection (Bad Model): ViewCreator3d.createDefaultView: no 3D models found in iModel"

Additional context I'm getting an about mentioned error but I can see my modal in IModalweb Screenshot (3)

aruniverse commented 2 years ago

Please provide more details like what version of @itwin/web-viewer-react and iTwin.js you are using

pmconne commented 2 years ago

The error is telling you the problem: your iModel contains no 3d models. Specifically, the following query returns zero results: SELECT ECInstanceId FROM Bis.GeometricModel3D WHERE IsPrivate = false AND IsTemplate = false AND isNotSpatiallyLocated = false @roopksaini, it should probably not produce an error in such a case; instead it should return a view that displays no models, with its extents based on the iModel's project extents. @Malashree99, consider using SpatialViewState.createBlank as a workaround for now.