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

[0.74.0-rc.5] - Memory leak when using fetch with new arch #43647

Closed
migueldaipre opened this issue Mar 26, 2024 · 4 comments
Closed

[0.74.0-rc.5] - Memory leak when using fetch with new arch #43647

migueldaipre opened this issue Mar 26, 2024 · 4 comments
Labels
Issue: Author Provided Repro This issue can be reproduced in Snack or an attached project. 🌐Networking Related to a networking API. Resolution: Fixed A PR that fixes this issue has been merged.

Comments

@migueldaipre
Copy link
Collaborator

Description

Use the Fetch API and see memory consumption increase without the automatic cleaning of the garbage collector.

Related #42374 #39100 facebook/hermes#1147

Steps to reproduce

  1. Open Xcode
  2. yarn install
  3. yarn ios
  4. Click on start
  5. See the memory profile as in the demo video in the player

React Native Version

0.74.0-rc.5

Affected Platforms

Runtime - iOS

Areas

TurboModule - The New Native Module System

Output of npx react-native info

System:
  OS: macOS 14.3
  CPU: (8) arm64 Apple M1
  Memory: 103.22 MB / 8.00 GB
  Shell:
    version: "5.9"
    path: /bin/zsh
Binaries:
  Node:
    version: 20.11.0
    path: ~/.nvm/versions/node/v20.11.0/bin/node
  Yarn:
    version: 3.6.4
    path: ~/.nvm/versions/node/v20.11.0/bin/yarn
  npm:
    version: 10.2.4
    path: ~/.nvm/versions/node/v20.11.0/bin/npm
  Watchman:
    version: 2024.01.22.00
    path: /opt/homebrew/bin/watchman
Managers:
  CocoaPods:
    version: 1.14.3
    path: /Users/migueldaipre/.rbenv/shims/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:
      - "33"
      - "34"
    Build Tools:
      - 30.0.3
      - 33.0.0
      - 33.0.1
      - 34.0.0
    System Images:
      - android-33 | Google APIs ARM 64 v8a
      - android-34 | Google Play ARM 64 v8a
    Android NDK: Not Found
IDEs:
  Android Studio: 2023.1 AI-231.9392.1.2311.11330709
  Xcode:
    version: 15.2/15C500b
    path: /usr/bin/xcodebuild
Languages:
  Java:
    version: 17.0.10
    path: /usr/bin/javac
  Ruby:
    version: 3.3.0
    path: /Users/migueldaipre/.rbenv/shims/ruby
npmPackages:
  "@react-native-community/cli": Not Found
  react:
    installed: 18.2.0
    wanted: 18.2.0
  react-native:
    installed: 0.74.0-rc.5
    wanted: 0.74.0-rc.5
  react-native-macos: Not Found
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: true
  newArchEnabled: false
iOS:
  hermesEnabled: true
  newArchEnabled: true

Stacktrace or Logs

no crash log. Run the reproduction demo, if you watch enough time, you will see it.

Reproducer

https://github.com/migueldaipre/RN74FetchLeak

Screenshots and Videos

ios-fetch-leak.mp4

print

@migueldaipre migueldaipre added Needs: Triage 🔍 Type: New Architecture Issues and PRs related to new architecture (Fabric/Turbo Modules) labels Mar 26, 2024
@github-actions github-actions bot added the 🌐Networking Related to a networking API. label Mar 26, 2024
@migueldaipre migueldaipre changed the title Memory leak when using fetch with new arch [0.74.0-rc.5] - Memory leak when using fetch with new arch Mar 26, 2024
@cortinico
Copy link
Contributor

TurboModule - The New Native Module System

Is this related to the New Architecture?
Seems like a duplicate of #42374 #39100 no?

@cortinico cortinico added Needs: Author Feedback Issue: Author Provided Repro This issue can be reproduced in Snack or an attached project. and removed Type: New Architecture Issues and PRs related to new architecture (Fabric/Turbo Modules) Needs: Triage 🔍 labels Mar 26, 2024
@migueldaipre
Copy link
Collaborator Author

migueldaipre commented Mar 26, 2024

TurboModule - The New Native Module System

Is this related to the New Architecture? Seems like a duplicate of #42374 #39100 no?

Yes, this is happening with the old and the new arch.

Could you help us find a fix for the problem?

In apps that make many requests we have out of memory issues.

@github-actions github-actions bot added Needs: Attention Issues where the author has responded to feedback. and removed Needs: Author Feedback labels Mar 26, 2024
@manuelson
Copy link

manuelson commented Jul 18, 2024

hello we got same here on Android

@migueldaipre
Copy link
Collaborator Author

hello we got same here on Android

Both platforms have been fixed in 0.75-rc3

@cortinico cortinico added Resolution: Fixed A PR that fixes this issue has been merged. and removed Needs: Attention Issues where the author has responded to feedback. labels Jul 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue: Author Provided Repro This issue can be reproduced in Snack or an attached project. 🌐Networking Related to a networking API. Resolution: Fixed A PR that fixes this issue has been merged.
Projects
None yet
Development

No branches or pull requests

3 participants