openwallet-foundation / bifold-wallet

Aries Mobile Agent React Native - Part of the Aries Bifold effort to provide SSI capabilities in a production ready app.
Apache License 2.0
154 stars 150 forks source link

Application not opening #714

Closed mdriazuddin417 closed 2 months ago

mdriazuddin417 commented 1 year ago

WhatsApp Image 2023-04-15 at 12 04 23 PM (1) WhatsApp Image 2023-04-15 at 12 04 23 PM

APK build shows no error. But when I open it after installation this problem occurs. Application not opening

Ekaanth commented 1 year ago

Any update on this issue?

mdriazuddin417 commented 1 year ago

No, brother.

On Tue, Apr 18, 2023, 5:29 PM Abhishek @.***> wrote:

Any update on this issue?

— Reply to this email directly, view it on GitHub https://github.com/hyperledger/aries-mobile-agent-react-native/issues/714#issuecomment-1512914712, or unsubscribe https://github.com/notifications/unsubscribe-auth/AXDCO374C4N2ZPWFNFC7FSLXBZ3J7ANCNFSM6AAAAAAW7GTDBY . You are receiving this because you authored the thread.Message ID: @.*** com>

cvarjao commented 1 year ago

@mdriazuddin417, do you have log entry related to the app in the android log files? Also, how did you build? Did you build a release bundle?

mdriazuddin417 commented 1 year ago

I followed React Native's documentation to build it. cd app & cd android ./gradlew assembleRelease for release apk and ./gradlew bundleRelease for release bundle.

Yes, I build a release bundle and release apk But when I try to open this apk on my phone it crashes

thiagoromanos commented 1 year ago

Happens to me too. logcat gave me this output:

FATAL EXCEPTION: create_react_context
Process: com.ariesbifold, PID: 20624
java.lang.RuntimeException: Unable to load script. Make sure you're either running Metro (run 'npx react-native start') or that your bundle 'index.android.bundle' is packaged correctly for release.
    at com.facebook.react.bridge.CatalystInstanceImpl.jniLoadScriptFromAssets(Native Method)
    at com.facebook.react.bridge.CatalystInstanceImpl.loadScriptFromAssets(CatalystInstanceImpl.java:239)
    at com.facebook.react.bridge.JSBundleLoader$1.loadScript(JSBundleLoader.java:29)
    at com.facebook.react.bridge.CatalystInstanceImpl.runJSBundle(CatalystInstanceImpl.java:268)
    at com.facebook.react.ReactInstanceManager.createReactContext(ReactInstanceManager.java:1371)
    at com.facebook.react.ReactInstanceManager.access$1100(ReactInstanceManager.java:136)
    at com.facebook.react.ReactInstanceManager$5.run(ReactInstanceManager.java:1065)
    at java.lang.Thread.run(Thread.java:1012)
thiagoromanos commented 1 year ago

Could get it working by bundling the app before running ./gradlew assembleRelease from the packages/legacy/app folder:

npx react-native bundle --platform android --dev false --entry-file index.js --bundle-output android/app/src/main/assets/index.android.bundle

(the android/app/src/main/assets might not exist, so, run mkdir before that command)

I don't know why it's necessary now and don't think that's a final solution for that problem.

thiagoromanos commented 1 year ago

@mdriazuddin417 , can you confirm us if the app works if you do the extra step I mentioned before?

mdriazuddin417 commented 1 year ago

Screenshot_16 this error showing

jainavinash845 commented 1 year ago

i am trying to build the signed apk for the app , it is successfully build but the after installation the apk in the device it stopped or crashed it does not open . rather then the debug apk is working fine , not having issue the debug apk. only the release(signed apk) does not working after install in the app.

I am followed the react official doc for creating the signed apk and keystore . ./gradlew assembleRelease for release apk .

Please let me know how can i am successfully create the release(signed apk) for devices. @bryce-mcmath @amanji @ryankoch13 @JamesKEbert @mdriazuddin417

laygir commented 1 year ago

Hi 👋

Having similar issues here. Release build finishes with no errors but after installing the apk on my device it keeps crashing while launching the app.

From Logcat:

couldn't find DSO to load: libjscexecutor.so caused by: dlopen failed: library "libjsc.so" not found: needed by /data/app/~~ZagFlvKqT4tYw_YFA-PZlA==/com.ariesbifold-ipgO_yGdIhTSGYowLpqBNg==/lib/arm64/libjscexecutor.so in namespace classloader-namespace result: 0
couldn't find DSO to load: libhermes-executor-debug.so caused by: dlopen failed: cannot locate symbol "_ZN8facebook6hermes13HermesRuntime11getDebuggerEv" referenced by "/data/app/~~ZagFlvKqT4tYw_YFA-PZlA==/com.ariesbifold-ipgO_yGdIhTSGYowLpqBNg==/lib/arm64/libhermes-executor-common-debug.so"... result: 0
FATAL EXCEPTION: create_react_context
Process: com.ariesbifold, PID: 16675
java.lang.RuntimeException: Unable to load script. Make sure you're either running Metro (run 'npx react-native start') or that your bundle 'index.android.bundle' is packaged correctly for release.
at com.facebook.react.bridge.CatalystInstanceImpl.jniLoadScriptFromAssets(Native Method)
at com.facebook.react.bridge.CatalystInstanceImpl.loadScriptFromAssets(CatalystInstanceImpl.java:239)
at com.facebook.react.bridge.JSBundleLoader$1.loadScript(JSBundleLoader.java:29)
at com.facebook.react.bridge.CatalystInstanceImpl.runJSBundle(CatalystInstanceImpl.java:268)
at com.facebook.react.ReactInstanceManager.createReactContext(ReactInstanceManager.java:1371)
at com.facebook.react.ReactInstanceManager.access$1100(ReactInstanceManager.java:136)
at com.facebook.react.ReactInstanceManager$5.run(ReactInstanceManager.java:1065)
at java.lang.Thread.run(Thread.java:1012)
win=Window{4a48a12 u0 Splash Screen com.ariesbifold EXITING} destroySurfaces: appStopped=false cleanupOnResume=false win.mWindowRemovalAllowed=true win.mRemoveOnExit=true win.mViewVisibility=8 caller=com.android.server.wm.WindowState.onExitAnimationDone:5997 com.android.server.wm.ActivityRecord$$ExternalSyntheticLambda10.accept:2 java.util.ArrayList.forEach:1262 com.android.server.wm.ActivityRecord.onAnimationFinished:8607 com.android.server.wm.WindowContainer.doAnimationFinished:3483 com.android.server.wm.WindowContainer.onAnimationFinished:3495 com.android.server.wm.Task.onAnimationFinished:8636 

––

I also got some errors for "Duplicate resources", I had to remove most of these to suppress the errors but not sure why this is happening in the first place.

AGPBI: 
{
  "kind": "error",
  "text": "Duplicate resources",
  "sources":
    [
      {
        "file":
          {
            "description": "drawable-mdpi-v4/node_modules_reactnativebouncycheckbox_build_dist_check",
            "path": "/Users/*****/bifold/packages/legacy/app/android/app/src/main/res/drawable-mdpi/node_modules_reactnativebouncycheckbox_build_dist_check.png",
          },
      },
      {
        "file":
          {
            "description": "drawable-mdpi-v4/node_modules_reactnativebouncycheckbox_build_dist_check",
            "path": "/Users/****/bifold/packages/legacy/app/android/app/build/generated/res/react/release/drawable-mdpi/node_modules_reactnativebouncycheckbox_build_dist_check.png",
          },
      },
    ],
  "tool": "Resource and asset merger",
}

I get the above error for every folder under packages/legacy/app/android/app/src/main/res/

Would appreciate pointers to solve this 🙏

laygir commented 1 year ago

After some issues and several tries I did manage to generate the index.android.bundle using the following thanks to @thiagoromanos 🙌

npx react-native bundle --platform android --dev false --entry-file index.js --bundle-output android/app/src/main/assets/index.android.bundle
cvarjao commented 2 months ago

closing stale issues