openwallet-foundation / openwallet-foundation/askar-wrapper-javascript

Cannot read property 'storeOpen' of undefined

Aperta
#48 2 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Lingua principale
TypeScript
Stelle
4
Fork
9
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

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

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Direzione di ricerca

Inizia riproducendo la configurazione Android con @credo-ts/askar 0.5.15, @credo-ts/react-native 0.5.15 e @openwallet-foundation/askar-react-native 0.3.2. Ispeziona AskarModuleConfig.d.ts e i punti di ingresso keyAeadEncrypt e storeOpen, quindi verifica che il modulo configurato superi i controlli TypeScript e apra il wallet senza l’errore a runtime.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
android, react-native, typescript
Ambito
mobile, security
Tipo di issue
Bug
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Ferma
Chiarezza
Da chiarire
Idoneità per principianti
28/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.