typeorm / ionic-example

Example project to demonstrate TypeORM in an Ionic app
67 stars 56 forks source link

Cannot read property 'openDatabase' of undefined #21

Closed El-kady closed 6 years ago

El-kady commented 6 years ago

It works fine at web browser, but when im trying to deploy it at android, it says

Uncaught (in promise): TypeError: Cannot read property 'openDatabase' of undefined TypeError: Cannot read property 'openDatabase' of undefined at http://192.168.43.239:8100/build/vendor.js:194991:26 at new t (http://192.168.43.239:8100/build/polyfills.js:3:21506) at CordovaDriver.createDatabaseConnection (http://192.168.43.239:8100/build/vendor.js:194986:16) at CordovaDriver.<anonymous> (http://192.168.43.239:8100/build/vendor.js:47853:51) at step (http://192.168.43.239:8100/build/vendor.js:47727:23) at Object.next (http://192.168.43.239:8100/build/vendor.js:47708:53) at http://192.168.43.239:8100/build/vendor.js:47702:71 at new t (http://192.168.43.239:8100/build/polyfills.js:3:21506) at __awaiter (http://192.168.43.239:8100/build/vendor.js:47698:12) at CordovaDriver.AbstractSqliteDriver.connect (http://192.168.43.239:8100/build/vendor.js:47847:16)

here is my ionic info

cli packages: (/usr/lib/node_modules)

    @ionic/cli-utils  : 1.9.2
    ionic (Ionic CLI) : 3.9.2

global packages:

    Cordova CLI : 7.0.1 

local packages:

    @ionic/app-scripts : 3.1.9
    Cordova Platforms  : android 6.2.3 browser 4.1.0
    Ionic Framework    : ionic-angular 3.9.2

System:

    Android SDK Tools : 25.2.5
    Node              : v6.10.0
    npm               : 3.10.10 
    OS                : Linux 3.13
El-kady commented 6 years ago

i solved it by moving rootPage = "HomePage" at the end of platform.isready

pleerock commented 6 years ago

I guess it can be closed then.

marzoukiniz commented 5 years ago

moving rootPage = "HomePage" at the end of platform.isready does not fix the issue, I'm still getting the same error