Sentry CLI Execution Failure when using Sentry Maven plugin

Troubleshoot and resolve Sentry CLI execution failures when using the Sentry Maven plugin.

The Sentry Maven plugin may fail to execute Sentry CLI in certain environments.

  • A build using sentry-maven-plugin fails during execution of sentry-cli (e.g. to collect and upload a source bundle).
  • Enabling debug logs for sentry-cli doesn't show meaningful errors from sentry-cli itself.

To enable debug logs, set

Copied
<debug>false</debug>
<debugSentryCli>true</debugSentryCli>

in your <configuration> for sentry-maven-plugin.

You might see similar lines in the logs:

Copied
[ERROR] Error while attempting to run Sentry CLI:
org.apache.maven.plugin.MojoExecutionException: An Ant BuildException has occured: Execute failed: java.io.IOException: Cannot run program "/bin/sh" [...]

Add the following JVM option to switch the process launch mechanism to vfork:

Copied
-Djdk.lang.Process.launchMechanism=vfork

For more details about this issue and the investigation process, see GitHub Issue #169.

If this doesn't solve the problem, please open a new issue on GitHub.

Was this helpful?
Help improve this content
Our documentation is open source and available on GitHub. Your contributions are welcome, whether fixing a typo (drat!) or suggesting an update ("yeah, this would be better").