react-native-lightning icon indicating copy to clipboard operation
react-native-lightning copied to clipboard

App crashes when pressing "Start LND"

Open ademcan opened this issue 4 years ago • 7 comments

I am trying to replicate the example App.tsx in our own app and as soon as I tap the "Start LND" button the app crashes with the following message on the command line Screenshot 2021-04-20 at 17 22 31

and the following one on XCode: Screenshot 2021-04-20 at 17 23 10

Is there anything we need to add in XCode to make this work?

ademcan avatar Apr 20 '21 15:04 ademcan

I believe that's an error from Lndmobile. Are you passing in any custom config options? If you leave the customFields as an empty object it'll use a working default.

I just added this to a blank project and it does start up LND:

const customFields = {};
  const lndConf = new LndConf(ENetworks.testnet, customFields);
  lnd.start(lndConf).then(res => {
    alert(JSON.stringify(res));
  });

Jasonvdb avatar Apr 20 '21 15:04 Jasonvdb

I am actually using the example from App.tsx, which has something similar:

Screenshot 2021-04-20 at 17 36 38

ademcan avatar Apr 20 '21 15:04 ademcan

That's really strange. After pod install and a clean build?

Jasonvdb avatar Apr 20 '21 15:04 Jasonvdb

A clean build didn't help either, the app just closes as soon as the "Start LND" button is pressed with the messages mentioned above. I am wondering if one needs to give some sort of permissions or capabilities to the app to access some folders...

ademcan avatar Apr 20 '21 15:04 ademcan

Do we need to do anything to enable some Swift related options?

ademcan avatar Apr 20 '21 15:04 ademcan

Are you running on a simulator or real device? It's possible if it's a physical device you may need to disable bitcode in xcode. Screenshot 2021-04-20 at 22 13 10

Can you replicate on Android?

If this doesn't work maybe we should make a test repo where you can replicate these sort of bugs so I can jump in and try figure out what's going on.

Jasonvdb avatar Apr 20 '21 20:04 Jasonvdb

Just tested on Android and it works, I can start LND, yesss! This looks like an iOS specific issue indeed.

ademcan avatar Apr 21 '21 08:04 ademcan