You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was able to reproduce this issue en 2.26.0 and 2.21.3 as well.
Expected Result
The command should finish uploading debug files in the background.
Actual Result
The command stopped after going to the background without any error, no files were uploaded.
Logs
When filing a bug report, please attach debug logs, either by using --log-level=debug flag or SENTRY_LOG_LEVEL=debug environment variable.
Before going to the background:
DEBUG 2024-01-24 22:15:21.475418 +01:00 sentry-cli version: 2.21.3, platform: "darwin", architecture: "arm64"
INFO 2024-01-24 22:15:21.475577 +01:00 sentry-cli was invoked with the following command line: "sentry-cli" "debug-files" "upload" "--include-sources" "/Users/.../Library/Developer/Xcode/DerivedData/...-hczxkiymbkgecveoyxfadvexicxk/Build/Products/Debug-iphonesimulator"
INFO 2024-01-24 22:15:21.475587 +01:00 Issuing a command for Organization: ... Project: ...
Continuing in background.
Thank you for reporting! It would be extremely helpful to get the logs from the background, though. Perhaps @krystofwoldrich would know how you can obtain the logs, since he was able to include them on #1895
@lionel-alves We just released version 2.27.0, which includes the #1920 change that @krystofwoldrich mentioned above. This change will print the log output file path when the CLI goes into the background.
Please share the background logs with us, so we can investigate your issue.
Hey @lionel-alves we had an issue recently where someone received a similar "Operation not permitted" error message. The root cause of the issue was that the .sentryclirc configuration file that the Sentry CLI needed to access was not specified as an "input file" to the run script, and therefore Xcode blocked access to it (Xcode run scripts are sandboxed).
In your case, it might be that the Xcode sandbox is blocking access to the DSYM files. Could you try adding these to the run script's input files list, as I describe in this comment (of course, replacing .sentryclirc with the DSYM file path)?
Hey @szokeasaurusrex, thanks for your feedback but I didn't use .sentryclirc (set all the arg directly in the command) for now.
Adding --force-foreground let me see more logs in Xcode:
thanks for your feedback but I didn't use .sentryclirc (set all the arg directly in the command) for now.
@lionel-alves, yes, I understand that you are not using .sentryclirc. As I already stated in my previous comment, I believe in your case that the cause is that the Xcode sandbox is blocking access to the DSYM files. The output you provided in your most recent comment confirms the Xcode sandbox is blocking the access.
As I additionally already stated in my previous comment, your problem is most likely going to be solved by adding the DSYM files to the Xcode run script's input file lists, similar to how I suggested adding the .sentryclirc file to the list on this comment. Of course, in your case, you need to replace .sentryclirc with the path to the DSYM files 😃
Hope that helps! Please let me know if you are still confused or have any other struggles
Activity
szokeasaurusrex commentedon Jan 25, 2024
Thank you for reporting! It would be extremely helpful to get the logs from the background, though. Perhaps @krystofwoldrich would know how you can obtain the logs, since he was able to include them on #1895
krystofwoldrich commentedon Jan 29, 2024
@lionel-alves Thank you for testing it with the older CLI version.
But you should be able to find the file in
$TMPDIR, after running theBuild Phase, the file name is a UUID v4.szokeasaurusrex commentedon Jan 30, 2024
@lionel-alves We just released version
2.27.0, which includes the #1920 change that @krystofwoldrich mentioned above. This change will print the log output file path when the CLI goes into the background.Please share the background logs with us, so we can investigate your issue.
lionel-alves commentedon Feb 1, 2024
@szokeasaurusrex @krystofwoldrich Here is what I am getting:
FYI the file is created and deleted very quickly after, I had to use fswatch to get those logs.
szokeasaurusrex commentedon Feb 1, 2024
Hey @lionel-alves we had an issue recently where someone received a similar "Operation not permitted" error message. The root cause of the issue was that the
.sentryclircconfiguration file that the Sentry CLI needed to access was not specified as an "input file" to the run script, and therefore Xcode blocked access to it (Xcode run scripts are sandboxed).In your case, it might be that the Xcode sandbox is blocking access to the DSYM files. Could you try adding these to the run script's input files list, as I describe in this comment (of course, replacing
.sentryclircwith the DSYM file path)?lionel-alves commentedon Feb 1, 2024
Hey @szokeasaurusrex, thanks for your feedback but I didn't use
.sentryclirc(set all the arg directly in the command) for now.Adding
--force-foregroundlet me see more logs in Xcode:szokeasaurusrex commentedon Feb 1, 2024
@lionel-alves, yes, I understand that you are not using
.sentryclirc. As I already stated in my previous comment, I believe in your case that the cause is that the Xcode sandbox is blocking access to the DSYM files. The output you provided in your most recent comment confirms the Xcode sandbox is blocking the access.As I additionally already stated in my previous comment, your problem is most likely going to be solved by adding the DSYM files to the Xcode run script's input file lists, similar to how I suggested adding the
.sentryclircfile to the list on this comment. Of course, in your case, you need to replace.sentryclircwith the path to the DSYM files 😃Hope that helps! Please let me know if you are still confused or have any other struggles
lionel-alves commentedon Feb 1, 2024
Disabling
ENABLE_USER_SCRIPT_SANDBOXINGin the Build Settings fixes the issue for me.