unfortunately I'm getting an NoSuchKeyException when trying to start my application on android after obfuscating the javascript code:
com.facebook.react.bridge.NoSuchKeyException: lineNumber at com.facebook.react.bridge.ReadableNativeMap.getValue(ReadableNativeMap.java:122) at com.facebook.react.bridge.ReadableNativeMap.getValue(ReadableNativeMap.java:126) at com.facebook.react.bridge.ReadableNativeMap.getInt(ReadableNativeMap.java:180) at com.facebook.react.util.JSStackTrace.format(JSStackTrace.java:28) at com.facebook.react.modules.core.ExceptionsManagerModule.showOrThrowError(ExceptionsManagerModule.java:54) at com.facebook.react.modules.core.ExceptionsManagerModule.reportFatalException(ExceptionsManagerModule.java:38) at java.lang.reflect.Method.invoke(Native Method) at com.facebook.react.bridge.JavaMethodWrapper.invoke(JavaMethodWrapper.java:372) at com.facebook.react.bridge.JavaModuleWrapper.invoke(JavaModuleWrapper.java:160) at com.facebook.react.bridge.queue.NativeRunnable.run(Native Method) at android.os.Handler.handleCallback(Handler.java:789) at android.os.Handler.dispatchMessage(Handler.java:98) at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(MessageQueueThreadHandler.java:29) at android.os.Looper.loop(Looper.java:164) at com.facebook.react.bridge.queue.MessageQueueThreadImpl$3.run(MessageQueueThreadImpl.java:192) at java.lang.Thread.run(Thread.java:764)
I've tracked the error down: it is caused if the MainComponent is obfuscated as well (registered in index.js via "AppRegistry.registerComponent(...))".
I couldn't find anything in the docs: is it not possible to obfuscate the main component as well? Anyone maybe has a hint how this could be done?
const filter = filename => {
return filename.startsWith("app")
&& !filename.startsWith("app/components/index"); // necessary for now due to NoSuchKeyException
};
Hello,
unfortunately I'm getting an NoSuchKeyException when trying to start my application on android after obfuscating the javascript code:
com.facebook.react.bridge.NoSuchKeyException: lineNumber at com.facebook.react.bridge.ReadableNativeMap.getValue(ReadableNativeMap.java:122) at com.facebook.react.bridge.ReadableNativeMap.getValue(ReadableNativeMap.java:126) at com.facebook.react.bridge.ReadableNativeMap.getInt(ReadableNativeMap.java:180) at com.facebook.react.util.JSStackTrace.format(JSStackTrace.java:28) at com.facebook.react.modules.core.ExceptionsManagerModule.showOrThrowError(ExceptionsManagerModule.java:54) at com.facebook.react.modules.core.ExceptionsManagerModule.reportFatalException(ExceptionsManagerModule.java:38) at java.lang.reflect.Method.invoke(Native Method) at com.facebook.react.bridge.JavaMethodWrapper.invoke(JavaMethodWrapper.java:372) at com.facebook.react.bridge.JavaModuleWrapper.invoke(JavaModuleWrapper.java:160) at com.facebook.react.bridge.queue.NativeRunnable.run(Native Method) at android.os.Handler.handleCallback(Handler.java:789) at android.os.Handler.dispatchMessage(Handler.java:98) at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(MessageQueueThreadHandler.java:29) at android.os.Looper.loop(Looper.java:164) at com.facebook.react.bridge.queue.MessageQueueThreadImpl$3.run(MessageQueueThreadImpl.java:192) at java.lang.Thread.run(Thread.java:764)
I've tracked the error down: it is caused if the MainComponent is obfuscated as well (registered in index.js via "AppRegistry.registerComponent(...))".
I couldn't find anything in the docs: is it not possible to obfuscate the main component as well? Anyone maybe has a hint how this could be done?
My configuration:
rn-cli.config.js
module.exports = { transformer: { babelTransformerPath: require.resolve("./transformer") }, };
transformer.js