20 Feb 2024

Getting 404 resource not found error in viewer?

Default blog image

Recently, the viewer team made a small change in the initializer function. In earlier versions, both the `env` and `api` parameters in the initializer function were optional. Now, they are mandatory starting from v7.95. Please pass env: 'AutodeskProduction2' and api: 'streamingV2' as shown below:

Autodesk.Viewing.Initializer({ env: 'AutodeskProduction2', api: 'streamingV2', getAccessToken }, function () {
   const viewer = new Autodesk.Viewing.GuiViewer3D(container, { extensions });
   viewer.start();
});

 

In case your OSS bucket or BIM360/ACC account is from the EU region (EMEA), please replace the `api` value with 'streamingV2_EU', as shown below:

Autodesk.Viewing.Initializer({ env: 'AutodeskProduction2', api: 'streamingV2_EU', getAccessToken }, function () {
   const viewer = new Autodesk.Viewing.GuiViewer3D(container, { extensions });
   viewer.start();
});

 

You can find the details about the `env` and `api` parameters of the viewer initializer at  https://aps.autodesk.com/en/docs/viewer/v7/developers_guide/viewer_basics/starting-html/#initializing-the-viewer-for-svf-and-svf2-support

 

If you have any questions or feedback, please contact us through our APS support channel.

Related Article