repack
repack copied to clipboard
Stuck while loading bundles on second app launch with cache flag enabled
Environment
Localhost dev
Description
Hello I've tried to enable caching in my project following the caching and versioning guide. The app runs with all the remotes loaded and working the first time I launch it. However, if I close the app and launch it again, it gets stuck at the launch screen.
I initially thought it was an issue with the project code, but the same problem occurs when I try it with the sample project super-app-showcase.
I've tried to debug and it seems like it stuck at Federated.importModule().
I didn't get this issue if I set the cache flag to false, but then the app downloads the remote bundles every time I need to access them, which is not optimal.
Reproducible Demo
-
Clone and setup super-app-showcase
-
In
packages/booking/index.jspackages/dashboard/index.jspackages/host/index.jspackages/shell/index.jspackages/shopping/index.jsAdd
import AsyncStorage from '@react-native-async-storage/async-storage'; ... ScriptManager.shared.setStorage(AsyncStorage); ...and set
cache: true