{"record":{"id":"becc6e804fa5c1f3","repo":"benweet/stackedit","slug":"your-browser-is-not-supported-please-upgrade-to-t","errorCode":null,"errorMessage":"Your browser is not supported. Please upgrade to the latest version.","messagePattern":"Your browser is not supported\\. Please upgrade to the latest version\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"critical","filePath":"src/index.js","lineNumber":13,"sourceCode":"import Vue from 'vue';\nimport 'babel-polyfill';\nimport 'indexeddbshim/dist/indexeddbshim';\nimport * as OfflinePluginRuntime from 'offline-plugin/runtime';\nimport './extensions';\nimport './services/optional';\nimport './icons';\nimport App from './components/App';\nimport store from './store';\nimport localDbSvc from './services/localDbSvc';\n\nif (!indexedDB) {\n  throw new Error('Your browser is not supported. Please upgrade to the latest version.');\n}\n\nOfflinePluginRuntime.install({\n  onUpdateReady: () => {\n    // Tells to new SW to take control immediately\n    OfflinePluginRuntime.applyUpdate();\n  },\n  onUpdated: async () => {\n    if (!store.state.light) {\n      await localDbSvc.sync();\n      localStorage.updated = true;\n      // Reload the webpage to load into the new version\n      window.location.reload();\n    }\n  },\n});\n\nif (localStorage.updated) {","sourceCodeStart":1,"sourceCodeEnd":31,"githubUrl":"https://github.com/benweet/stackedit/blob/6dce2a5e36b755a0c244522b48a06c91a2df0f59/src/index.js#L1-L31","documentation":"This is a startup-time feature-detection guard. The app requires IndexedDB to persist workspaces and documents locally; the check `if (!indexedDB)` in src/index.js:13 throws before any app code runs when the API is absent. This happens in browsers without IndexedDB support (very old browsers, some private/hardened modes) or in insecure contexts (plain http:// non-localhost) where storage APIs are disabled.","triggerScenarios":"Loading the app in a browser where the global `indexedDB` is undefined: browsers with no IndexedDB implementation, Safari/Firefox private-browsing modes that previously disabled storage, insecure non-HTTPS origins in some browsers, or embedded webviews with storage disabled.","commonSituations":"Users on very old or exotic browsers; corporate browsers with storage APIs policy-disabled; serving the app over plain HTTP; embedded webviews (older Android WebView) with DOM storage turned off.","solutions":["Open the app in a current version of Chrome, Firefox, Edge, or Safari that supports IndexedDB.","Serve the app over HTTPS (or http://localhost) so storage APIs are not blocked.","Disable private browsing / allow site data and cookies in browser settings.","If you must support such browsers, show a friendly compatibility screen instead of an uncaught throw."],"exampleFix":"// before\nif (!indexedDB) {\n  throw new Error('Your browser is not supported. Please upgrade to the latest version.');\n}\n// after\nif (!window.indexedDB) {\n  document.body.innerHTML = 'Your browser is not supported. Please upgrade to the latest version.';\n  throw new Error('Your browser is not supported. Please upgrade to the latest version.');\n}","handlingStrategy":"validation","validationCode":"if (typeof indexedDB === 'undefined' || !window.indexedDB) {\n  alert('Your browser is not supported. Please upgrade to the latest version.');\n  return;\n}","typeGuard":"function supportsIndexedDB(win = window) {\n  return typeof win.indexedDB !== 'undefined' && win.indexedDB !== null;\n}","tryCatchPattern":"try {\n  if (!supportsIndexedDB()) throw new Error('Your browser is not supported.');\n} catch (e) {\n  renderUnsupportedBrowserScreen(e);\n}","preventionTips":["Feature-detect IndexedDB before app startup and show a graceful upgrade message.","Test the app in private-browsing modes and non-HTTPS origins.","Browserslist/CI-test against minimum supported browsers and document them.","Avoid throwing raw errors at startup; render a user-facing compatibility screen."],"tags":["browser-compatibility","indexeddb","startup"],"backgroundTag":"unsupported-browser-feature","analyzedSha":"6dce2a5e36b755a0c244522b48a06c91a2df0f59","analyzedAt":"2026-09-01T00:49:23.866Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T05:18:18.240Z"}