Tonomy-Foundation / Tonomy-ID

Tonomy ID is the cross-platform mobile wallet (Android and iOS) for public and private Antelope blockchains. This application allows you to sign transactions on the block chain, share your DID and Verifiable Credentials containing your identity with others in a consensual way and log into web2 and web3 applications.
Apache License 2.0
13 stars 1 forks source link

Fix app crashing on staging #893

Closed theblockstalk closed 8 months ago

theblockstalk commented 8 months ago

Private Zenhub Image

Android Bundling complete 391ms
 ERROR  Your app just crashed. See the error below.
com.facebook.react.common.JavascriptException: Invariant Violation: "main" has not been registered. This can happen if:
* Metro (the local dev server) is run from the wrong folder. Check if Metro is running, stop it and restart it in the current project.
* A module failed to load due to an error and `AppRegistry.registerComponent` wasn't called., js engine: hermes, stack:
anonymous@12:368
runApplication@208:2180
value@33:3884
anonymous@33:761
value@33:2590
value@33:732

  com.facebook.react.modules.core.ExceptionsManagerModule.reportException(ExceptionsManagerModule.java:65)
  java.lang.reflect.Method.invoke(Native Method)
  com.facebook.react.bridge.JavaMethodWrapper.invoke(JavaMethodWrapper.java:372)
  com.facebook.react.bridge.JavaModuleWrapper.invoke(JavaModuleWrapper.java:188)
  com.facebook.jni.NativeRunnable.run(Native Method)
  android.os.Handler.handleCallback(Handler.java:938)
  android.os.Handler.dispatchMessage(Handler.java:99)
  com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(MessageQueueThreadHandler.java:27)
  android.os.Looper.loop(Looper.java:246)
  com.facebook.react.bridge.queue.MessageQueueThreadImpl$4.run(MessageQueueThreadImpl.java:228)
  java.lang.Thread.run(Thread.java:923)

this is when run local staging app in production mode, per README.md notes

theblockstalk commented 8 months ago

this is happening from non-developer mode not using JS-minify is not the problem

theblockstalk commented 8 months ago

this is the last sucessfull release to master https://github.com/Tonomy-Foundation/Tonomy-ID/pull/875

and this is the chages since that commit: https://github.com/Tonomy-Foundation/Tonomy-ID/compare/473dcff8ad7ba66f1c68f2f4c92684e2067b0c9a...development

on the development branch, when the Drawer (with UserHome) in it is commented out, then the app stops crashing https://github.com/Tonomy-Foundation/Tonomy-ID/blob/development/src/navigation/Root.tsx#L171

theblockstalk commented 8 months ago

I folllow these instructions https://github.com/Tonomy-Foundation/Tonomy-ID#run-staging-or-demo-and-see-debug-logs-android-only and then run Tonomy ID staging from play store and get:

adb logcat -s ReactNative:V ReactNativeJS:V

11-02 14:05:32.409 31869 32208 E ReactNativeJS: { [SdkError: AccountDoesntExist: Account "null" not found] code: 'AccountDoesntExist', name: 'SdkError' }
11-02 14:05:32.410 31869 32208 I ReactNativeJS: '{\n  "code": "AccountDoesntExist",\n  "name": "SdkError"\n}', false
11-02 14:05:32.440 31869 32208 E ReactNativeJS: { [SdkError: AccountDoesntExist: Account "null" not found] code: 'AccountDoesntExist', name: 'SdkError' }
11-02 14:05:32.441 31869 32208 I ReactNativeJS: '{\n  "code": "AccountDoesntExist",\n  "name": "SdkError"\n}', false
11-02 14:05:32.469 31869 32208 E ReactNativeJS: { [SdkError: AccountDoesntExist: Account "null" not found] code: 'AccountDoesntExist', name: 'SdkError' }
11-02 14:05:32.470 31869 32208 I ReactNativeJS: '{\n  "code": "AccountDoesntExist",\n  "name": "SdkError"\n}', false
11-02 14:05:32.498 31869 32208 E ReactNativeJS: { [SdkError: AccountDoesntExist: Account "null" not found] code: 'AccountDoesntExist', name: 'SdkError' }
11-02 14:05:32.499 31869 32208 I ReactNativeJS: '{\n  "code": "AccountDoesntExist",\n  "name": "SdkError"\n}', false
11-02 14:05:32.529 31869 32208 E ReactNativeJS: { [SdkError: AccountDoesntExist: Account "null" not found] code: 'AccountDoesntExist', name: 'SdkError' }
11-02 14:05:32.530 31869 32208 I ReactNativeJS: '{\n  "code": "AccountDoesntExist",\n  "name": "SdkError"\n}', false
11-02 14:05:32.558 31869 32208 E ReactNativeJS: { [SdkError: AccountDoesntExist: Account "null" not found] code: 'AccountDoesntExist', name: 'SdkError' }
11-02 14:05:32.559 31869 32208 I ReactNativeJS: '{\n  "code": "AccountDoesntExist",\n  "name": "SdkError"\n}', false
11-02 14:05:32.587 31869 32208 E ReactNativeJS: { [SdkError: AccountDoesntExist: Account "null" not found] code: 'AccountDoesntExist', name: 'SdkError' }
11-02 14:05:32.588 31869 32208 I ReactNativeJS: '{\n  "code": "AccountDoesntExist",\n  "name": "SdkError"\n}', false
11-02 14:05:32.619 31869 32208 E ReactNativeJS: { [SdkError: AccountDoesntExist: Account "null" not found] code: 'AccountDoesntExist', name: 'SdkError' }
11-02 14:05:32.620 31869 32208 I ReactNativeJS: '{\n  "code": "AccountDoesntExist",\n  "name": "SdkError"\n}', false
11-02 14:05:32.648 31869 32208 E ReactNativeJS: { [SdkError: AccountDoesntExist: Account "null" not found] code: 'AccountDoesntExist', name: 'SdkError' }
11-02 14:05:32.649 31869 32208 I ReactNativeJS: '{\n  "code": "AccountDoesntExist",\n  "name": "SdkError"\n}', false
11-02 14:05:32.677 31869 32208 E ReactNativeJS: { [SdkError: AccountDoesntExist: Account "null" not found] code: 'AccountDoesntExist', name: 'SdkError' }
11-02 14:05:32.678 31869 32208 I ReactNativeJS: '{\n  "code": "AccountDoesntExist",\n  "name": "SdkError"\n}', false
11-02 14:05:32.709 31869 32208 E ReactNativeJS: { [SdkError: AccountDoesntExist: Account "null" not found] code: 'AccountDoesntExist', name: 'SdkError' }
11-02 14:05:32.710 31869 32208 I ReactNativeJS: '{\n  "code": "AccountDoesntExist",\n  "name": "SdkError"\n}', false
11-02 14:05:32.738 31869 32208 E ReactNativeJS: { [SdkError: AccountDoesntExist: Account "null" not found] code: 'AccountDoesntExist', name: 'SdkError' }
11-02 14:05:32.739 31869 32208 I ReactNativeJS: '{\n  "code": "AccountDoesntExist",\n  "name": "SdkError"\n}', false
11-02 14:05:32.767 31869 32208 E ReactNativeJS: { [SdkError: AccountDoesntExist: Account "null" not found] code: 'AccountDoesntExist', name: 'SdkError' }
11-02 14:05:32.768 31869 32208 I ReactNativeJS: '{\n  "code": "AccountDoesntExist",\n  "name": "SdkError"\n}', false
11-02 14:05:32.799 31869 32208 E ReactNativeJS: { [SdkError: AccountDoesntExist: Account "null" not found] code: 'AccountDoesntExist', name: 'SdkError' }
11-02 14:05:32.800 31869 32208 I ReactNativeJS: '{\n  "code": "AccountDoesntExist",\n  "name": "SdkError"\n}', false
11-02 14:05:32.829 31869 32208 E ReactNativeJS: { [SdkError: AccountDoesntExist: Account "null" not found] code: 'AccountDoesntExist', name: 'SdkError' }
11-02 14:05:32.830 31869 32208 I ReactNativeJS: '{\n  "code": "AccountDoesntExist",\n  "name": "SdkError"\n}', false
11-02 14:05:32.858 31869 32208 E ReactNativeJS: { [SdkError: AccountDoesntExist: Account "null" not found] code: 'AccountDoesntExist', name: 'SdkError' }
11-02 14:05:32.860 31869 32208 I ReactNativeJS: '{\n  "code": "AccountDoesntExist",\n  "name": "SdkError"\n}', false
11-02 14:05:32.891 31869 32208 E ReactNativeJS: { [SdkError: AccountDoesntExist: Account "null" not found] code: 'AccountDoesntExist', name: 'SdkError' }
11-02 14:05:32.892 31869 32208 I ReactNativeJS: '{\n  "code": "AccountDoesntExist",\n  "name": "SdkError"\n}', false
11-02 14:05:32.920 31869 32208 E ReactNativeJS: { [SdkError: AccountDoesntExist: Account "null" not found] code: 'AccountDoesntExist', name: 'SdkError' }
11-02 14:05:32.921 31869 32208 I ReactNativeJS: '{\n  "code": "AccountDoesntExist",\n  "name": "SdkError"\n}', false
11-02 14:05:32.950 31869 32208 E ReactNativeJS: { [SdkError: AccountDoesntExist: Account "null" not found] code: 'AccountDoesntExist', name: 'SdkError' }
11-02 14:05:32.951 31869 32208 I ReactNativeJS: '{\n  "code": "AccountDoesntExist",\n  "name": "SdkError"\n}', false
11-02 14:05:32.983 31869 32208 E ReactNativeJS: { [SdkError: AccountDoesntExist: Account "null" not found] code: 'AccountDoesntExist', name: 'SdkError' }
11-02 14:05:32.984 31869 32208 I ReactNativeJS: '{\n  "code": "AccountDoesntExist",\n  "name": "SdkError"\n}', false
11-02 14:05:33.013 31869 32208 E ReactNativeJS: { [SdkError: AccountDoesntExist: Account "null" not found] code: 'AccountDoesntExist', name: 'SdkError' }
11-02 14:05:33.014 31869 32208 I ReactNativeJS: '{\n  "code": "AccountDoesntExist",\n  "name": "SdkError"\n}', false
11-02 14:05:33.043 31869 32208 E ReactNativeJS: { [SdkError: AccountDoesntExist: Account "null" not found] code: 'AccountDoesntExist', name: 'SdkError' }
11-02 14:05:33.044 31869 32208 I ReactNativeJS: '{\n  "code": "AccountDoesntExist",\n  "name": "SdkError"\n}', false
11-02 14:05:33.076 31869 32208 E ReactNativeJS: { [SdkError: AccountDoesntExist: Account "null" not found] code: 'AccountDoesntExist', name: 'SdkError' }
11-02 14:05:33.077 31869 32208 I ReactNativeJS: '{\n  "code": "AccountDoesntExist",\n  "name": "SdkError"\n}', false
11-02 14:05:33.106 31869 32208 E ReactNativeJS: { [SdkError: AccountDoesntExist: Account "null" not found] code: 'AccountDoesntExist', name: 'SdkError' }
11-02 14:05:33.107 31869 32208 I ReactNativeJS: '{\n  "code": "AccountDoesntExist",\n  "name": "SdkError"\n}', false
11-02 14:05:33.136 31869 32208 E ReactNativeJS: { [SdkError: AccountDoesntExist: Account "null" not found] code: 'AccountDoesntExist', name: 'SdkError' }
11-02 14:05:33.137 31869 32208 I ReactNativeJS: '{\n  "code": "AccountDoesntExist",\n  "name": "SdkError"\n}', false
11-02 14:05:33.184 31869 32208 E ReactNativeJS: RangeError: Maximum call stack size exceeded (native stack depth)
11-02 14:05:33.184 31869 32208 E ReactNativeJS:
11-02 14:05:33.184 31869 32208 E ReactNativeJS: This error is located at:
11-02 14:05:33.184 31869 32208 E ReactNativeJS:     in TErrorModal
11-02 14:05:33.184 31869 32208 E ReactNativeJS:     in ErrorHandlerProvider
11-02 14:05:33.184 31869 32208 E ReactNativeJS:     in RNCSafeAreaProvider
11-02 14:05:33.184 31869 32208 E ReactNativeJS:     in SafeAreaProvider
11-02 14:05:33.184 31869 32208 E ReactNativeJS:     in ThemeProvider
11-02 14:05:33.184 31869 32208 E ReactNativeJS:     in RCTView
11-02 14:05:33.184 31869 32208 E ReactNativeJS:     in Unknown
11-02 14:05:33.184 31869 32208 E ReactNativeJS:     in Portal.Host
11-02 14:05:33.184 31869 32208 E ReactNativeJS:     in Provider
11-02 14:05:33.184 31869 32208 E ReactNativeJS:     in App
11-02 14:05:33.184 31869 32208 E ReactNativeJS:     in RCTView
11-02 14:05:33.184 31869 32208 E ReactNativeJS:     in Unknown
11-02 14:05:33.184 31869 32208 E ReactNativeJS:     in RCTView
11-02 14:05:33.184 31869 32208 E ReactNativeJS:     in Unknown
11-02 14:05:33.184 31869 32208 E ReactNativeJS:     in AppContainer, js engine: hermes
theblockstalk commented 8 months ago

I have merged https://github.com/Tonomy-Foundation/Tonomy-ID/pull/892 to fix the AccountDoesntExist call stack error

theblockstalk commented 8 months ago

This has been resolved by the merge.