Skip to content

Conversation

@liamjones
Copy link
Contributor

@liamjones liamjones commented Jul 23, 2025

📢 Type of change

  • Bugfix
  • New feature
  • Enhancement
  • Refactoring

📜 Description

Fixes sentry-cli path discovery not working on Android.

💡 Motivation and Context

resolveSentryCliPackagePath was always ending up in the fallback path. This didn't work for me since I'm using a monorepo and sentry-cli isn't in the fallback location.

The previous code was trying to pass a Process to new File() (instead of a String) and there's no File constructor that takes a Process so it'd immediately end up in the catch block

💚 How did you test it?

Locally edited node_modules/@sentry/react-native/sentry.gradle when I found the upload task was failing after I updated from 5.35.0 to 6.18.0.

📝 Checklist

  • I added tests to verify changes
  • No new PII added or SDK only sends newly added PII if sendDefaultPII is enabled
  • I updated the docs if needed.
  • I updated the wizard if needed.
  • All tests passing
  • No breaking changes

🔮 Next steps

The previous code was trying to pass a `Process` to `new File()` (instead of a String) and there's no File constructor that takes a Process so it'd immediately end up in the catch block
@lucas-zimerman
Copy link
Collaborator

Hi and thank you for opening this PR!
I can confirm that your changes indeed fixes the issue, thank you!

Copy link
Collaborator

@lucas-zimerman lucas-zimerman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for your contribution!

@lucas-zimerman lucas-zimerman enabled auto-merge (squash) July 23, 2025 14:13
@lucas-zimerman lucas-zimerman merged commit ff0e5d8 into getsentry:main Jul 23, 2025
52 checks passed
@liamjones liamjones deleted the fix-sentry-cli-discovery branch July 23, 2025 14:16
@lucas-zimerman
Copy link
Collaborator

Also fixes #5031

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

Successfully merging this pull request may close these issues.

2 participants