-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
make mobile fails #5077
Comments
I suspect that the |
I think that only works for Linux but I couldn't find any information in the docs for macOS. I still tried to add the docker user group and add the root user but doesn't seem to work. Docker itself can run but during runtime it needs to read files requiring root privileges:
|
Looks like something is wrong with your docker setup. Can you try |
I fixed it by removing I imported the library into my project but whenever calling the native
My code to call it:
I tried it on a physical device (arm-v7) and an emulator (arm64). Crash log on arm-v7:
That doesn't really help figuring out what's causing the crash since it's caused somewhere in the native code. Is there a way to get more specific information about what actually causes the crash? |
@madhms What version of I haven't tried go 1.16 on mobile yet, unfortunately. Can you try using |
Looks like you are experiencing a React Issue: facebook/react-native#24097 I would try to update your React setup, perhaps try to isolate the issue with a smaller native module than LND then file an issue on their repo. |
I created a native Android project but still happening, the error probably just means that React loses connection to the native driver because of the crash. I tested it on API 22 and 25. For some reason I can't display the gomobile version but that's probably a bug. I also tried someone else's compiled library but it still crashes. If you can upload your library I could try to see if it's a compilation issue. |
@madhms Do you have a lnd conf file set? My hunch is that lnd fails to start because something is wrong with your config. If this causes you app to shut down, then you might not see what the actual problem is. I modified the code you posted and ran it with my own compiled library. Had to add a few startup args to get it to start on the emulator: final String args = "--lnddir=" + appDir + " --bitcoin.active --bitcoin.testnet --bitcoin.node=neutrino --norest --nolisten"; |
Okay that seems to work. In your article you're stating that these two dependencies are required to generate the data passed to the native functions:
They require min SDK 26. Would it be possible to generate the byte array in the Javascript version and pass it to the native function? |
@madhms Absolutely! This is done in several apps, you can generate the bytes in any language you want using a protobuf library, then pass them to lnd. Btw, I realized the reason you didn't see the error before the app crashes is because we hard exit if it happens. I created a PR to resolve this: #5086 |
Background
Building Android & IOS libraries fails. I cloned lnd into the GOPATH src like so:
Output:
Your environment
The text was updated successfully, but these errors were encountered: