planetfederal / qgis-webappbuilder-plugin

GNU General Public License v3.0
18 stars 20 forks source link

Opening directly (not using a web server) a compiled webapp do not show layers on Chrome on macOS (but is ok on FF and Safari) #413

Closed gioman closed 7 years ago

gioman commented 7 years ago

Minor issue... but may be worth a note on docs at least... if not a fix.

SrNetoChan commented 7 years ago

@giovanni throughout the documentation It is mentioned several times that compiled Apps must be server otherwise they might not work properly. Do you think we should be more specific?

bartvde commented 7 years ago

a fix is not possible, Chrome disables XHR over file://

bartvde commented 7 years ago

though maybe we could document something like this: https://stackoverflow.com/questions/4819060/allow-google-chrome-to-use-xmlhttprequest-to-load-a-url-from-a-local-file

open /Applications/Google\ Chrome.app/ --args --allow-file-access-from-files
chrome.exe --allow-file-access-from-files
gioman commented 7 years ago

@SrNetoChan @bartvde if I'm not wrong this case is specific on macOS, I'm pretty sure I can see well compiled weapps by opening directly the index file on Chrome on Windows.

bartvde commented 7 years ago

I think I've seen the same on Linux, not sure about Windows since I don't run that

bartvde commented 7 years ago

btw what type of layers? I'm talking about local GeoJSON layers

gioman commented 7 years ago

btw what type of layers? I'm talking about local GeoJSON layers

yes me too

SrNetoChan commented 7 years ago

I can't recall why or when, but we already mentioned in several places that compiled versions should always be served and not opened directly (Maybe it was @volaya instructions). See:

here https://connect.boundlessgeo.com/docs/desktop/plugins/webappbuilder/usage.html#create-app and here https://connect.boundlessgeo.com/docs/desktop/plugins/webappbuilder/troubleshooting.html#compiled-app-is-empty

Are you saying that this only true for Chrome in OSX, but not for the rest of systems and browsers?

gioman commented 7 years ago

I can't recall why or when, but we already mentioned in several places that compiled versions should always be served and not opened directly

then we are good.