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

Private mode in Safari causes console error: "QuotaExceededError: DOM Exception 22" #8063

Closed
cjcenizal opened this issue Aug 23, 2016 · 5 comments
Assignees
Labels
bug Fixes for quality problems that affect the customer experience v5.0.0-beta1

Comments

@cjcenizal
Copy link
Contributor

cjcenizal commented Aug 23, 2016

Kibana version: 4.6.0

Elasticsearch version: 2.4.0

Server OS version: OS X

Browser version: Safari (private browsing mode)

Browser OS version: OS X

Steps to reproduce:

  1. Open up Safari in private browsing mode, and open Kibana.
  2. Kibana won't load and the console will show an error: QuotaExceededError: DOM Exception 22

The problem

It looks like this problem is related to Safari disallowing access to localStorage when in private browsing mode: http://stackoverflow.com/questions/14555347/html5-localstorage-error-with-safari-quota-exceeded-err-dom-exception-22-an

It looks like nav.js is the culprit, in these two places:

In both places, calls are being made to appUrlStore, using its getItem and setItem methods. It looks like appUrlStore is an alias for window.sessionStorage: https://github.com/elastic/kibana/blob/4.x/src/ui/public/chrome/api/apps.js#L10

Possible solution

We can probably fix this by wrapping the setItem and getItem calls in a try/catch block, and display an error to the user in the catch:

try {
  internals.appUrlStore.setItem(`lastSubUrl:${link.url}`, url);
} catch(error) {
  // Imperatively write some markup to the DOM to show an error notification stating: "Sorry, Kibana requires access to sessionStorage, and it looks like your browser isn't providing access to sessionStorage. If you're using Safari with private browsing enabled, you can solve this problem by disabling private browsing, or by using another browser."
}
@cjcenizal cjcenizal added bug Fixes for quality problems that affect the customer experience v4.6.0 labels Aug 23, 2016
@cjcenizal cjcenizal added the P2 label Aug 23, 2016
@epixa
Copy link
Contributor

epixa commented Aug 24, 2016

It looks like this issue would exist in 4.5.4 as well.

@epixa epixa removed the v4.6.0 label Aug 24, 2016
@stacey-gammon stacey-gammon self-assigned this Sep 16, 2016
stacey-gammon added a commit to stacey-gammon/kibana that referenced this issue Sep 16, 2016
Catch the crash and display a more useful error message to the user
about a work around.
elastic-jasper added a commit that referenced this issue Sep 19, 2016
---------

**Commit 1:**
Bug #8063 Safari crash in private browsing mode

Catch the crash and display a more useful error message to the user
about a work around.

* Original sha: 7dbb786
* Authored by Stacey-Gammon <gammon@elastic.co> on 2016-09-16T19:15:43Z

**Commit 2:**
Merge branch 'master' of https://github.com/elastic/kibana into bug/8063/no-safari-crash

* Original sha: 8578666
* Authored by Stacey-Gammon <gammon@elastic.co> on 2016-09-19T13:27:21Z

**Commit 3:**
Merge remote-tracking branch 'elastic/master' into bug/8063/no-safari-crash

* Original sha: f29b60a
* Authored by Stacey-Gammon <gammon@elastic.co> on 2016-09-19T20:23:07Z

**Commit 4:**
Clean up error message a tad

* Original sha: 36e298d
* Authored by Stacey-Gammon <gammon@elastic.co> on 2016-09-19T20:34:21Z
elastic-jasper added a commit that referenced this issue Sep 19, 2016
---------

**Commit 1:**
Bug #8063 Safari crash in private browsing mode

Catch the crash and display a more useful error message to the user
about a work around.

* Original sha: 7dbb786
* Authored by Stacey-Gammon <gammon@elastic.co> on 2016-09-16T19:15:43Z

**Commit 2:**
Merge branch 'master' of https://github.com/elastic/kibana into bug/8063/no-safari-crash

* Original sha: 8578666
* Authored by Stacey-Gammon <gammon@elastic.co> on 2016-09-19T13:27:21Z

**Commit 3:**
Merge remote-tracking branch 'elastic/master' into bug/8063/no-safari-crash

* Original sha: f29b60a
* Authored by Stacey-Gammon <gammon@elastic.co> on 2016-09-19T20:23:07Z

**Commit 4:**
Clean up error message a tad

* Original sha: 36e298d
* Authored by Stacey-Gammon <gammon@elastic.co> on 2016-09-19T20:34:21Z
elastic-jasper added a commit that referenced this issue Sep 19, 2016
---------

**Commit 1:**
Bug #8063 Safari crash in private browsing mode

Catch the crash and display a more useful error message to the user
about a work around.

* Original sha: 7dbb786
* Authored by Stacey-Gammon <gammon@elastic.co> on 2016-09-16T19:15:43Z

**Commit 2:**
Merge branch 'master' of https://github.com/elastic/kibana into bug/8063/no-safari-crash

* Original sha: 8578666
* Authored by Stacey-Gammon <gammon@elastic.co> on 2016-09-19T13:27:21Z

**Commit 3:**
Merge remote-tracking branch 'elastic/master' into bug/8063/no-safari-crash

* Original sha: f29b60a
* Authored by Stacey-Gammon <gammon@elastic.co> on 2016-09-19T20:23:07Z

**Commit 4:**
Clean up error message a tad

* Original sha: 36e298d
* Authored by Stacey-Gammon <gammon@elastic.co> on 2016-09-19T20:34:21Z
@spalger
Copy link
Contributor

spalger commented Oct 11, 2016

Closed by #8063

@spalger spalger closed this as completed Oct 11, 2016
@epixa
Copy link
Contributor

epixa commented Oct 11, 2016

@spalger You closed it with its own issue number rather than linking to a PR

@epixa
Copy link
Contributor

epixa commented Oct 11, 2016

Closed by #8343

@spalger
Copy link
Contributor

spalger commented Oct 11, 2016

lol

airow pushed a commit to airow/kibana that referenced this issue Feb 16, 2017
---------

**Commit 1:**
Bug elastic#8063 Safari crash in private browsing mode

Catch the crash and display a more useful error message to the user
about a work around.

* Original sha: 6f0dd0766b772116c93081abfa3ca81898af8063 [formerly 7dbb786]
* Authored by Stacey-Gammon <gammon@elastic.co> on 2016-09-16T19:15:43Z

**Commit 2:**
Merge branch 'master' of https://github.com/elastic/kibana into bug/8063/no-safari-crash

* Original sha: c577d50e02050bad154fabcff92890669ce50e9c [formerly 8578666]
* Authored by Stacey-Gammon <gammon@elastic.co> on 2016-09-19T13:27:21Z

**Commit 3:**
Merge remote-tracking branch 'elastic/master' into bug/8063/no-safari-crash

* Original sha: 5a1b261e3abc755d3adf1b4525e5d381cf08a1c0 [formerly f29b60a]
* Authored by Stacey-Gammon <gammon@elastic.co> on 2016-09-19T20:23:07Z

**Commit 4:**
Clean up error message a tad

* Original sha: f5abcadeb6fdba5ddebd699b40f8fb38e387f150 [formerly 36e298d]
* Authored by Stacey-Gammon <gammon@elastic.co> on 2016-09-19T20:34:21Z


Former-commit-id: ddd1d7e
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Fixes for quality problems that affect the customer experience v5.0.0-beta1
Projects
None yet
Development

No branches or pull requests

5 participants