openwallet-foundation / openwallet-foundation/askar-wrapper-javascript
Cannot read property 'storeOpen' of undefined
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- TypeScript
- Sterne
- 4
- Forks
- 9
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
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
Beitragsleitfaden
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Beginne damit, das Android-Setup mit @credo-ts/askar 0.5.15, @credo-ts/react-native 0.5.15 und @openwallet-foundation/askar-react-native 0.3.2 zu reproduzieren. Untersuche AskarModuleConfig.d.ts sowie die Einstiegspunkte keyAeadEncrypt und storeOpen. Überprüfe anschließend, dass das konfigurierte Modul die TypeScript-Prüfungen besteht und die Wallet ohne den Laufzeitfehler öffnet.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- android, react-native, typescript
- Bereich
- mobile, security
- Issue-Typ
- Bug
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Muss geklärt werden
- Anfängerfreundlichkeit
- 28/100