Fork me on GitHub

@kenny744 I've seen your final issue when bundling manually. IIRC your --bundle-output is incorrect try /usr/src/app/android/app/build/generated/assets/react/release/ I think you can confirm this is the problem by unzipping the release apk. My guess is is not in it


@codonovan thanks for the tip! you were right; there was no in the apk. the path that worked for me was /usr/src/app/android/app/src/main/assets/


i managed to resolve the call stack to the following:

com.facebook.react.common.JavascriptException: undefined is not an object (evaluating 'goog.string.Unicode = {
        NBSP: " "
      }'), stack:
    [email protected]:14
    [email protected]:47
    [email protected]:79
    global [email protected]:8
        at com.facebook.react.modules.core.ExceptionsManagerModule.showOrThrowError(
        at com.facebook.react.modules.core.ExceptionsManagerModule.reportFatalException(
        at java.lang.reflect.Method.invoke(Native Method)
        at com.facebook.react.bridge.JavaMethodWrapper.invoke(
        at com.facebook.react.bridge.JavaModuleWrapper.invoke(
        at Method)
        at android.os.Handler.handleCallback(
        at android.os.Handler.dispatchMessage(
        at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(
        at android.os.Looper.loop(
        at com.facebook.react.bridge.queue.MessageQueueThreadImpl$
and then i came across this conversation between @domkm and @ronb at Are there some known issues when using :optimizations :whitespace?


a few more details. using source maps, <unknown>@2574:14 resolves to

goog.provide("goog.string");goog.provide("goog.string.Unicode");goog.define("goog.string.DETECT_DOUBLE_ESCAPING",false);goog.define("goog.string.FORCE_NON_DOM_HTML_UNESCAPING",false);goog.string.Unicode={NBSP:" "};goog.string.startsWith=function(str,prefix){return str.lastIndexOf(prefix,0)==0};goog.string.endsWith=function(str,suffix){var l=str.length-suffix.length;return l>=0&&str.indexOf(suffix,l)==l};
and then [email protected]:79 resolves to
{ source: '/usr/src/app/node_modules/metro/src/lib/polyfills/require.js',
  line: 152,
  column: 20,
  name: 'moduleIdReallyIsNumber' }
I also noticed that there are two versions of require.js in my node_modules; one under metro/ (which does global.require = metroRequire;) and the other under react-native/ (which does global.require = require;). is this going to be a problem?