Skip to content
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

Expo-dev-client since Expo 50 adds unnessary full reloads #28685

Closed
Zoxive opened this issue May 8, 2024 · 2 comments · Fixed by #28893
Closed

Expo-dev-client since Expo 50 adds unnessary full reloads #28685

Zoxive opened this issue May 8, 2024 · 2 comments · Fixed by #28893

Comments

@Zoxive
Copy link

Zoxive commented May 8, 2024

Summary

I'm currently on expo 49, using expo-dev-client "expo-dev-client": "~2.4.13"

I'm attempting to upgrade to Expo 50, maybe 51 since it was just released.

But ive noticed since upgrading that anytime my app is running and "refocused" (i dont have a better term for this atm).
Then expo-dev-client forces the app bundle to reload.

Repo steps:

  • Run the app.
  • Minimize the app (dont close it)
  • Open the app again from the app icon.
  • In Expo 50+51 & having expo-dev-client, the dev client reloads the JS bundle.

If you dont install expo-dev-client and do the following:

  • Run the app.
  • Minimize the app (dont close it)
  • Open the app again from the app icon.

It doesnt reload as desired.

Another place you can see this full reload behavior is if your app has notifications.
If i cause a notification, and that notification wants to focus my app it reloads as well. This is the biggest pain point, because all UI context is lost when this happens, severely hurting developer productivity.

Managed or bare workflow?

managed

What platform(s) does this occur on?

Android

Package versions

expo 50
"expo-dev-client": "~4.0.11"

expo 51
"expo-dev-client": "~3.3.11"

Environment

expo-env-info 1.2.0 environment info:
System:
OS: macOS 14.2.1
Shell: 5.9 - /bin/zsh
Binaries:
Node: 22.1.0 - /opt/homebrew/bin/node
Yarn: 1.22.19 - /opt/homebrew/bin/yarn
npm: 10.7.0 - /opt/homebrew/bin/npm
Watchman: 2024.05.06.00 - /opt/homebrew/bin/watchman
Managers:
CocoaPods: 1.11.3 - /usr/local/bin/pod
SDKs:
iOS SDK:
Platforms: DriverKit 23.2, iOS 17.2, macOS 14.2, tvOS 17.2, visionOS 1.0, watchOS 10.2
Android SDK:
API Levels: 28, 29, 30, 31, 32, 33, 34
Build Tools: 28.0.3, 29.0.2, 30.0.2, 30.0.3, 33.0.0, 33.0.1, 34.0.0
System Images: android-30 | Google Play ARM 64 v8a, android-33 | Google APIs ARM 64 v8a
IDEs:
Android Studio: 2022.3 AI-223.8836.35.2231.11090377
Xcode: 15.2/15C500b - /usr/bin/xcodebuild
npmPackages:
expo: ^50.0.18 => 50.0.18
react: 18.2.0 => 18.2.0
react-native: 0.73.6 => 0.73.6
npmGlobalPackages:
eas-cli: 8.0.0
expo-cli: 6.3.10
Expo Workflow: bare

Reproducible demo

https://github.com/Zoxive/Expo50_DevClientReload

Stacktrace (if a crash is involved)

No response

@Zoxive Zoxive added Development Builds needs validation Issue needs to be validated labels May 8, 2024
@expo-bot expo-bot added needs review Issue is ready to be reviewed by a maintainer and removed needs validation Issue needs to be validated labels May 8, 2024
@expo-bot
Copy link
Collaborator

expo-bot commented May 8, 2024

Thank you for filing this issue!
This comment acknowledges we believe this may be a bug and there’s enough information to investigate it.
However, we can’t promise any sort of timeline for resolution. We prioritize issues based on severity, breadth of impact, and alignment with our roadmap. If you’d like to help move it more quickly, you can continue to investigate it more deeply and/or you can open a pull request that fixes the cause.

@github-actions github-actions bot removed the needs review Issue is ready to be reviewed by a maintainer label May 8, 2024
@krystianhub
Copy link

One way of fixing it in SDK 50 was to add the following plugin config:

[
"expo-dev-launcher",
{
"launchModeExperimental": "launcher"
}
]

Since SDK 51 says the config variable changed to "launchMode".
However, despite trying both - I still get full reloads every time now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants