Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

the image file could not be accessed error on google chrome page reload #1248

Open
Izaanaami opened this issue Dec 28, 2024 · 3 comments
Open
Labels

Comments

@Izaanaami
Copy link

Izaanaami commented Dec 28, 2024

hi. first of all thank you for your amazing project.
I have a problem that seems very odd to me and have been stuck on it for past few days. when I load the pannellum on google-chrome, the first load works completely fine, but when I refresh the page, I get the error that says image file could not be accessed. I have tested it on other browsers and even other computers and even on VM with the same chrome version, they all work without a problem. I even reinstalled my chrome.

I am using your project on nextjs if that's relevant. and here are the console errors and image file headers:

console error:
GET http://localhost:3000/panorama/allSites.jpeg net::ERR_FAILED 200 (OK)

response headers:
accept-ranges: bytes
cache-control: public, max-age=0
connection: keep-alive
content-length: 10530381
content-type: image/jpeg
date: Sat, 28 Dec 2024 08:26:19 GMT
etag: W/"a0ae4d-193e9d85c11"
keep-alive: timeout=5
last-modified: Sat, 21 Dec 2024 15:31:30 GMT

I have even tried to serve the image from nginx, and have tried serving it using an api from nextjs. I have tried using the pannellum from an iframe, and I have tried using it by editing the js file so that I can import it into my code without it calling itself on the window object.

and one more thing I am concerned about is that, does the library work in the future updates of the browsers, maybe in 5 to 10 years from now? do you have any plan to update the library if any breaking changes happens?

@mpetroff
Copy link
Owner

Pannellum just uses a standard XMLHttpRequest, so it's a configuration issue on your end. My guess is that it's a CORS issue. I'd recommend looking at the responses to this Stack Overflow question: https://stackoverflow.com/questions/22665232/what-can-cause-chrome-to-give-an-neterr-failed-on-cached-content-against-a-ser

and one more thing I am concerned about is that, does the library work in the future updates of the browsers, maybe in 5 to 10 years from now? do you have any plan to update the library if any breaking changes happens?

I can't predict the future, but browser developers generally don't like breaking commonly-used web platform features such as WebGL, so that answer is probably "yes."

@rex0802
Copy link

rex0802 commented Jan 6, 2025

https://cdn.rawgit.com/mpetroff/pannellum/master/build/pannellum.js
it's showing
Screenshot 2025-01-06 155335
what to do any help new here

@mpetroff
Copy link
Owner

mpetroff commented Jan 6, 2025

Builds aren't included in the Git repository (note the lack of a build directory), so pointing a CDN at master / the Git repository isn't going to work. If you want to use a CDN, look at the downloads page, which shows you how to use the latest release via NPM / jsDelivr.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants