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

Indexeddb SQLite Error: "No available storage method found" (iOS PWA) #176

Open
phonic opened this issue Oct 1, 2019 · 1 comment
Open

Indexeddb SQLite Error: "No available storage method found" (iOS PWA) #176

phonic opened this issue Oct 1, 2019 · 1 comment

Comments

@phonic
Copy link

@phonic phonic commented Oct 1, 2019

Got the issue when running the ionic sample tab app as a browser pwa on iOS.

It also occurs in chrome iOS webview as well as on iphone safari browser.
The bug does not occur on Chrome Desktop or on Android.

The error log from the chrome console;

core.js:9110 ERROR Error: Uncaught (in promise): Error: No available storage method found. Error: No available storage method found. at localforage.js:2743 at ZoneDelegate.invoke (zone-evergreen.js:359) at Object.onInvoke (core.js:34201) at ZoneDelegate.invoke (zone-evergreen.js:358) at Zone.run (zone-evergreen.js:124) at zone-evergreen.js:855 at ZoneDelegate.invokeTask (zone-evergreen.js:391) at Object.onInvokeTask (core.js:34182) at ZoneDelegate.invokeTask (zone-evergreen.js:390) at Zone.runTask (zone-evergreen.js:168) at resolvePromise (zone-evergreen.js:797) at zone-evergreen.js:707 at ionic-storage.js:127 at ZoneDelegate.invoke (zone-evergreen.js:359) at Object.onInvoke (core.js:34201) at ZoneDelegate.invoke (zone-evergreen.js:358) at Zone.run (zone-evergreen.js:124) at zone-evergreen.js:855 at ZoneDelegate.invokeTask (zone-evergreen.js:391) at Object.onInvokeTask (core.js:34182)

app.module.ts

`import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { RouteReuseStrategy } from '@angular/router';
import { IonicModule, IonicRouteStrategy } from '@ionic/angular';
import { SplashScreen } from '@ionic-native/splash-screen/ngx';
import { StatusBar } from '@ionic-native/status-bar/ngx';
import { IonicStorageModule } from '@ionic/storage';
import { AppRoutingModule } from './app-routing.module';
import { AppComponent } from './app.component';

@NgModule({
declarations: [AppComponent],
entryComponents: [],
imports: [BrowserModule, IonicModule.forRoot(), AppRoutingModule,IonicStorageModule.forRoot({
name: '__mystabildb',
driverOrder: ['indexeddb', 'sqlite']
})],
providers: [
StatusBar,
SplashScreen,
{ provide: RouteReuseStrategy, useClass: IonicRouteStrategy }
],
bootstrap: [AppComponent]
})
export class AppModule {}

`
package.json

{ "name": "db-test", "version": "0.0.1", "author": "Ionic Framework", "homepage": "https://ionicframework.com/", "scripts": { "ng": "ng", "start": "ng serve", "build": "ng build", "test": "ng test", "lint": "ng lint", "e2e": "ng e2e" }, "private": true, "dependencies": { "@angular/common": "~8.1.2", "@angular/compiler": "~8.1.2", "@angular/core": "~8.1.2", "@angular/forms": "~8.1.2", "@angular/platform-browser": "~8.1.2", "@angular/platform-browser-dynamic": "~8.1.2", "@angular/router": "~8.1.2", "@ionic-native/core": "^5.0.0", "@ionic-native/splash-screen": "^5.0.0", "@ionic-native/status-bar": "^5.0.0", "@ionic/angular": "^4.7.1", "@ionic/storage": "^2.2.0", "core-js": "^2.5.4", "rxjs": "~6.5.1", "tslib": "^1.9.0", "zone.js": "~0.9.1" }, "devDependencies": { "@angular-devkit/architect": "~0.801.2", "@angular-devkit/build-angular": "~0.801.2", "@angular-devkit/core": "~8.1.2", "@angular-devkit/schematics": "~8.1.2", "@angular/cli": "~8.1.2", "@angular/compiler": "~8.1.2", "@angular/compiler-cli": "~8.1.2", "@angular/language-service": "~8.1.2", "@ionic/angular-toolkit": "~2.0.0", "@types/jasmine": "~3.3.8", "@types/jasminewd2": "~2.0.3", "@types/node": "~8.9.4", "codelyzer": "^5.0.0", "jasmine-core": "~3.4.0", "jasmine-spec-reporter": "~4.2.1", "karma": "~4.1.0", "karma-chrome-launcher": "~2.2.0", "karma-coverage-istanbul-reporter": "~2.0.1", "karma-jasmine": "~2.0.1", "karma-jasmine-html-reporter": "^1.4.0", "protractor": "~5.4.0", "ts-node": "~7.0.0", "tslint": "~5.15.0", "typescript": "~3.4.3" }, "description": "An Ionic project" }

As a workaround we uninstalled ionic-storage and are using dexie.js so far (which works without any problems)

@phonic phonic changed the title Indexeddb Error: No available storage method found (Chrome iOS View) Indexeddb SQLite Error: "No available storage method found" (iOS PWA) Oct 2, 2019
@alitalaee
Copy link

@alitalaee alitalaee commented Feb 11, 2020

it is really easy just :
add ‘localstorage’ to driverOrder
like this::
** IonicStorageModule.forRoot({**
** name: “Database”,**
** driverOrder: [“indexeddb”, “localstorage”]**
** }),**

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
2 participants
You can’t perform that action at this time.