If you login to a site while in "private browsing" mode on Safari (both iOS and OSX) all JS on the site will be broken, due to toolbar setting a localStorage setItem, which is not supported in private browsing mode.

I see three options:

1) Change the localstorage to cookies (not sure if this will have same issue, needs to be explored).
2) introduce some sort of shim to avoid all the JS from breaking, like this one: https://gist.github.com/philfreo/68ea3cd980d72383c951
2) provide message letting the user know they cannot use the site logged in with private browsing mode on. (not ideal obviously)

for reference of the issue:
[Error] QuotaExceededError: DOM Exception 22: An attempt was made to add something to storage that exceeded the quota.

CommentFileSizeAuthor
#10 private mode.png253.44 KBJerenus
Members fund testing for the Drupal project. Drupal Association Learn more

Comments

Bcwald created an issue. See original summary.

nod_’s picture

Had a looks seems like a design decision from the safari team.

Cookies are definitely not what we want as a replacement.

There would be several way of solving this, not sure which one is best yet.

Bcwald’s picture

Can you list what ways you would potential solve this? Aside from moving away from local storage and doing something inside the JS code itself, I cant see any way to solve the problem of using LocalStoage other than a graceful degradation (at least, let the JS work outside of this).

droplet’s picture

lightweight shim seems a must at the moment. Simply failover to let other scripts keep going.

Version: 8.1.x-dev » 8.2.x-dev

Drupal 8.1.9 was released on September 7 and is the final bugfix release for the Drupal 8.1.x series. Drupal 8.1.x will not receive any further development aside from security fixes. Drupal 8.2.0-rc1 is now available and sites should prepare to upgrade to 8.2.0.

Bug reports should be targeted against the 8.2.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.3.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

effulgentsia’s picture

Priority: Normal » Major

Promoting to Major due to "breaking all JS on the site".

effulgentsia’s picture

#2696023-17: Save Users' Toolbar State config to serverside mentions this issue, so adding it as a related issue here. If folks here agree with that issue being the most desired way to solve this bug, I'd be fine with closing this as a duplicate, and changing that issue from a Normal feature request to a Major bug. Or, we can keep them as separate issues, if we want a quicker fix here than what that issue is proposing.

droplet’s picture

@effulgentsia,

It's not the same problems and should be separate issues.

Version: 8.2.x-dev » 8.3.x-dev

Drupal 8.2.6 was released on February 1, 2017 and is the final full bugfix release for the Drupal 8.2.x series. Drupal 8.2.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.3.0 on April 5, 2017. (Drupal 8.3.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.3.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.4.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Jerenus’s picture

Issue tags: +Triaged D8 major, +Baltimore2017
FileSize
253.44 KB

I got the same error message when I opened a clean website (D8 8.3.1) in Safari private window with logged in. Then the js of the tab switch (Looks like all js on the site) doesn't work.

Error Message:
QuotaExceededError (DOM Exception 22): The quota has been exceeded.

Screenshot:
reproduce

cilefen’s picture

Issue tags: -Triaged D8 major

I removed the "Triaged D8 major" tag because that is not the correct tag following a triage session. @Jerenus comment #10 seems to be an ordinary comment rather than the results of a triage.

Version: 8.3.x-dev » 8.4.x-dev

Drupal 8.3.6 was released on August 2, 2017 and is the final full bugfix release for the Drupal 8.3.x series. Drupal 8.3.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.4.0 on October 4, 2017. (Drupal 8.4.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.4.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.5.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.