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
Qgis2web writes to /tmp - Firefox/snap can't read this. #1037
Comments
Can you recommend a change to qgis2web? or is your issue aimed at providing advice for future users? |
First it was a report so anyone else getting the same problem might find the reason, and to inform the devs about it. Secondly, to trigger discussion of how (if its worth it) to fix it. It might just be something worth putting as a note in the documentation, that QGIS and the user's browser must be able to access the folder where the map is written (default /tmp) and this might be problematic if either are running in some sort of containerised or sandboxed environment (snap, docker,...). |
I will consider notifying the user before exporting, perhaps in a note next to the folder choice or in a "?" icon. to click. Thank you. |
An alternative (and this is a much bigger enhancement) might be for qgis2web to launch a small asynchronous web server running on high port (eg 8888), and for the map outputs to be written to be served by that, and then launching the browser at http://localhost:8888/qgis2web/map1 - this should work as long as the browser is on the same host, but it does mean complexity at the qgis2web end managing the server. But if you want to make work for yourself... :) |
This approach would have other wide-ranging benefits. The current preview or export running only as browsing a local file leads to security issues. |
My qgis2web exports to a folder in
/tmp/qgis2web/qgis2web_{date}_etc/
It then starts up the web browser page at
file:///tmp/qgis2web/qgis2web_{date}_etc/index.html
If your browser is running on Linux via the "snap" system (Ubuntu Firefox does this by default), this will fail, because
/tmp
is sandboxed for snap applications. Firefox's view of /tmp is not the system view of /tmp that Qgis has.Solutions: change the folder to somewhere both processes can agree on, or remove the snap version of the browser and install a browser another way, eg by
apt
on Ubuntu (instructions for removing snap Firefox and installing apt Firefox are out there).The text was updated successfully, but these errors were encountered: