-
Notifications
You must be signed in to change notification settings - Fork 118
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
App crashing on Android with Repack v5 & Module Federation V2 in release mode #891
Comments
Hey, I was able to reproduce this on iOS as well, it looks like something is initializing the var console = {
log() {},
warn() {},
error() {},
} Then I used |
I have the same issue |
looks like an issue in as a workaround for now use the patching method as shown here: #891 (comment) |
@jbroma thanks for your quick response, I have applied the patch (mentioned in #891 (comment)) diff --git a/node_modules/isomorphic-rslog/dist/browser/index.cjs b/node_modules/isomorphic-rslog/dist/browser/index.cjs
index 948adab..c328dec 100644
--- a/node_modules/isomorphic-rslog/dist/browser/index.cjs
+++ b/node_modules/isomorphic-rslog/dist/browser/index.cjs
@@ -1,4 +1,11 @@
"use strict";
+
+var console = {
+ log() {},
+ warn() {},
+ error() {},
+}
+
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames; The error
The android app still crashes when I try to run in release mode |
I tried the latest version(5.0.0-rc.8), and the same error occurred. Do you have any ideas about this?
Also, I tried version 4.4.1, and it works well. However, on iOS, it doesn't show any error stacks when errors occur, just a white screen. |
I've used to repro from the first post of the issue and I've also upgraded to RC.9 of Re.Pack and it seems to work in Release Mode without a problem. Please follow the migration guide from previous RC versions to RC7 and higher here in the release notes: https://github.com/callstack/repack/releases/tag/%40callstack%2Frepack%405.0.0-rc.7 the biggest change there is to remove There was also one more error that I needed to fix (and we actually report it now) - in the the After doing all of that and running the dev-server for the |
Thank @jbroma, you’re amazing! |
@jbroma Thank you so much, after upgrading to RC.9, I can run release mode in android without problem, but there's a weird thing after I remove
Even though I run the app in android simulator with arch=arm64-v8a I tried to install package My
My
This error also occurs in the release mode and I don't know why. I pushed new code to reproduction repository, you can try https://github.com/duynguyen250399/super-app-crashing-demo |
Why do you remove your EDIT: I can see that the error calls for x64 and not arm64 binding which is indeed weird |
@jbroma I just removed |
Describe the bug
Hi Team,
I am building a super app using Repack v5 and Module Federation v2. The host app works normally when I run it in debug mode, but it crashes when I try to run it in release mode and I don't know why. I expect it should not crash.
Logcat:
System Info
Re.Pack Version
5.0.0-rc.5
Reproduction
https://github.com/duynguyen250399/super-app-crashing-demo
Steps to reproduce
1. Start mini app
cd mfe_food && yarn && yarn start
2. Run host app in release mode
cd host && yarn && yarn android --mode release
Notes: I have already run
adb reverse
but it still not workThe text was updated successfully, but these errors were encountered: