promises don't resolve and driver is null
See original GitHub issueHi there,
Happy new year 😉
So I’m trying to use IonicStorage in a ionic 4 app, I’m testing it in the browser, but the promises of ready, get and set methods never resolve, and when I log the driver with storage.driver, the result is null!
My config in my app.module.ts :
import { IonicStorageModule } from '@ionic/storage';
@NgModule({
...
imports: [
...
IonicStorageModule.forRoot({
name: '__mydb',
driverOrder: ['sqlite', 'indexeddb', 'websql', 'localstorage']
}),
]
...
I tried every kind of driverOrder, same result. So I may switch back to nativeStorage.
Any ideas? I’m already familiar with localForage.
Cheers
Issue Analytics
- State:
- Created 5 years ago
- Reactions:3
- Comments:37 (9 by maintainers)
Top Results From Across the Web
Promise always resolves to null, despite that a value is ...
Your function getUserInfo has only one return statement, and it returns null , so there is no way it could return other data...
Read more >selenium-webdriver/lib/webdriver.Options
Cookie|null)>. Retrieves the cookie with the given name. Returns null if there is no such cookie. The cookie will be returned as a...
Read more >JavaScript Promises: an introduction - web.dev
Promises simplify deferred and asynchronous computations. A promise represents an operation that hasn't completed yet.
Read more >A device driver is not installed or a hardware device does not ...
Step 1: Determine whether the device driver is found in Device Manager ... Fix problems in which devices do not work or are...
Read more >WebDriver ExecuteScript and Promises
Your promise resolved is being handled in your executeScript function. Changing it to this should work. $browser.executeScript(function(){ var ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
In my case, this is due to the fact that I use
pouchdb
in my project, which requires to add a polyfill forprocess
:See https://github.com/pouchdb/pouchdb/issues/7263
So reverting to 2.2.0 fixes this issue, but then I can’t compile anymore with Angular 10 because this fix has been added in 2.3.0 🙂
@SimonBrazell cordova’s platform browser is not a fully functional platform and we do not support it. Since most people seem to be working fine here, Im going to close this issue.