pulsar icon indicating copy to clipboard operation
pulsar copied to clipboard

Could not connect to indexedDB

Open mauricioszabo opened this issue 1 year ago • 5 comments

Prerequisites

Description

A notification shows that Pulsar could not connect to IndexedDB

Steps to Reproduce

  1. Open a version of Pulsar
  2. Open a different version of Pulsar

Expected behavior:

Not have this notification

Versions

Pulsar: 1.104.0-dev x64 Electron: 12.2.3 OS: Ubuntu 20.04.6 Thrown From: Pulsar Core

Stack Trace

Could not connect to indexedDB

At undefined

Error: Could not connect to indexedDB
    at IDBOpenDBRequest.dbOpenRequest.onerror (/home/mauricio/projects/pulsar_repos/pulsar/src/state-store.js:31:20)

Fix

There's no "easy fix" - basically, the way Pulsar keeps track of states is with IndexedDB, which is a horrible, horrible. Two Electron apps with the same name will conflict and it's hard to make backups, it's hard to inspect, etc.

There is a solution that I can pitch, that is, to move all IndexedDB storage to SQLite3. I made some experiments with SQLite3, and it seems that this could work - now we only need to decide if we want to follow up with this experiment

mauricioszabo avatar May 12 '23 03:05 mauricioszabo

I'm very much in favor of continuing the sqlite experiment. It would make it much less painful to run two versions of Pulsar side-by-side.

savetheclocktower avatar May 12 '23 04:05 savetheclocktower

I have just hit this issue after updating to 1.112 from 1.105, it delays pulsar starting

mramendi avatar Feb 08 '24 21:02 mramendi

@mramendi This should only happen when two instances of Pulsar are running at the same time. So it's very likely the update process didn't properly close the old version or accidentally started two. If only one instance is running does this issue still occur for you?

confused-Techie avatar Feb 09 '24 00:02 confused-Techie

Tried again, issue did not reproduce. So yes, probably something related to the update, where I hit another bug #544 and had to uninstall and reinstall.

mramendi avatar Feb 09 '24 03:02 mramendi

I had apparently the same error once after upgrading to the 1.119.0:

Versions

Pulsar: 1.119.0 x64 Electron: 12.2.3 OS: Debian GNU/Linux Thrown From: Pulsar Core

Stack Trace

Could not connect to indexedDB

At undefined

Error: Could not connect to indexedDB
    at IDBOpenDBRequest.dbOpenRequest.onerror (/app.asar/src/state-store.js:31:20)

Commands

Non-Core Packages

atom-django 0.3.2 
atom-easy-jsdoc 4.12.5 
atom-file-icons 0.7.1 
atom-ide-base 3.4.0 
atom-ide-code-format 1.0.3 
atom-ide-datatip 0.25.0 
atom-ide-definitions 0.4.2 
atom-ide-hyperclick 1.0.11 
atom-ide-markdown-service 2.1.0 
atom-ide-outline 3.2.0 
atom-ide-signature-help 0.16.0 
atom-typescript 14.4.0 
atomic-management 0.4.2 
busy-signal 2.0.1 
declarations 1.1.3 
django-templates 0.5.0 
django-wrap-i18n 0.6.0 
file-icons 2.1.47 
git-blame 1.8.0 
gitlab-manager 0.2.2 
ide-bash 1.0.11 
ide-typescript 0.9.5 
intentions 2.1.1 
javascript-drag-import 0.1.13 
language-ansi-styles 0.1.0 
language-apache 1.8.0 
language-dot 1.7.0 
language-ini 1.25.0 
language-pip 2.0.1 
language-svg 0.9.2 
language-systemd 0.1.1 
language-tex 0.4.0 
linter 3.4.0 
linter-ui-default 3.4.1 
markdown-pdf 2.3.3 
pdfjs-viewer 1.3.0 
pp-markdown 0.0.2 
preview-plus 1.2.7 
pulsar-find-references 0.0.20 
pulsar-ide-python 1.11.1 
pulsar-ide-typescript-alpha 0.1.2 
Quick-JavaScript 2.2.0 
redmine 0.2.2 
svg-preview 0.14.0 
svn 0.0.14 

Additional Information

SvenMoenig avatar Jul 17 '24 13:07 SvenMoenig