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

error: "SecurityError: The operation is insecure. " in firefox #148

Open
luneshao opened this issue Jun 11, 2020 · 1 comment
Open

error: "SecurityError: The operation is insecure. " in firefox #148

luneshao opened this issue Jun 11, 2020 · 1 comment

Comments

@luneshao
Copy link

luneshao commented Jun 11, 2020

hello,
when i use vue-ls package in my project(with vue-cli), it will throw error when Firefox opens.The error like "SecurityError: The operation is insecure." And, it is OK in Chrome and Opera.

error screenshot in firefox

version msg:

  • Firefox: 76.0.1 (64-bit)
  • Os: mac os catalina 10.15.2
  • vue-ls: 3.2.1

my code

// main.js
import Vue from 'vue';
import VueLs from 'vue-ls';

const options = {
  namespace: 'test__', // key prefix
  name: 'ls', // name variable Vue.[ls] or this.[$ls],
  storage: 'local', // storage name session, local, memory
};

Vue.use(VueLs, options);

Hope for your help :)

@mskry
Copy link

mskry commented Oct 21, 2021

Some browsers disabling localStorage/sessionStorage in private mode, you can run a test and catch the exception before library initialization Feature-detecting 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

2 participants