Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

storage.get never resolves when debugging ionic app with WKWebView from MacOS Safari #160

Open
ryaa opened this issue Dec 10, 2018 · 2 comments

Comments

@ryaa
Copy link

@ryaa ryaa commented Dec 10, 2018

My ionic app has been using '@ionic/storage' and cordova-sqlite-storage plugin combination for couple years and all seemed to be working fine until I upgraded to WKWebView.
After that, storage.get method invocations sometimes never resolves/rejects which breaks the application. This happens ONLY when debugging the ionic app built in dev mode, running on a real iOS device and using Safari from MacBook to attach to debug. Without debugging all works fine.

I played with IonicStorageModule.forRoot configuration and noticed that this problem happens ONLY when sqlite is used.
For example, the below in app.module.ts will cause the problem described above

imports: [
...
IonicStorageModule.forRoot({
      name: '<APP_NAME>',
      driverOrder: ['sqlite', 'websql', 'indexeddb']
    })
..
]

However the below works fine (with or without debugging)

imports: [
...
IonicStorageModule.forRoot({
      name: '<APP_NAME>',
      driverOrder: ['websql', 'indexeddb']
    })
..
]

Could there be a problem with WKWebView and sqlite combination?

@alhilali
Copy link

@alhilali alhilali commented Feb 24, 2019

I'm facing the same issue here with version 2.2.0 and cordova version 3.1.0.

Ionic:
ionic (Ionic CLI) : 4.10.3 (/usr/local/lib/node_modules/ionic)
Ionic Framework : @ionic/angular 4.0.2
@angular-devkit/build-angular : 0.13.3 (/Developer/Coding/Projects/FG/Frontend/node_modules/@angular-devkit/build-angular)
@angular-devkit/schematics : 7.2.4
@angular/cli : 7.3.3 (/Developer/Coding/Projects/FG/Frontend/node_modules/@angular/cli)
@ionic/angular-toolkit : 1.4.0

Cordova:
cordova (Cordova CLI) : 8.1.2 (cordova-lib@8.1.1)
Cordova Platforms : ios 4.5.5
Cordova Plugins : cordova-plugin-ionic-keyboard 2.1.3, cordova-plugin-ionic-webview 2.4.0, (and 5 other plugins)

System:
NodeJS : v11.8.0 (/usr/local/bin/node)
npm : 6.7.0
OS : macOS Mojave
Xcode : Xcode 10.1 Build version 10B61

@nascarjake
Copy link

@nascarjake nascarjake commented Jan 21, 2020

Same issue here

Cant debug and sometimes it craps out even if I have my debugger open debugging another line in another part of the code. If the debugger ever pauses the code, theres a high chance the SQLite callbacks will break.

Ionic:

Ionic CLI : 5.4.5 (/usr/local/lib/node_modules/ionic)
Ionic Framework : @ionic/angular 4.11.3
@angular-devkit/build-angular : 0.802.2
@angular-devkit/schematics : 8.3.17
@angular/cli : 8.2.2
@ionic/angular-toolkit : 2.1.1

Cordova:

Cordova CLI : 9.0.0 (cordova-lib@9.0.1)
Cordova Platforms : android 8.1.0, ios 5.1.1
Cordova Plugins : cordova-plugin-ionic-keyboard 2.2.0, cordova-plugin-ionic-webview 4.1.3, (and 38 other plugins)

Utility:

cordova-res : not installed
native-run : not installed

System:

ios-sim : 8.0.2
NodeJS : v10.16.1 (/usr/local/bin/node)
npm : 6.9.0
OS : macOS Catalina
Xcode : Xcode 11.3.1 Build version 11C504

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.