Couldn't fetch resource file

WebViewer Version: latest

Do you have an issue with a specific file(s)? No
Can you reproduce using one of our samples or online demos? No
Are you using the WebViewer server?No
Does the issue only happen on certain browsers? With all browser
Is your issue related to a front-end framework? No
Is your issue related to annotations? No

Please give a brief summary of your issue:
Hello,
I had deployed my react project and using backend - Nodejs to load file. I am able to load file in localhost:3000 and everything is working fine but on live domain i am getting error of ā€œCouldnā€™t fetch resource fileā€.
What could be the reason for the error?

Please describe your issue and provide steps to reproduce it:
(The more descriptive your answer, the faster we are able to help you)

Please provide a link to a minimal sample where the issue is reproducible:

1 Like

Hello,
Can you respond on the above mentioned issue as quick as possible as we are not able to proceed further.
Thanks in advance.

1 Like

Hi,

thank you for contacting us regarding Webviewer.

It seems like Webviewer couldnā€™t get the resources file from the request URL, could you confirm if the files being loaded is in the correct path?

Also, you may want to set up your backend to allow servering ā€˜resā€™, ā€˜memā€™, ā€˜wasmā€™ files.

1 Like

Thank u for your response.
We have no idea how to allow servering res, mem, wasm files on our backend.
Can you explain in more detail or else we can connect and have meeting.
If we can connect kindly share your email address.
Thank you.

1 Like

Hi Nikhil,

Iā€™m not too sure what your backend setup is.

Could you firstly confirm if the files being loaded are at the correct path?

Could you also provide a minimal project that the issue can be reproduced?

Thank you.

1 Like

WebViewer trial code structure link

I have attached one zip link file, in which there are two folders;

webviewertrial - For FrontEnd React

nodejsServer - For Backend Nodejs

This code is running on local but not running on deployed version

I am getting 404 Not found error in pdfnet.res, PDFNetCWasm.br.js.mem and two more.

Getting ā€œCoudnā€™t fetch resourse fileā€ errorā€¦

Please find attached error screenshot also with code file link on TOP.

Also, while running react app build locally, it is giving infinite webviewer calling,

and also as you given solution to add PUBLIC_URL in build command, I have added but getting error like PUBLIC_URL is not recognised as an internal or external command.

Please kindly look into the issue, I am facing file not loading on deployed link issue since last month.

Steps for Frontend:

  1. npm start

  2. Click on Click here to load webviewer button

  3. Inspect and check network

  4. While loading pdf on webviewer, it is giving some 404 not found error

Steps for backend:

  1. npm install

  2. npm start or npm run dev

Note: Backend code is just for reference

If you want to setup call for the same, please let me know. Solution on that from your end will be biggest help for us.

ThankYou!

1 Like

Hi Tejshree,

Thank you for providing the information.

Just to confirm that the issue is not reproducible locally with the react and node server code you provided, and itā€™s only reproducible after deployed to a server?

What is the setup of your server? Do you use any reverse proxy application on your server?

1 Like