Skip to content
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

Spark fixes #984

Merged
merged 4 commits into from May 20, 2022
Merged

Spark fixes #984

merged 4 commits into from May 20, 2022

Conversation

kaloudis
Copy link
Contributor

Description

Missing config settings in the Spark backend file cause Zeus to crash or freeze on start-up. This PR also includes handling of LNURL auth calls when node implementations do not support it.

  • New feature
  • Bug fix
  • Code refactor
  • Configuration change
  • Locales update
  • Other

Checklist

  • I’ve run npm run tsc and made sure my code compiles correctly
  • I’ve run npm run lint and made sure my code didn’t contain any problematic patterns
  • I’ve run npm run prettier and made sure my code is formatted correctly
  • I’ve run npm run test and made sure all of the tests pass

Testing

If you modified or added a utility file, did you add new unit tests?

  • No, I’m a fool
  • Yes
  • N/A

I have tested this PR on the following platforms (please specify OS version and phone model/VM):

  • Android
  • iOS

I have tested this PR with the following types of nodes (please specify node version and API version where appropriate):

  • LND
  • c-lightning-REST
  • spark
  • Eclair
  • LndHub

Locales

  • I’ve added new locale text that requires translations
  • I’m aware that new translations should be made on the Zeus Transfix page and not directly to this repo

Third Party Dependencies and Packages

  • Contributors will need to run npm install after this PR is merged in
  • 3rd party dependencies have been modified:
    • verify that package.json and package-lock.json have been properly updated
    • verify that dependencies are installed for both iOS and Android platforms

Other:

  • Changes were made that require an update to the README
  • Changes were made that require an update to onboarding

@kaloudis kaloudis merged commit 4de55e6 into ZeusLN:master May 20, 2022
@kaloudis kaloudis deleted the spark-fixes branch May 20, 2022 22:02
@kobiebotha
Copy link

I was having issues with the App Store version so I took 0.6.5-rc1 on TestFlight for a spin.

TL;DR: there is progress, but it still seems broken.

Test setup [Zeus]:

  • iOS
  • Zeus 0.6.5-rc1

Test setup [LN node]:

  • CLN v0.11.0.1
  • Spark (unsure of version, probably latest though since launching it using npx spark-wallet)
  • Spark configured to run over TOR

Steps Followed:

  1. Configure node (host, access key and enable Use Tor toggle)
  2. Connect

Results [Zeus]:
image

Results [LN node]:

Spark log shows that there was a successful connection, albeit with an error response. Log entry below

LightningError: No method
    at createError (/Users/xxx/.npm/_npx/39a3a4862e48c2ca/node_modules/spark-wallet/node_modules/error/typed.js:40:22)
    at LightningClient.<anonymous> (/Users/xxx/.npm/_npx/39a3a4862e48c2ca/node_modules/spark-wallet/node_modules/clightning-client/index.js:122:28)
    at Object.onceWrapper (node:events:642:26)
    at LightningClient.emit (node:events:527:28)
    at Interface.<anonymous> (/Users/xxx/.npm/_npx/39a3a4862e48c2ca/node_modules/spark-wallet/node_modules/clightning-client/index.js:76:17)
    at Interface.emit (node:events:527:28)
    at [_onLine] [as _onLine] (node:internal/readline/interface:424:12)
    at [_normalWrite] [as _normalWrite] (node:internal/readline/interface:613:59)
    at Socket.ondata (node:internal/readline/interface:251:23)
    at Socket.emit (node:events:527:28)
POST /rpc 500 1.712 ms - 103
LightningError: No method
    at createError (/Users/xxx/.npm/_npx/39a3a4862e48c2ca/node_modules/spark-wallet/node_modules/error/typed.js:40:22)
    at LightningClient.<anonymous> (/Users/xxx/.npm/_npx/39a3a4862e48c2ca/node_modules/spark-wallet/node_modules/clightning-client/index.js:122:28)
    at Object.onceWrapper (node:events:642:26)
    at LightningClient.emit (node:events:527:28)
    at Interface.<anonymous> (/Users/xxx/.npm/_npx/39a3a4862e48c2ca/node_modules/spark-wallet/node_modules/clightning-client/index.js:76:17)
    at Interface.emit (node:events:527:28)
    at [_onLine] [as _onLine] (node:internal/readline/interface:424:12)
    at [_normalWrite] [as _normalWrite] (node:internal/readline/interface:613:59)
    at Socket.ondata (node:internal/readline/interface:251:23)
    at Socket.emit (node:events:527:28)
POST /rpc 500 1.431 ms - 103
LightningError: No method
    at createError (/Users/xxx/.npm/_npx/39a3a4862e48c2ca/node_modules/spark-wallet/node_modules/error/typed.js:40:22)
    at LightningClient.<anonymous> (/Users/xxx/.npm/_npx/39a3a4862e48c2ca/node_modules/spark-wallet/node_modules/clightning-client/index.js:122:28)
    at Object.onceWrapper (node:events:642:26)
    at LightningClient.emit (node:events:527:28)
    at Interface.<anonymous> (/Users/xxx/.npm/_npx/39a3a4862e48c2ca/node_modules/spark-wallet/node_modules/clightning-client/index.js:76:17)
    at Interface.emit (node:events:527:28)
    at [_onLine] [as _onLine] (node:internal/readline/interface:424:12)
    at [_normalWrite] [as _normalWrite] (node:internal/readline/interface:613:59)
    at Socket.ondata (node:internal/readline/interface:251:23)
    at Socket.emit (node:events:527:28)
POST /rpc 500 1.405 ms - 103

note: previously with the app store version of Zeus there wasn't even a connection being made to Spark at all, so this is definitely progress :)

@kobiebotha
Copy link

FWIW getting the same on 0.6.5-rc2

Testing this time I noticed that the wallet actually briefly flashes [see below] before showing the same red "no method" screen as above.
IMG_570BED372CD2-1

@kobiebotha
Copy link

kobiebotha commented Jun 11, 2022

Update: I'm able to reproduce this from source on the android emulator, so I was able to get some more useful information

image

All I can say for certain is that the catch() in FeeStore.ts->getFees() is what's causing this. Unfortunately my source maps aren't set up so debugging is slow going, but I'll update if I find anything more useful.

Note: since this is breaking in getFees, I wonder whether this could be breaking because the CLN node I'm connecting to is a clean installation from scratch with no channels, transactions or anything like that set up yet....

@kobiebotha
Copy link

kobiebotha commented Jun 12, 2022

I was able to narrow down the issue and fix it, now Zeus is working in Android simulator against my CLN node over tor with the Spark backend.

However my fix is in files that haven't changed in months both on the Zeus side and the Spark side. Which makes me think I've hit some kind of edge case. I'll therefore stop commenting on the PR and open an issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants