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

Memory leak with newly created project via npx create-expo-app #28248

Open
zollipaul opened this issue Apr 17, 2024 · 0 comments
Open

Memory leak with newly created project via npx create-expo-app #28248

zollipaul opened this issue Apr 17, 2024 · 0 comments
Labels
iOS needs review Issue is ready to be reviewed by a maintainer

Comments

@zollipaul
Copy link

Minimal reproducible example

https://github.com/zollipaul/testExpo

What platform(s) does this occur on?

iOS

Did you reproduce this issue in a development build?

No (tested in Expo Go)

Summary

I created a fresh Expo app using 'npx create-expo-app'. After launching it in the iOS Simulator and reloading the app a few times with CMD+R, I noticed a memory leak. This issue becomes apparent after about 10-15 refreshes as the memory usage consistently increases. Why does this happen? It doesn't occur with fast refresh. Additionally, the memory usage slightly increases over time even without reloading. If I reload with CMD + R or through the developer menu 'Reload', the increase in memory is much more significant. The current workaround involves frequently hard closing the Expo Go app and reopening it. (See video below for a demonstration.)
https://github.com/expo/expo/assets/34658790/118f824e-0a36-4163-b412-28a8b5c15278

Environment

npx expo-env-info

expo-env-info 1.2.0 environment info:
System:
OS: macOS 14.4.1
Shell: 5.9 - /bin/zsh
Binaries:
Node: 20.12.1 - /opt/homebrew/opt/node@20/bin/node
Yarn: 1.22.19 - /opt/homebrew/bin/yarn
npm: 10.5.0 - /opt/homebrew/opt/node@20/bin/npm
Watchman: 2024.04.08.00 - /opt/homebrew/bin/watchman
Managers:
CocoaPods: 1.15.2 - /opt/homebrew/bin/pod
SDKs:
iOS SDK:
Platforms: DriverKit 23.4, iOS 17.4, macOS 14.4, tvOS 17.4, visionOS 1.1, watchOS 10.4
IDEs:
Xcode: 15.3/15E204a - /usr/bin/xcodebuild
npmPackages:
expo: ~50.0.14 => 50.0.17
react: 18.2.0 => 18.2.0
react-native: 0.73.6 => 0.73.6
Expo Workflow: managed

Same problem here with macOS 14.2

Expo Doctor Diagnostics

testExpo % npx expo-doctor@latest

✔ Check Expo config for common issues
✔ Check package.json for common issues
✔ Check native tooling versions
✔ Check dependencies for packages that should not be installed directly
✔ Check for common project setup issues
✔ Check for issues with metro config
✔ Check npm/ yarn versions
✔ Check Expo config (app.json/ app.config.js) schema
✔ Check that native modules do not use incompatible support packages
✔ Check for legacy global CLI installed locally
✔ Check that native modules use compatible support package versions for installed Expo SDK
✔ Check that packages match versions required by installed Expo SDK

Didn't find any issues with the project!

@zollipaul zollipaul added the needs validation Issue needs to be validated label Apr 17, 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 Apr 17, 2024
@byCedric byCedric added CLI Versioned Expo CLI -- `npx expo start` iOS and removed CLI Versioned Expo CLI -- `npx expo start` labels Apr 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
iOS needs review Issue is ready to be reviewed by a maintainer
Projects
None yet
Development

No branches or pull requests

3 participants