sentry-cli icon indicating copy to clipboard operation
sentry-cli copied to clipboard

iOS - Sentry Debug Files Upload Failure

Open santicarmo31 opened this issue 1 year ago • 4 comments

CLI Version

2.31.0

Operating System and Architecture

  • [x] macOS (arm64)
  • [ ] macOS (x86_64)
  • [ ] Linux (i686)
  • [ ] Linux (x86_64)
  • [ ] Linux (armv7)
  • [ ] Linux (aarch64)
  • [ ] Windows (i686)
  • [ ] Windows (x86_64)

Operating System Version

macOS 14.5

Link to reproduction repository

No response

CLI Command

sentry-cli-Darwin-universal "debug-files" "upload" "." "--wait"

Exact Reproduction Steps

During the execution of the sentry_debug_files_upload step in our Fastlane setup, we encountered an error. The process failed with the message "Invalid checksum", causing the Sentry symbol upload to fail.

Details:

  • Fastlane version: 2.212.2
  • Command: sentry_debug_files_upload

Expected Results

Expected result:

The sentry_debug_files_upload step should complete successfully and upload the debug symbols to Sentry.

Actual Results

The sentry_debug_files_upload step fails with an "Invalid checksum" error.

Any help or guidance on this issue would be greatly appreciated.

Logs

Failing logs

13:01:31]: Using sentry-cli 2.31.0
[13:01:31]: Starting sentry-cli...
[13:01:31]: DEBUG   2024-06-19 13:01:31.990639 -07:00 sentry-cli version: 2.31.0, platform: "darwin", architecture: "arm64"
[13:01:31]: INFO    2024-06-19 13:01:31.990695 -07:00 sentry-cli was invoked with the following command line: "/Users/administrator/actions-runner/_work/nomad/nomad/vendor/bundle/ruby/2.6.0/gems/fastlane-plugin-sentry-1.22.0/bin/sentry-cli-Darwin-universal" "debug-files" "upload" "." "--wait"
[13:01:31]: INFO    2024-06-19 13:01:31.990704 -07:00 Issuing a command for Organization: org Project: project
[13:01:31]: DEBUG   2024-06-19 13:01:31.991186 -07:00 request GET https://sentry.io/api/0/organizations/org/chunk-upload/
[13:01:31]: DEBUG   2024-06-19 13:01:31.991196 -07:00 using token authentication
[13:01:31]: DEBUG   2024-06-19 13:01:31.991202 -07:00 retry number 0, max retries: 0
[13:01:32]: DEBUG   2024-06-19 13:01:32.024560 -07:00 > GET /api/0/organizations/org/chunk-upload/ HTTP/1.1
[13:01:32]: DEBUG   2024-06-19 13:01:32.024569 -07:00 > Host: sentry.io
[13:01:32]: DEBUG   2024-06-19 13:01:32.024571 -07:00 > Accept: */*
[13:01:32]: DEBUG   2024-06-19 13:01:32.024573 -07:00 > Connection: TE
[13:01:32]: DEBUG   2024-06-19 13:01:32.024575 -07:00 > TE: gzip
[13:01:32]: DEBUG   2024-06-19 13:01:32.024577 -07:00 > User-Agent: sentry-cli/2.31.0
[13:01:32]: DEBUG   2024-06-19 13:01:32.025205 -07:00 > Authorization: ***
[13:01:32]: DEBUG   2024-06-19 13:01:32.144457 -07:00 < HTTP/1.1 200 OK
[13:01:32]: DEBUG   2024-06-19 13:01:32.144477 -07:00 < server: nginx
[13:01:32]: DEBUG   2024-06-19 13:01:32.144484 -07:00 < date: Wed, 19 Jun 2024 20:01:32 GMT
[13:01:32]: DEBUG   2024-06-19 13:01:32.144490 -07:00 < content-type: application/json
[13:01:32]: DEBUG   2024-06-19 13:01:32.144496 -07:00 < vary: Accept-Encoding,Accept-Language, Cookie
[13:01:32]: DEBUG   2024-06-19 13:01:32.144502 -07:00 < allow: GET, POST, HEAD, OPTIONS
[13:01:32]: DEBUG   2024-06-19 13:01:32.144507 -07:00 < access-control-allow-methods: GET, POST, HEAD, OPTIONS
[13:01:32]: DEBUG   2024-06-19 13:01:32.144518 -07:00 < access-control-allow-headers: X-Sentry-Auth, X-Requested-With, Origin, Accept, Content-Type, Authentication, Authorization, Content-Encoding, sentry-trace, baggage, X-CSRFToken
[13:01:32]: DEBUG   2024-06-19 13:01:32.144525 -07:00 < access-control-expose-headers: X-Sentry-Error, X-Sentry-Direct-Hit, X-Hits, X-Max-Hits, Endpoint, Retry-After, Link
[13:01:32]: DEBUG   2024-06-19 13:01:32.144532 -07:00 < access-control-allow-origin: *
[13:01:32]: DEBUG   2024-06-19 13:01:32.144537 -07:00 < x-sentry-rate-limit-remaining: 39
[13:01:32]: DEBUG   2024-06-19 13:01:32.144543 -07:00 < x-sentry-rate-limit-limit: 40
[13:01:32]: DEBUG   2024-06-19 13:01:32.144548 -07:00 < x-sentry-rate-limit-reset: 1718827293
[13:01:32]: DEBUG   2024-06-19 13:01:32.144554 -07:00 < x-sentry-rate-limit-concurrentremaining: 24
[13:01:32]: DEBUG   2024-06-19 13:01:32.144559 -07:00 < x-sentry-rate-limit-concurrentlimit: 25
[13:01:32]: DEBUG   2024-06-19 13:01:32.144590 -07:00 < content-language: en
[13:01:32]: DEBUG   2024-06-19 13:01:32.144603 -07:00 < x-frame-options: deny
[13:01:32]: DEBUG   2024-06-19 13:01:32.144611 -07:00 < x-content-type-options: nosniff
[13:01:32]: DEBUG   2024-06-19 13:01:32.144617 -07:00 < x-xss-protection: 1; mode=block
[13:01:32]: DEBUG   2024-06-19 13:01:32.144629 -07:00 < content-security-policy: object-src 'none'; script-src 'self' 'unsafe-inline' 'report-sample' s1.sentry-cdn.com js.sentry-cdn.com browser.sentry-cdn.com statuspage-production.s3.amazonaws.com static.zdassets.com aui-cdn.atlassian.com connect-cdn.atl-paas.net js.stripe.com 'strict-dynamic' cdn.pendo.io data.pendo.io pendo-io-static.storage.googleapis.com pendo-static-5634074999128064.storage.googleapis.com; style-src * 'unsafe-inline'; media-src *; connect-src 'self' *.algolia.net *.algolianet.com *.algolia.io sentry.io *.sentry.io s1.sentry-cdn.com o1.ingest.sentry.io api2.amplitude.com app.pendo.io data.pendo.io reload.getsentry.net t687h3m0nh65.statuspage.io sentry.zendesk.com ekr.zdassets.com maps.googleapis.com; frame-ancestors 'self' *.sentry.io; frame-src app.pendo.io demo.arcade.software js.stripe.com sentry.io; font-src * data:; img-src * blob: data:; base-uri 'none'; default-src 'none'; worker-src blob:; report-uri https://o1.ingest.sentry.io/api/54785/security/?sentry_key=f724a8a027db45f5b21507e7142ff78e&sentry_release=2e164634e1fac6c165f5e4e72cfd80b0e8b5c154
[13:01:32]: DEBUG   2024-06-19 13:01:32.144637 -07:00 < x-envoy-attempt-count: 1
[13:01:32]: DEBUG   2024-06-19 13:01:32.144642 -07:00 < x-envoy-upstream-service-time: 62
[13:01:32]: DEBUG   2024-06-19 13:01:32.144647 -07:00 < x-served-by: getsentry-web-rpc-production-754d9987bd-5lfgx
[13:01:32]: DEBUG   2024-06-19 13:01:32.144653 -07:00 < x-sentry-proxy-url: http://10.2.0.67:8999/api/0/organizations/org/chunk-upload/
[13:01:32]: DEBUG   2024-06-19 13:01:32.144659 -07:00 < x-served-by: getsentry-control-web-default-common-production-765d8b6c99khlzh
[13:01:32]: DEBUG   2024-06-19 13:01:32.144664 -07:00 < x-served-by: frontend-default-65dd9bd965-m85hr
[13:01:32]: DEBUG   2024-06-19 13:01:32.144670 -07:00 < strict-transport-security: max-age=31536000; includeSubDomains; preload
[13:01:32]: DEBUG   2024-06-19 13:01:32.144677 -07:00 < via: 1.1 google
[13:01:32]: DEBUG   2024-06-19 13:01:32.144683 -07:00 < Alt-Svc: h3=":443"; ma=2592000,h3-29=":443"; ma=2592000
[13:01:32]: DEBUG   2024-06-19 13:01:32.144689 -07:00 < Transfer-Encoding: chunked
[13:01:32]: DEBUG   2024-06-19 13:01:32.146320 -07:00 response status: 200
[13:01:32]: DEBUG   2024-06-19 13:01:32.146331 -07:00 body: {"url":"https://us.sentry.io/api/0/organizations/org/chunk-upload/","chunkSize":8388608,"chunksPerRequest":64,"maxFileSize":2147483648,"maxRequestSize":33554432,"concurrency":8,"hashAlgorithm":"sha1","compression":["gzip"],"accept":["debug_files","release_files","pdbs","sources","bcsymbolmaps","il2cpp","portablepdbs","artifact_bundles","artifact_bundles_v2"]}
[13:01:35]: error: Invalid checksum
[13:01:35]: DEBUG   2024-06-19 13:01:35.659584 -07:00 skipping update nagger because session is not attended
[13:01:35]: Sentry symbol upload failed.

santicarmo31 avatar Jun 19 '24 21:06 santicarmo31

Hey @Fwang36 Thanks for reporting this!

One thing to consider: If people add the AWS Layer to their function (instrumenting their Lambda function without changing their code) they can not set the DEBUG=True flag, thus would never see the timeout warning.

antonpirker avatar Aug 29 '23 12:08 antonpirker

Maybe we should add an env var to the layer instrumentation to enable/disable the debug flag in sentry.init().

antonpirker avatar Aug 29 '23 12:08 antonpirker

As the users can set the timeout_warnings option I will close this issue.

antonpirker avatar Dec 11 '24 09:12 antonpirker

@antonpirker - Behavior will be unchanged?

DM1145 avatar Dec 11 '24 18:12 DM1145

@antonpirker - I agree that a single line with the warning should get written to the log, but I'd think that unless the debug flag is set, that should be the only line written there.

Current Logged Messages without Debug flag set:

Exception in thread Thread-1: Traceback (most recent call last): File "/var/lang/lib/python3.9/threading.py", line 980, in _bootstrap_inner self.run() File "/opt/python/sentry_sdk/integrations/threading.py", line 100, in run return _run_old_run_func() File "/opt/python/sentry_sdk/integrations/threading.py", line 95, in _run_old_run_func reraise(*_capture_exception()) File "/opt/python/sentry_sdk/utils.py", line 1690, in reraise raise value File "/opt/python/sentry_sdk/integrations/threading.py", line 93, in _run_old_run_func return old_run_func(self, *a, **kw) File "/opt/python/sentry_sdk/utils.py", line 1449, in run raise ServerlessTimeoutWarning( sentry_sdk.utils.ServerlessTimeoutWarning: WARNING : Function is expected to get timed out. Configured timeout duration = 5 seconds.

Expected Logged Messages without Debug flag set:

sentry_sdk.utils.ServerlessTimeoutWarning: WARNING : Function is expected to get timed out. Configured timeout duration = 5 seconds.

Should I reopen this ticket or create a new one?

DM1145 avatar Dec 13 '24 21:12 DM1145