Skip to content
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

Suggestion: Add Guidance on Usage via Browser, Suggestions, Pitfalls, etc. #74

Open
shawntax opened this issue Mar 24, 2020 · 3 comments

Comments

@shawntax
Copy link

shawntax commented Mar 24, 2020

Hello!

With the app now being delivered through a single html file (👏), folks who attempt to open the app locally (i.e through the file:///path URI) via a modern, Chromium-based browser will run into a hurdle:

Uncaught DOMException: Failed to read the 'localStorage' property from 'Window': Access is denied for this document.

If the "Block third-party cookies" setting is enabled.

A quick fix is to disable the setting, unblocking third-party cookies for all sites. But I would imagine the privacy-minded folks, myself included, wouldn't be too happy with that. Chromium allows you to add specific URLs or hostnames to an "Allow" list, however adding the specific file URI to the allow list does not work here because localStorage is per domain , and the file:/// URI scheme has an empty hostname by default (an insight gathered from this StackOverflow answer).

A workaround is to add localhost/127.0.0.1 to the "Allow" list, and then visit http://localhost/.../index.html using a local webserver. (adding localhost to the "Allow" list and then specifying the hostname in the file URI, e.g file://localhost/Users/me/dotgrid-main/index.html, does not work for some reason 🤷)


Would you consider adding a little section in the docs that describe some basics on opening via a browser, suggestions, pitfalls, etc. ? I know your philosophy is Linux-first and I've seen you recommend browsers like surf and Next. But I think some guidance here would be helpful for those using Chromium-based browsers starting, with the third-party cookie issue described above.

Thanks for all the great work!

@neauoire
Copy link
Member

I will install chromium and do some testing, I believe that the theme tools is the only thing that uses localstorage, I might be able to work around that. Stay tuned :)

@vintprox
Copy link

There is some fuse about SameSite option for cookies, maybe it's related

@shawntax
Copy link
Author

@vintprox are you referring to this?

While you'll see the warning in your console, it's unrelated. Dotgrid is not setting any cookies, just accessing localStorage.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants