code-kotis / qr-code-scanner

📠 A simple, fast and useful progressive web application
https://qrcodescan.in
MIT License
1.05k stars 291 forks source link

Camera not loading in shared hosting, but works on Linode VPS. #88

Closed jeynergil closed 4 years ago

jeynergil commented 4 years ago

Hi, I used the same version of npm 6.13.7 for both servers.

I installed using the steps:

  1. git clone https://github.com/code-kotis/barcode-scanner
  2. npm install
  3. npm run build

Opened in linode server: barcode-scanner/dist/index.html --- Works!

Opened in shared hosting: barcode-scanner/dist/index.html https://theapexteam.com/src/misc/misc/barcode-scanner/dist/index.html --- Not working!

Can you please help?

Thank you in advance.

gokulkrishh commented 4 years ago

@jeynergil Check your network logs. SOme resources are 404. it should work once you fix it.

jeynergil commented 4 years ago

Thank you for the reply.

I saw it.

It is pointing like this:

GET https://theapexteam.com/images/photo-camera.svg 404 GET https://theapexteam.com/manifest.json 404

I did not install it on the ROOT folder. I installed it here src/misc/misc/barcode-scanner/.

https://theapexteam.com/src/misc/misc/barcode-scanner/dist/index.html

May I know why it is looking for the file in the root directory?

gokulkrishh commented 4 years ago

@jeynergil Check the URL, its pointing to the images/photo-camera.svg. So the photo-camera image is looking into root directory image folder. Thats how web server looks for the resources.

Hence not working.

gokulkrishh commented 4 years ago

@jeynergil Closing this issue. As its not an issue with app. You need help pls post it in stackoverflow. Issues in github are meant for issues in app.