callstack / repack

A Webpack-based toolkit to build your React Native application with full support of Webpack ecosystem.
https://re-pack.dev
MIT License
1.48k stars 110 forks source link

White Screen when loading the application's initial stack from a remote bundle #716

Closed rasheedk closed 3 months ago

rasheedk commented 3 months ago

Describe the bug

I am experiencing a white blank screen when running application in remote build mode where it loads screen from an exposed module , hosted via my catalogue server .
After the white screen , my app loads the registered screen.

System Info

repack : 3.7.0
iOS and android in react native 0.72.3

Re.Pack Version

3.7.0

Reproduction

na

Steps to reproduce

after loading remote build

rasheedk commented 3 months ago

Please note that the module I am importing from exposed module is another micro app hosted via bundle server & catalogue server. Also I use <React.Suspense and fallback ={ > . Still white screen.

jbroma commented 3 months ago

Hi @rasheedk,

both Re.Pack 3.7.0 and RN 0.72 are no longer supported, please update both to newer versions and see if the issue is still there. For Re.Pack, we have a dedicated migration guide from V3 to V4.

You can also look through the issues to see if there was anything similar in the past but I'd strongly suggest to update because the issue might resolve itself then.

Closing for the reasons mentioned above.

rasheedk commented 2 months ago

@jbroma - The issue got resolved because the login screen was from a remote micro app and was loaded to navigation stack. Since it was the first screen in stack and a federated screen , I n local builds it was fine, but for remote builds, I was getting white screen until bundle completely downloads from catalogue server's version corresponding to bundle server. Even though it was loaded within a Suspense with fall back screen , it was having white screen. After loading a local component for landing screen , and on a button click further navigating to remote pages solved issue for now. I think we should not register root screen as a federated screen from another app, which was the root cause.