You are not logged in.

Dear visitor, welcome to krpano.com Forum. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

tidytrax

Beginner

  • "tidytrax" started this thread

Posts: 10

Location: Brazil - Rio de Janeiro

Occupation: (IT Analyss

  • Send private message

1

Friday, March 15th 2019, 8:07pm

S3 CloudFront Chrome Cors Error Css3d Request Twice Hotspot

Hi, I got a problem, only in chrome and safari,
Firefox and Edge works fine and the problem happens only with hotspot Css3d,
And only some times with random hotspots, can be 2 or 20.

As i could saw the hotspot is request twice, once response 200 and in the second get failed and the below error appear in console.


Access to image at '7276d7a055036dc.png' from origin '' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.


I could fix using webgl, but gif and other stuff lost animation.
or
ignoring cache with 7276d7a055036dc.png?v=TIMESTAMP(random).


And why request twice? looks like the problem, if i use webgl, request once.

This post has been edited 3 times, last edit by "tidytrax" (Mar 15th 2019, 8:37pm)


Posts: 92

Location: Fairfax, CA

Occupation: Code-Slave

  • Send private message

2

Wednesday, March 20th 2019, 6:03pm

Adding a random query string to your image must be done at the very last moment.

3

Wednesday, March 27th 2019, 12:29pm

Hi,

the two requests are because one request is by krpano with CORS-headers to the get the image size (and optionally also the pixels for the WebGL rendering, if that image would be rendered by WebGL) and the second request would be by the browser itself when the image would get rendered by CSS3D. But the browser doesn't send CORS-headers for this case.

That means two requests because once with CORS-headers and once without CORS-headers (only when rendering with CSS3D).

But even due the two requests the browser normally should load the second request from the cache. Only older Safari version were known to be buggy here...

So I would need some help to be able to reproduce that problem:
- Do you have a link to an example where this problem happens?
- What krpano version are you using?
- What Chrome version are you using?

Best regards,
Klaus

tidytrax

Beginner

  • "tidytrax" started this thread

Posts: 10

Location: Brazil - Rio de Janeiro

Occupation: (IT Analyss

  • Send private message

4

Tuesday, April 9th 2019, 8:25pm

Hi,

the two requests are because one request is by krpano with CORS-headers to the get the image size (and optionally also the pixels for the WebGL rendering, if that image would be rendered by WebGL) and the second request would be by the browser itself when the image would get rendered by CSS3D. But the browser doesn't send CORS-headers for this case.

That means two requests because once with CORS-headers and once without CORS-headers (only when rendering with CSS3D).

But even due the two requests the browser normally should load the second request from the cache. Only older Safari version were known to be buggy here...

So I would need some help to be able to reproduce that problem:
- Do you have a link to an example where this problem happens?
- What krpano version are you using?
- What Chrome version are you using?

Best regards,
Klaus
Hi Klaus, I'm Usign KRpano 119pr16 Chrome Versão 73.0.3683.86.


For now I don't have a online link, but I will do soon and send.

This post has been edited 1 times, last edit by "tidytrax" (Apr 9th 2019, 8:43pm)


Posts: 92

Location: Fairfax, CA

Occupation: Code-Slave

  • Send private message

5

Monday, May 13th 2019, 9:38pm

tidytrax,


We had the same issue when we switched to AWS. Once we added the random string i.e. 12345.jpg?nocache=93186409346jhdfbw the issue was resolved. At least a workaround for now.