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

Cannot read property 'openDatabase' of undefined Test in device #32

Open
marzoukiniz opened this issue Jan 17, 2019 · 2 comments
Open

Comments

@marzoukiniz
Copy link

Cannot read property 'openDatabase' of undefined TypeError TypeError: Cannot read
property 'openDatabase' of undefined ) at CordovaDriver.createDatabaseConnection

@willyguevara
Copy link

willyguevara commented Nov 17, 2020

Same problem with me.

ERROR Error: Uncaught (in promise): TypeError: Cannot read property 'openDatabase' of undefined
TypeError: Cannot read property 'openDatabase' of undefined
    at vendor.js:168847
    at new t (polyfills.js:3)
    at CordovaDriver.createDatabaseConnection (vendor.js:168842)
    at CordovaDriver.<anonymous> (vendor.js:35867)
    at step (vendor.js:228)
    at Object.next (vendor.js:209)
    at vendor.js:202
    at new t (polyfills.js:3)
    at __awaiter (vendor.js:198)
    at CordovaDriver.AbstractSqliteDriver.connect (vendor.js:35861)
    at c (polyfills.js:3)
    at polyfills.js:3
    at polyfills.js:3
    at t.invoke (polyfills.js:3)
    at Object.onInvoke (vendor.js:4446)
    at t.invoke (polyfills.js:3)
    at r.run (polyfills.js:3)
    at polyfills.js:3
    at t.invokeTask (polyfills.js:3)
    at Object.onInvokeTask (vendor.js:4437)

ionic info:

Ionic:

   Ionic CLI          : 6.12.1 (/Users/user/.nvm/versions/node/v14.4.0/lib/node_modules/@ionic/cli)
   Ionic Framework    : ionic-angular 3.7.0
   @ionic/app-scripts : 3.2.4

Cordova:

   Cordova CLI       : 10.0.0
   Cordova Platforms : android 9.0.0
   Cordova Plugins   : no whitelisted plugins (5 plugins total)

Utility:

   cordova-res (update available: 0.15.2) : 0.15.1
   native-run (update available: 1.2.2)   : 1.0.0

System:

   Android SDK Tools : 26.1.1 (/Users/user/Library/AndroidStudio/Android/sdk)
   ios-deploy        : 1.11.2
   NodeJS            : v14.4.0 (/Users/user/.nvm/versions/node/v14.4.0/bin/node)
   npm               : 6.14.5
   OS                : macOS Catalina
   Xcode             : Xcode 12.1 Build version 12A7403

@willyguevara
Copy link

willyguevara commented Nov 26, 2020

i solve my issues with the following steps using ionic 5

  1. Install the plugin
ionic cordova plugin add cordova-sqlite-storage --save
  1. Install TypeORM
npm install typeorm --save
  1. Install node.js-Types
npm install @types/node --save-dev
  1. Add "typeRoots": ["node_modules/@types"] to your tsconfig.json under compilerOptions
  2. Open tsconfig.app.json file and in compilerOptions --> types add "node" to the array

if you get runtime error global is undefined in my case in buffer module;
edit file /node_modules/buffer/index.js and add at the top window.global = window;

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

No branches or pull requests

2 participants