Closed AkankshaJagdish closed 1 year ago
Update: I cloned the repository to an Ubuntu device, and am receiving the same error after building the app on it.
2023-04-26 22:32:24.192 31988-32079 ReactNativeJS com.quiz_app_codesplit_4 E TypeError: Cannot read property 'call' of undefined
This error is located at:
in Lazy
in Suspense
in RCTView
in Unknown
in ImageBackground
in RCTView
in Unknown
in Home
in RCTView
in Unknown
in App
in RCTView
in Unknown
in RCTView
in Unknown
in AppContainer, js engine: hermes
2023-04-26 22:32:24.215 31988-32080 AndroidRuntime com.quiz_app_codesplit_4 E FATAL EXCEPTION: mqt_native_modules
Process: com.quiz_app_codesplit_4, PID: 31988
com.facebook.react.common.JavascriptException: TypeError: Cannot read property 'call' of undefined
This error is located at:
in Lazy
in Suspense
in RCTView
in Unknown
in ImageBackground
in RCTView
in Unknown
in Home
in RCTView
in Unknown
in App
in RCTView
in Unknown
in RCTView
in Unknown
in AppContainer, js engine: hermes, stack:
__webpack_require__@1:5872
tryCallOne@53:15
anonymous@139:26
anonymous@1:242857
_callTimer@1:241850
_callReactNativeMicrotasksPass@1:242018
callReactNativeMicrotasks@1:243940
__callReactNativeMicrotasks@1:138053
anonymous@1:137180
__guard@1:137930
flushedQueue@1:137091
at com.facebook.react.modules.core.ExceptionsManagerModule.reportException(ExceptionsManagerModule.java:72)
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:188)
at com.facebook.jni.NativeRunnable.run(Native Method)
at android.os.Handler.handleCallback(Handler.java:942)
at android.os.Handler.dispatchMessage(Handler.java:99)
at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(MessageQueueThreadHandler.java:27)
at android.os.Looper.loopOnce(Looper.java:226)
at android.os.Looper.loop(Looper.java:313)
at com.facebook.react.bridge.queue.MessageQueueThreadImpl$4.run(MessageQueueThreadImpl.java:228)
at java.lang.Thread.run(Thread.java:1012)
2023-04-26 22:32:24.267 31988-32080 Process com.quiz_app_codesplit_4 I Sending signal. PID: 31988 SIG: 9
Please help fix this issue. I really need Inline Assets to work.
I suggest using the Remote Assets released in the 3.2.0 version of Repack, especially in such asset-heavy apps. Encoding assets with base64 and inlining them into the bundles should never be used in cases where Remote Assets can do the job. Historically inline assets were the only built-in solution but right now, after releasing full support for the Remote Assets, it should be treated as a default solution.
Please try refactoring your code to use Remote Assets and see if that'll help. It will cut the bundle sizes significantly, and I get a feeling that the bundles size might be a problem. I've never worked with a JS bundle over 25MB in size.
However, if it doesn't solve your problem – please share a minimal reproduction repository so I can review the configuration. It'd be very helpful if you could create a demo project in the Firebase and add me there so I can verify how things are wired up on that end.
Closing as reproduction wasn't provided and it's impossible to tell what the cause was. If the problem persists, please open a new issue.
i'm expierence this issue when remote chunk changed that i removed some components.
any help..?
Ask your Question
I'm facing an issue with my release APK of a code splitting app. I have used the Async Chunks guide to create the app, and the Inline Assets modification to add images when creating the chunks. The chunks appear to be the right size. Yet I am facing an error.
I have checked my imports. They are all done in this template:
I'm using Ubuntu (WSL) to built the app. I soon will not have access to a Linux device so I must be able to build this using a Windows device with WSL.
I have installed NodeJs, Java, and Android SDK on the WSL and am using them to build.
How do I fix this?
Here is the error log:
My webpack config file has been modified to include inline assets:
The app uses Firebase to host the chunks. The chunk sizes are about 50 MB - 90 MB. The Scriptmanager resolves the files as follows: