Skip to content

Cannot read property 'storeOpen' of undefined #48

@ismapolis

Description

@ismapolis

When I run my app, I get an error because I haven't installed @hyperledger/aries-askar-shared@0.2.3, which is required by @credo-ts/askar@0.5.15.
After installing that dependency, I run into a TypeScript incompatibility:

Type 'Askar' is not assignable to type 'AriesAskar'.
  The types returned by 'keyAeadEncrypt(...)' are incompatible between these types.
    Type '.../node_modules/@openwallet-foundation/askar-shared/build/crypto/EncryptedBuffer'.EncryptedBuffer
    is not assignable to type '.../node_modules/@hyperledger/aries-askar-shared/build/types'.EncryptedBuffer.
      Types have separate declarations of a private property 'buffer'.ts(2322)
AskarModuleConfig.d.ts(47, 5): The expected type comes from property 'ariesAskar' which is declared here

As a last resort, I tried casting the module:

ariesAskar: askar as any

But this causes a runtime error:

Error opening wallet mobile-wallet: Cannot read property 'storeOpen' of undefined

However, the native module doesn't seem to be undefined, because I'm able to call other methods like version:

Askar native module loaded: 0.4.1

How should I integrate @openwallet-foundation/askar-react-native with credo-ts?

Environment

  • Platform: Android
  • React Native: 0.77.0
  • @credo-ts/askar: 0.5.15
  • @credo-ts/core: 0.5.15
  • @credo-ts/react-native: 0.5.15
  • @openwallet-foundation/askar-react-native: 0.3.2
  • @hyperledger/aries-askar-shared: 0.2.3

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions