fresco icon indicating copy to clipboard operation
fresco copied to clipboard

When adding an http source on https://fresco.gosptail.org an incorrect error message is displayed

Open ARolek opened this issue 6 years ago • 4 comments

The issue is around protocol mismatch and loading HTTP from an HTTPS domain. The error message indicates the source could not be found. It would be better to indicate to the user that the protocol is the error. Maybe you can sniff for the error and adjust the message accordingly?

ARolek avatar Apr 18 '19 22:04 ARolek

The same happens if a request is made to a tilejson resource without CORS enabled.

pnorman avatar Apr 21 '20 05:04 pnorman

@pnorman Was this due to the tile server not including Access-Control-Allow-Origin headers? I've had trouble sniffing the errors registered on the client and isolating this issue to present a suitable error message. If I can gather some details from you, I can take another crack at it.

justenPalmer avatar Apr 21 '20 16:04 justenPalmer

I'm not sure if it was the tile server not including it or if it was the tilejson server not including it. I added it to both and it fixed the problem.

The reason I added it to this issue is this issue and the CORS issue are both cases of browser policies blocking the loading of some content and it showing up as source could not be found

pnorman avatar Apr 21 '20 17:04 pnorman

@pnorman got it. Thanks for contributing to this issue and I'll try to isolate the CORS error cases so I can present a better error message to the user. Side note: I'm getting ready to release a new, upgraded version of Fresco. Would you be interested in trying it out?

justenPalmer avatar Apr 21 '20 18:04 justenPalmer