[Solved] 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.

    Edited 4 times, last by tidytrax (March 9, 2021 at 6:06 AM).

  • 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.

    Edited once, last by tidytrax (April 9, 2019 at 8:43 PM).

  • Some news on this ? I still got this problem on 1.20.9
    and almost 2 years without caching hotspot, low performance to load the hs.

  • I have also tested on edge only works on firefox
    Chrome, edge, firefox last version.

    this is costing me too much because i can use cache on hotspot.


    the error stop here e.loader.src=b

    off"!=rc&&(e.loader.crossOrigin=rc),e.loader.src=b):(e.loading=!1,ta.reportError(1,e.getfullpath()+" loading error: "+b)))}}}

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!