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

Processing performance trace on iOS fails with "Error: Android project not found" #2

Open
szpasztor opened this issue Feb 14, 2024 · 0 comments

Comments

@szpasztor
Copy link

szpasztor commented Feb 14, 2024

Overview
Attempting to download and process the performance trace for a profiling session on iOS fails with the following output:

$ npx react-native-release-profiler --local /var/mobile/Containers/Data/Application/8BF1D060-684F-465A-820B-EE574FC6D99E/Library/Caches/profile-273CE684-52C0-416B-B6FB-BA67E9109D1C-7548-0000058188A57F98.cpuprofile
node:internal/process/promises:288
            triggerUncaughtException(err, true /* fromPromise */);
            ^

[UnhandledPromiseRejection: This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason "Error: Android project not found. Are you sure this is a React Native project? If your Android files are located in a non-standard location (e.g. not inside 'android' folder), consider setting `project.android.sourceDir` option to point to a new location.".] {
  code: 'ERR_UNHANDLED_REJECTION'
}

Node.js v18.17.0

Based on the error trace above, it appears that this is an internal error? The expected behavior here would be that no android files are required when using profiling on iOS only.

Reproduction steps:

  1. Install package according to README instructions and follow Usage section steps 2 through 4.
  2. Run step 5 for iOS: npx react-native-release-profiler --local <path to profile> with the profile path substituted

Dependencies:

"dependencies": {
    "expo": "^50.0.6",
    "react": "18.2.0",
    "react-native": "0.73.2",
    "react-native-release-profiler": "^0.1.6",
    ...
  }

Context:
iOS 17.3
iPhone 14 pro max
npx version 10.0.0

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

No branches or pull requests

1 participant