Uploaded image for project: 'Nuxeo Mobile'
  1. Nuxeo Mobile
  2. NXMOB-509

On Android, allow using the share extension in dev mode

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: Android 1.13
    • Component/s: Android
    • Tags:
    • Sprint:
      nxfit 10.2.4
    • Story Points:
      2

      Description

      Currently, when running npm run android and trying to share a file with Nuxeo, the app crashes with

      05-04 15:25:17.223  5363  5382 D ReactNative: Initializing React Xplat Bridge.
      05-04 15:25:17.228  5363  5382 D ReactNative: Initializing React Xplat Bridge before initializeBridge
      05-04 15:25:17.238  5363  5382 D ReactNative: Initializing React Xplat Bridge after initializeBridge
      05-04 15:25:17.238  5363  5382 D ReactNative: CatalystInstanceImpl.runJSBundle()
      05-04 15:25:17.271  5363  5382 E AndroidRuntime: FATAL EXCEPTION: Thread-6871
      05-04 15:25:17.271  5363  5382 E AndroidRuntime: Process: com.nuxeomobile, PID: 5363
      05-04 15:25:17.271  5363  5382 E AndroidRuntime: java.lang.RuntimeException: Unable to load script from assets 'index.android.bundle'. Make sure your bundle is packaged correctly or you're running a packager server.
      05-04 15:25:17.271  5363  5382 E AndroidRuntime: 	at com.facebook.react.bridge.CatalystInstanceImpl.jniLoadScriptFromAssets(Native Method)
      05-04 15:25:17.271  5363  5382 E AndroidRuntime: 	at com.facebook.react.bridge.CatalystInstanceImpl.loadScriptFromAssets(CatalystInstanceImpl.java:216)
      05-04 15:25:17.271  5363  5382 E AndroidRuntime: 	at com.facebook.react.bridge.JSBundleLoader$1.loadScript(JSBundleLoader.java:33)
      05-04 15:25:17.271  5363  5382 E AndroidRuntime: 	at com.facebook.react.bridge.CatalystInstanceImpl.runJSBundle(CatalystInstanceImpl.java:234)
      05-04 15:25:17.271  5363  5382 E AndroidRuntime: 	at com.facebook.react.ReactInstanceManager.createReactContext(ReactInstanceManager.java:1113)
      05-04 15:25:17.271  5363  5382 E AndroidRuntime: 	at com.facebook.react.ReactInstanceManager.access$900(ReactInstanceManager.java:113)
      05-04 15:25:17.271  5363  5382 E AndroidRuntime: 	at com.facebook.react.ReactInstanceManager$5.run(ReactInstanceManager.java:920)
      05-04 15:25:17.271  5363  5382 E AndroidRuntime: 	at java.lang.Thread.run(Thread.java:818)
      

      As suggested in this issue, let's add the following command before run-android when running npm run android:

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

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 3 hours
                3h