Answer by Nylah Snow
I am still getting an error : (node:12884) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 6): Error: No available storage method found. I’m using v1.50
Update: The error actually only occurs when using react-snapshot lib,Assuming we have similar root causes, I traced the unhandled promise rejection warning to the following: ,The unhandled promise rejection comes from the promise returned (but ignored) by invoking .then above. In my case, this path was reached by passing a callback to localforage.ready:
localforage.ready(() => {
// ...
}).catch(() => {
// ...
});
Answer by Jesus Jaramillo
Below solution is working fine for me.
Please add below code in the app.module.ts,Asking for help, clarification, or responding to other answers.,
Review queue workflows — Final release
Below solution is working fine for me.
Please add below code in the app.module.ts
import { Drivers } from '@ionic/storage';
IonicStorageModule.forRoot({
name: '__mydb',
driverOrder: [Drivers.IndexedDB, Drivers.LocalStorage]
}),
Answer by Kingsley Nixon
Ask
questionsError: No available storage method found
,if I use «@ ionic/storage», I get the following error during the test run with «JEST». (All tests work.),PS: Only the storage needs to be injected to trigger this error.
if I use «@ ionic/storage», I get the following error during the test run with «JEST». (All tests work.)
console.error node_modules/zone.js/dist/zone.js:682
Unhandled Promise rejection: No available storage method found. ; Zone: <root> ; Task: Promise.then ; Value: Error: No available storage method found.
at /home/telran/Projekte/app/node_modules/@ionic/storage/node_modules/localforage/dist/localforage.js:2247:25
at ZoneDelegate.Object.<anonymous>.ZoneDelegate.invoke (/home/telran/Projekte/app/node_modules/zone.js/dist/zone.js:390:26) Error: No available storage method found.
at /home/telran/Projekte/app/node_modules/@ionic/storage/node_modules/localforage/dist/localforage.js:2247:25
at ZoneDelegate.Object.<anonymous>.ZoneDelegate.invoke (/home/telran/Projekte/app/node_modules/zone.js/dist/zone.js:390:26)
console.error node_modules/zone.js/dist/zone.js:682
Unhandled Promise rejection: No available storage method found. ; Zone: <root> ; Task: Promise.then ; Value: Error: No available storage method found.
at /home/telran/Projekte/app/node_modules/@ionic/storage/node_modules/localforage/dist/localforage.js:2247:25
at ZoneDelegate.Object.<anonymous>.ZoneDelegate.invoke (/home/telran/Projekte/app/node_modules/zone.js/dist/zone.js:390:26) Error: No available storage method found.
at /home/telran/Projekte/app/node_modules/@ionic/storage/node_modules/localforage/dist/localforage.js:2247:25
at ZoneDelegate.Object.<anonymous>.ZoneDelegate.invoke (/home/telran/Projekte/app/node_modules/zone.js/dist/zone.js:390:26)
Storage.service.ts
public constructor(@Inject(Storage) private storage: IStorage) {
}
Storage.service.ts
public constructor(@Inject(Storage) private storage: IStorage) {
}
app.module.ts
IonicStorageModule.forRoot({
name: 'storage',
driverOrder: ['sqlite', 'websql'],
}),
Answer by Aurelia Jacobs
I am getting below error when i am using Storage in web.,Check this, I am using storage in web and it’s working. Just followed steps from this tutorial: https://ionicframework.com/docs/v2/storage/,Thanks Adithya. According to ionic 2 doc https://ionicframework.com/docs/v2/storage/ we can use it for web as well. I want to see what is causing the error, when using in web.
Why are you doing this? I can’t think of any situation where I would want localStorage
involved in an Ionic app.
localStorage
Answer by Whitley Davidson
I think for some reason Cometchat Pro Javascript SDK is using local storage.
Does Cometchat Pro Javascript SDK support running without local storage?,@paco89lol CometChat should work perfectly in Incognito mode as well. While we use localstorage, it is supported in Incognito mode.,Are you using CometChat in an iframe? If yes, then you will have to allow third-party cookies (which includes localstorage).
More Details Refer
Answer by Kayleigh Pugh
MS Flow : No available storage method found.
,When ever I am trying to create MS Flow I am receiving this error message when I add any action to it.,Error-messgae-on-Action-No-available-storage-method
More Details Refer
Answer by Lucy Johnson
Got the issue when running the ionic sample tab app as a browser pwa on iOS Safari with indexeddb or sqllite as associated database (in app.module.ts). It also occurs in chrome iOS developer-view. In contrast, the bug does not occur on Chrome Desktop or on Android.,As a workaround we uninstalled ionic-storage and are using dexie.js so far (which works without any problems),Whats wrong here? Does iOS WebView not support indexeddb and sqlite?
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: '__mydb',
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"
}
Answer by Collins Erickson
More Details Refer
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
Answers of > No available storage method found
I am still getting an error : (node:12884) w3coded angular storage UnhandledPromiseRejectionWarning: Unhandled w3coded angular storage promise rejection (rejection id: 6): Error: No w3coded angular storage available storage method found. I’m using w3coded angular storage v1.50
Update: The error actually only occurs w3coded angular storage when using react-snapshot lib,Assuming we have w3coded angular storage similar root causes, I traced the unhandled w3coded angular storage promise rejection warning to the following: ,The w3coded angular storage unhandled promise rejection comes from the w3coded angular storage promise returned (but ignored) by invoking .then w3coded angular storage above. In my case, this path was reached by w3coded angular storage passing a callback to localforage.ready:
localforage.ready(() => {
// ...
}).catch(() => {
// ...
});
localforage.ready().then(() => {
// ...
}).catch(() => {
// ...
});
See localForage/localForage#722.
* remove "Network status set to (true|false)" message
This was originally added in a bid to track down a now resolved issue,
and thus is no longer needed.
* work around UnhandledPromiseRejectionWarning errors from localforage
See localForage/localForage#722.
* fix missing props in tests
* skip passing showEmailAddress from ProfilePopver to the Popover bootstrap component
* eliminate unneeded warning in getPrefix
* fix spurious state in rhs reducer tests
* leverage jest-canvas-mock to avoid warnings from the doughnut chart
* fail the build on console messages
* Revert "skip passing showEmailAddress from ProfilePopver to the Popover bootstrap component"
This reverts commit 73b5fcb.
* just remove showEmailAddress in the profile popover unit tests
* define STORE_REHYDRATION_FAILED locally vs. in mattermost-redux, for now
* fix recently broken unit tests
self._driver = driver._driver;
setDriverToConfig();
self._wrapLibraryMethodsWithReady();
self._initDriver = initDriver(supportedDrivers);
});
})["catch"](function () {
setDriverToConfig();
var error = new Error('No available storage method found.'); // This line triggers an error
self._driverSet = Promise$1.reject(error);
return self._driverSet;
});
import * as localforage from 'localforage';
import * as memoryDriver from 'localforage-driver-memory';
localforage.defineDriver(memoryDriver);
localforage.setDriver(memoryDriver._driver);