Skip to content

Commit 367cd60

Browse files
committed
improve
1 parent e26f1dc commit 367cd60

File tree

2 files changed

+41
-77
lines changed
  • docs/platforms/java/common/troubleshooting

2 files changed

+41
-77
lines changed

docs/platforms/java/common/troubleshooting/sentry-cli-execution-fails/index.mdx

Lines changed: 0 additions & 77 deletions
This file was deleted.
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
---
2+
title: Sentry CLI Execution Failure when using Sentry Maven plugin
3+
description: "Troubleshoot and resolve sentry-cli execution failures when using the Sentry Maven plugin."
4+
sidebar_order: 1001
5+
---
6+
7+
The Sentry Maven plugin may fail to execute `sentry-cli` in certain environments.
8+
9+
## Symptoms
10+
11+
A build using `sentry-maven-plugin` fails during execution of `sentry-cli` (e.g. to collect and upload a source bundle).
12+
13+
## Solution
14+
15+
First, enable debug logs for both the plugin and `sentry-cli`, by setting
16+
17+
```xml
18+
<debug>false</debug>
19+
<debugSentryCli>true</debugSentryCli>
20+
```
21+
22+
in your `<configuration>` for `sentry-maven-plugin`.
23+
24+
You might see similar lines in the logs:
25+
26+
```
27+
[ERROR] Error while attempting to run Sentry CLI:
28+
org.apache.maven.plugin.MojoExecutionException: An Ant BuildException has occured: Execute failed: java.io.IOException: Cannot run program "/bin/sh" [...]
29+
```
30+
31+
A possible solution is to add the following JVM option to switch the process launch mechanism to `vfork`:
32+
33+
```bash
34+
-Djdk.lang.Process.launchMechanism=vfork
35+
```
36+
37+
## Related Issue
38+
39+
For more details about this issue and the investigation process, see [GitHub Issue #169](https://github.com/getsentry/sentry-maven-plugin/issues/169).
40+
41+
If this doesn't solve the problem, please [open a issue on GitHub](https://github.com/getsentry/sentry-maven-plugin/issues/new/choose).

0 commit comments

Comments
 (0)