Skip to content

bug: unimplemented on android #629

Open
@ALR2310

Description

@ALR2310

Plugin version:

@capacitor-community/sqlite 7.0.0

Platform(s):

Mobile - Android

Current behavior:

UNIMPLEMENTED when init db

Image

Expected behavior:

Init db success

Steps to reproduce:

Image

Related code:

const db = {
  init: async () => {
    if (dbInstance) return dbInstance;

    try {
      if (Capacitor.getPlatform() == 'web') {
        defineCustomElements(window);
        await sqlite.initWebStore();
      }

      const ret = await sqlite.checkConnectionsConsistency();
      if (!ret.result && Capacitor.getPlatform() == 'web') {
        dbInstance = await createConnection();
      }
      dbInstance = dbInstance ?? (await createConnection());

      await dbInstance.open();
      console.log('Database initialized successfully');
      return dbInstance;
    } catch (e) {
      console.error('Error initializing database', e);
      throw e;
    }
  },
}

Other information:

Capacitor doctor:

   Capacitor Doctor   

Latest Dependencies:

  @capacitor/cli: 7.1.0
  @capacitor/core: 7.1.0
  @capacitor/android: 7.1.0
  @capacitor/ios: 7.1.0

Installed Dependencies:

  @capacitor/ios: not installed
  @capacitor/cli: 7.1.0
  @capacitor/android: 7.0.1
  @capacitor/core: 7.0.1

[success] Android looking great! 👌

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions