localForage / localForage/localForage
Ready Promise never fulfilled when Imported to WebWorker
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 25.8k
- Forks
- 1.3k
- PR merge metrics
- No merged PRs in 30d
Description
This only occurs when trying to use an existing IndexedDB database.
I have tried using importScript, and via import localForage from "localForage" to import localForage into the web worker.
Assuming that no other instance of localForage is using a configuration with the same name property, all works fine. When trying to access the same database (name prop), but a different storeName the promise on _ready will never resolve. Both instances of localForage are created via localForage.createInstance({ ... })
Due to my app being a nuxt.js project, I cannot just import an already created instance via importScript.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the WebWorker case using two localForage.createInstance configurations with the same name and different storeName, then inspect the _ready path for existing IndexedDB databases. Confirm the fix by verifying that both instances' promises resolve when sharing the database name, including when localForage is imported into a Nuxt.js worker.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- database
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100