AbsaOSS / rn-indy-sdk

This code was starting point of https://github.com/hyperledger/indy-sdk-react-native where the work continues.
Apache License 2.0
11 stars 6 forks source link

Error while creating indy wallet in mobile react-native #11

Closed sairanjit closed 3 years ago

sairanjit commented 4 years ago

02-24 18:06:36.238 31678 31773 W com.sun.jna.Native: JNA: Callback org.hyperledger.indy.sdk.wallet.Wallet$1@f549fed threw the following exception 02-24 18:06:36.238 31678 31773 W com.sun.jna.Native: java.lang.UnsatisfiedLinkError: Error looking up function 'indy_get_current_error': undefined symbol: indy_get_current_error Screenshot from 2020-02-24 18-18-03

karimStekelenburg commented 3 years ago

@sairanjit Did you manage to solve this issue? I'm running into the same problem..

TheArhaam commented 3 years ago

@sairanjit @karimStekelenburg I seem to be facing the same issue, any updates?

karimStekelenburg commented 3 years ago

@TheArhaam I am not sure what the exact fix is. But my lovely colleague Timo Glastra got it to work on Android. He has a fork with an example directory that holds a working example app that uses rn-indy-sdk.

You might want to compare how Indy is imported in the onCreate() method in this file.

Hope it helps!

TheArhaam commented 3 years ago

@karimStekelenburg I cloned that repo and it seems to be working, thank you for that. So there is nothing wrong with the SDK from what I can tell, it's just that "indy" wasn't being imported properly in the native code right?

It's been a while since I've worked with java & android so I apologize if it's a silly question haha 😄

karimStekelenburg commented 3 years ago

No problem! I'm not that experienced with Android myself either, but yes that is what I suspect. I'll ping my colleague to get you a solid answer to your question. ;-)

TimoGlastra commented 3 years ago

As @karimStekelenburg already mentioned the SDK is working as expected. The installation guide for Android is missing some steps. The fork I made contains an update readme with the required steps. Do note however that that guide expects the binaries to be included in rn-indy-sdk, which is the case in my fork, but not the case in this repo. You'll still need to copy the binaries to android/app/src/main/jniLibs.

TheArhaam commented 3 years ago

@karimStekelenburg Haha! Thank you 😃 @TimoGlastra Thank you for the clarification! 😄 I was able to get it running, I was just curious as to what the issue was, your fork did help me 😄

Also, have you tested this out with mediator/edge agents? I'm still figuring out what all can be achieved using this SDK. My end goal is to prepare an Aries Mobile Agent (AMA) that can communicate with Aries Cloud Agents (ACA), do you think it's possible at this point?

I would love to discuss this further, would it be alright if I got in touch with you over Email? 😄

TimoGlastra commented 3 years ago

What do you mean exactly with mediator/edge agents? Basically this SDK allows you to do everything you can do with indy SDK for NodeJS, but in React Native.

For the mobile agent part you should use aries-framework-javascript that makes use of rn-indy-sdk. Aries Framework JavaScript can be used with a cloud agent, but I haven't tested it with a mediator in between.

I recently added aries-framework-javascript to aries-agent-test-harness which allow it to make a connection with an ACA-Py instance.

TheArhaam commented 3 years ago

@TimoGlastra Oh I see 🤔, it seems like I was slightly misinformed haha 😅, thank you so much for pointing that out to me.

So using the aries-framework-javascript and rn-indy-sdk, I should be able to set up a mobile agent which can communicate with other agents through a mediator right? I understand that it's still under development so just wanted to know as of now what all can be achieved on the Mobile Agent side using the two.

I will be taking a look at aries-agent-test-harness, thank you for mentioning it.

sairanjit commented 3 years ago

Hey @TimoGlastra @karimStekelenburg @TheArhaam it's running now perfectly from https://github.com/AbsaOSS/rn-indy-sdk/issues/11#issuecomment-699627750