Skip to content
This repository has been archived by the owner on May 17, 2022. It is now read-only.

Web App displays blank page when local storage is not whitelisted for OmniaWrite #123

Open
jish opened this issue Oct 8, 2020 · 4 comments

Comments

@jish
Copy link

jish commented Oct 8, 2020

Describe the bug

When navigating to https://app.omniawrite.com/ a blank page is shown

To Reproduce

  1. Do not whitelist cookies for the omniawrite.com domain
  2. Navigate to https://app.omniawrite.com

Expected behavior

  • I would prefer to see content on the page. Whether it is a marketing landing page, or a limited version of the app that does not allow items to be saved locally.
  • Alternatively, a warning message or popup could be displayed informing the user that the app does not work or has limited functionality when cookies have not yet been allowed on the app.omniawrite.com domain.

Screenshots

Screen Shot 2020-10-08 at 1 28 18 PM

Desktop (please complete the following information):

  • OS: macOS Catalina
  • Browser: Firefox 81
@jish jish changed the title Web App displays blank page when cookies are now whitelisted for OmniaWrite Web App displays blank page when cookies are not whitelisted for OmniaWrite Oct 8, 2020
@TorstenDittmann
Copy link
Owner

TorstenDittmann commented Oct 8, 2020

Hello,

Thanks for the submission, are you sure you are not blocking access to LocalStorage as well?

Since I cannot think of a reason right now that disabled cookies will break the app. Cookies are only used for the Cloud Login, and we also have an automatic fallback for LocalStorage if cookies are disabled.

Based on the yellow error message, do you mind checking again if LocalStorage is also disabled?

Because that will break the app 100% right now and I didn't think about that LocalStorage might be disabled, until now.

@jish
Copy link
Author

jish commented Oct 8, 2020

Ah, yes. That seems correct. It appears that accessing local storage causes an error. No error appears to be thrown when attempting to set a cookie:

document.cookie = "foo=bar";
// Request to access cookie or storage on “<URL>” was blocked because we are blocking all storage access requests. 3

window.localStorage.set("foo", "bar");
// Uncaught DOMException: The operation is insecure.

Screen Shot 2020-10-08 at 1 52 40 PM

@jish jish changed the title Web App displays blank page when cookies are not whitelisted for OmniaWrite Web App displays blank page when local storage is not whitelisted for OmniaWrite Oct 8, 2020
@TorstenDittmann
Copy link
Owner

Thanks for clarifying, that makes sense 🙂

I think, the best way to solve this is showing the user a modal/text that LocalStorage needs to be activated to use OmniaWrite.

I don't think running the app with the whole data in memory makes that much sense. Especially when there are reloads necessary for certain actions inside the app.

This should probably be checked outside of the actual runtime of the app and be done before the app even loads, that will prevent unknown scenarios where the app will still break.

@PineappleIOnic
Copy link

I wouldn't mind having a look into this being done if you would like 👍

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

No branches or pull requests

3 participants