question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

promises don't resolve and driver is null

See original GitHub issue

Hi 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:closed
  • Created 5 years ago
  • Reactions:3
  • Comments:37 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
jbgtmartincommented, Aug 20, 2020

In my case, this is due to the fact that I use pouchdb in my project, which requires to add a polyfill for process:

// polyfills.ts
(window as any).process = {};

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 🙂

0reactions
mhartingtoncommented, Nov 25, 2020

@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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found