Please give a brief summary of your issue: 404 Not Found - Couldn’t fetch resource file
(Think of this as an email subject)
Please describe your issue and provide steps to reproduce it:
I am able to successfully integrate the webviewer to local environment, but
I am getting “404 Not Found” error in the network tab with “Couldn’t fetch resource file” popup after deployment.
These are some of the files that are getting this error. However, surprisingly some files are getting a 200 OK response like below:
“project-url/wv-resources/lib/core/office/WebOfficeWorkerWasm.js”
I was able to find the below discussion that seems to the same issue:
Assuming that viewerConfigOptions.path is set correctly, I don’t see concerns with your constructor that would be connected. I would double check that if you have not already.
This sort of error can occur when WebViewer is unable to find the lib folder, set by the path option.
If this is only occurring in production, are you hosting the lib folder on a separate domain? If so, you can follow this guide to make sure WebViewer can find it: Remote-lib | Apryse Documentation
Let me know if you have confirmed the server is accepting the file types.
Hope this helps!
Best Regards,
Jacob Romano Carlsen
Web Development Support Engineer Apryse Software Inc.
We are able to fix this issue by adding the file types in web.config file. We also updated the content security policy according to our needs, this was another reason the document was not loading!!