getsentry / self-hosted

Sentry, feature-complete and packaged up for low-volume deployments and proofs-of-concept
https://develop.sentry.dev/self-hosted/
Other
7.55k stars 1.72k forks source link

Some uploaded files are now missing on the server #1530

Closed yufanghui closed 2 years ago

yufanghui commented 2 years ago

Version

How do you use Sentry? self-hosted/on-premise (21.x)

Which SDK and version? e.g: sentry-cocoa, 7.16

Steps to Reproduce

use fastlane action default_platform(:ios) platform :ios do desc "upload dsym to sentry" lane :upload_dsym do sentry_upload_dsym( url:"https://myhost/", auth_token: 'mytoken', org_slug: 'myorg', project_slug: 'myproject', dsym_path: "./myproject.app.dSYM.zip" ) end end

2.excute fastlane action bundle exec fastlane upload_dsym --verbose

Expected Result

upload success

Actual Result

[✔] 🚀 DEBUG [2022-06-16 15:22:34.94]: Checking if there are any plugins that should be loaded... DEBUG [2022-06-16 15:22:34.95]: Loading 'fastlane-plugin-sentry' plugin INFO [2022-06-16 15:22:34.95]: gem 'fastlane-plugin-sentry' is already installed +------------------------+---------+----------------------------------------------------+ | Used plugins | +------------------------+---------+----------------------------------------------------+ | Plugin | Version | Action | +------------------------+---------+----------------------------------------------------+ | fastlane-plugin-sentry | 1.12.0 | sentry_check_cli_installed, sentry_create_deploy, | | | | sentry_create_release, sentry_finalize_release, | | | | sentry_set_commits, sentry_upload_dif, | | | | sentry_upload_dsym, sentry_upload_file, | | | | sentry_upload_proguard, sentry_upload_sourcemap | +------------------------+---------+----------------------------------------------------+

Successfully loaded Appfile at path '/Users/mac/src/project/fastlane/Appfile' Successfully loaded Appfile at path '/Users/mac/src/project/fastlane/Appfile' INFO [2022-06-16 15:22:35.08]: ------------------------------ INFO [2022-06-16 15:22:35.08]: --- Step: default_platform --- INFO [2022-06-16 15:22:35.08]: ------------------------------ INFO [2022-06-16 15:22:35.08]: Driving the lane 'ios upload_dsym' 🚀 INFO [2022-06-16 15:22:35.08]: -------------------------------- INFO [2022-06-16 15:22:35.08]: --- Step: sentry_upload_dsym --- INFO [2022-06-16 15:22:35.08]: -------------------------------- INFO [2022-06-16 15:22:35.08]: sentry-cli 2.1.0 installed! INFO [2022-06-16 15:22:35.08]: Starting sentry-cli... DEBUG [2022-06-16 15:22:35.08]: sentry-cli command:

INFO [2022-06-16 15:22:35.08]: $ ["/opt/homebrew/bin/sentry-cli", "upload-dsym", "/Users/mac/src/project/sentry_dysm/project.app.dSYM.zip"] DEBUG [2022-06-16 15:22:35.08]:

INFO [2022-06-16 15:22:37.51]: > Found 1 debug information file INFO [2022-06-16 15:22:38.13]: > Prepared debug information file for upload INFO [2022-06-16 15:22:39.82]: > Uploaded 1 missing debug information file DEBUG [2022-06-16 15:22:39.88]: INFO 2022-06-16 15:22:35.093460 +08:00 Loaded config from /Users/mac/.sentryclirc DEBUG [2022-06-16 15:22:39.88]: DEBUG 2022-06-16 15:22:35.093850 +08:00 sentry-cli version: 2.1.0, platform: "darwin", architecture: "arm64" DEBUG [2022-06-16 15:22:39.88]: INFO 2022-06-16 15:22:35.093854 +08:00 sentry-cli was invoked with the following command line: "/opt/homebrew/bin/sentry-cli" "upload-dsym" "/Users/mac/src/project/sentry_dysm/project.app.dSYM.zip" DEBUG [2022-06-16 15:22:39.88]: INFO 2022-06-16 15:22:35.093861 +08:00 Issuing a command for Organization: sentry Project: ios DEBUG [2022-06-16 15:22:39.88]: DEBUG 2022-06-16 15:22:36.756830 +08:00 request GET https://myhost/api/0/organizations/sentry/chunk-upload/ DEBUG [2022-06-16 15:22:39.88]: DEBUG 2022-06-16 15:22:36.756846 +08:00 using token authentication DEBUG [2022-06-16 15:22:39.88]: DEBUG 2022-06-16 15:22:36.756851 +08:00 retry number 0, max retries: 0 DEBUG [2022-06-16 15:22:39.88]: DEBUG 2022-06-16 15:22:36.823969 +08:00 > GET /api/0/organizations/sentry/chunk-upload/ HTTP/1.1 DEBUG [2022-06-16 15:22:39.88]: DEBUG 2022-06-16 15:22:36.823981 +08:00 > Host: myhost DEBUG [2022-06-16 15:22:39.88]: DEBUG 2022-06-16 15:22:36.823984 +08:00 > Accept: / DEBUG [2022-06-16 15:22:39.88]: DEBUG 2022-06-16 15:22:36.823988 +08:00 > Connection: TE DEBUG [2022-06-16 15:22:39.88]: DEBUG 2022-06-16 15:22:36.823993 +08:00 > TE: gzip DEBUG [2022-06-16 15:22:39.88]: DEBUG 2022-06-16 15:22:36.823996 +08:00 > User-Agent: sentry-cli/2.1.0 DEBUG [2022-06-16 15:22:39.88]: DEBUG 2022-06-16 15:22:36.824261 +08:00 > Authorization: Bearer 46841761* DEBUG [2022-06-16 15:22:39.88]: DEBUG 2022-06-16 15:22:36.875306 +08:00 < HTTP/1.1 200 OK DEBUG [2022-06-16 15:22:39.88]: DEBUG 2022-06-16 15:22:36.875319 +08:00 < Server: openresty DEBUG [2022-06-16 15:22:39.88]: DEBUG 2022-06-16 15:22:36.875324 +08:00 < Date: Thu, 16 Jun 2022 07:22:36 GMT DEBUG [2022-06-16 15:22:39.88]: DEBUG 2022-06-16 15:22:36.875327 +08:00 < Content-Type: application/json DEBUG [2022-06-16 15:22:39.88]: DEBUG 2022-06-16 15:22:36.875330 +08:00 < Content-Length: 306 DEBUG [2022-06-16 15:22:39.88]: DEBUG 2022-06-16 15:22:36.875334 +08:00 < Connection: keep-alive DEBUG [2022-06-16 15:22:39.88]: DEBUG 2022-06-16 15:22:36.875336 +08:00 < Allow: GET, POST, HEAD, OPTIONS DEBUG [2022-06-16 15:22:39.88]: DEBUG 2022-06-16 15:22:36.875338 +08:00 < Access-Control-Allow-Methods: GET, POST, HEAD, OPTIONS DEBUG [2022-06-16 15:22:39.88]: DEBUG 2022-06-16 15:22:36.875346 +08:00 < Access-Control-Allow-Headers: X-Sentry-Auth, X-Requested-With, Origin, Accept, Content-Type, Authentication, Authorization, Content-Encoding DEBUG [2022-06-16 15:22:39.88]: DEBUG 2022-06-16 15:22:36.875350 +08:00 < Access-Control-Expose-Headers: X-Sentry-Error, Retry-After DEBUG [2022-06-16 15:22:39.88]: DEBUG 2022-06-16 15:22:36.875352 +08:00 < Access-Control-Allow-Origin: DEBUG [2022-06-16 15:22:39.88]: DEBUG 2022-06-16 15:22:36.875355 +08:00 < Vary: Accept-Language, Cookie DEBUG [2022-06-16 15:22:39.88]: DEBUG 2022-06-16 15:22:36.875357 +08:00 < Content-Language: en DEBUG [2022-06-16 15:22:39.88]: DEBUG 2022-06-16 15:22:36.875359 +08:00 < X-Frame-Options: deny DEBUG [2022-06-16 15:22:39.88]: DEBUG 2022-06-16 15:22:36.875361 +08:00 < X-Content-Type-Options: nosniff DEBUG [2022-06-16 15:22:39.88]: DEBUG 2022-06-16 15:22:36.875363 +08:00 < X-XSS-Protection: 1; mode=block DEBUG [2022-06-16 15:22:39.88]: DEBUG 2022-06-16 15:22:36.875366 +08:00 < Cache-Control: private DEBUG [2022-06-16 15:22:39.88]: DEBUG 2022-06-16 15:22:36.875384 +08:00 response status: 200 DEBUG [2022-06-16 15:22:39.88]: DEBUG 2022-06-16 15:22:36.875388 +08:00 body: {"url":"http://myhost/api/0/organizations/sentry/chunk-upload/","chunkSize":8388608,"chunksPerRequest":64,"maxFileSize":2147483648,"maxRequestSize":33554432,"concurrency":8,"hashAlgorithm":"sha1","compression":["gzip"],"accept":["debug_files","release_files","pdbs","sources","bcsymbolmaps"]} DEBUG [2022-06-16 15:22:39.88]: DEBUG 2022-06-16 15:22:38.135053 +08:00 request POST https://myhost/api/0/projects/sentry/ios/files/difs/assemble/ DEBUG [2022-06-16 15:22:39.88]: DEBUG 2022-06-16 15:22:38.135072 +08:00 using token authentication DEBUG [2022-06-16 15:22:39.88]: DEBUG 2022-06-16 15:22:38.135089 +08:00 json body: {"8b70b742476b4c25823b6ac2b3bb6f1a04074d9a":{"name":"project","debug_id":"b66608ef-c63d-332e-8562-0d8559dd15a1","chunks":["13296e6c052d4d76bfebcd83f91e5aee7522159b","8e5f8388478c2893011da4be8a338399473f5e37","64e98fb7b164aaaf1fc9eb82fa8802a11f19d6a7","6687c9677f81161305030129b13570cf03a08e73","e84bb22aef725386947cd6087d4e61bb56322a75","f158ebdea63310ad9a69ac0894f083b50fc58485","360bccc28ab2e44c1c245ee20778cf22bcbe0446","b46ca3cfd335910f4aef13eee34c807bb41bcaae","06aee8ad9803ab5d4a0e02b3d0b78f0da98391c7","3a10df40d9bd1b35fc50de766901618f5900a80a","8374a4cd5fe07df2f2a0a1cfd55485d57ff1983b","4472ff75fd5a705c232876dad026d4a387c8a005","9808764fb53d7ed5a20e273dcbaeedc7884ca2fe","ddfa4541f6abcb8a5129220d93204046e320010a","aac9625151f4f152993142eb96e840fb9f0875d9","a37afd822b2944b4798a8e8d15db8496307f0d69","0bd2d22697be98fa4a51d78e3807fca5595bf9e6","8419b8e28e750859eca82a217c6369c2e0ae8e45","84cdd6851e579b2573c318731e3729827bd4e9e2","6f55cbdcf6f0fbe1e2865a8e496e04596182cc91","cfcb52956d6b4fca0ee27b80bb1543c0fc987253","c7bfc5b2ca7a4f83b6417d9503affca8d960a648","8c31588f54f1ccb1a2238bcef1de5e384a70bffa","51871635d09d6574d8423ea5fb9ff231a05992bb","72b072db3d00e9d4620ea98c834abdbb1a47faae","e293cffa1f4c5e517332942c0916f2b1540220f9","8c78b1d86dd1ab9fcfb7fcf5f41cccfdee26ef74"]}} DEBUG [2022-06-16 15:22:39.88]: DEBUG 2022-06-16 15:22:38.135099 +08:00 retry number 0, max retries: 5 DEBUG [2022-06-16 15:22:39.88]: DEBUG 2022-06-16 15:22:38.135224 +08:00 > POST /api/0/projects/sentry/ios/files/difs/assemble/ HTTP/1.1 DEBUG [2022-06-16 15:22:39.88]: DEBUG 2022-06-16 15:22:38.135227 +08:00 > Host: myhost DEBUG [2022-06-16 15:22:39.88]: DEBUG 2022-06-16 15:22:38.135228 +08:00 > Accept: / DEBUG [2022-06-16 15:22:39.88]: DEBUG 2022-06-16 15:22:38.135230 +08:00 > Connection: TE DEBUG [2022-06-16 15:22:39.88]: DEBUG 2022-06-16 15:22:38.135232 +08:00 > TE: gzip DEBUG [2022-06-16 15:22:39.88]: DEBUG 2022-06-16 15:22:38.135233 +08:00 > User-Agent: sentry-cli/2.1.0 DEBUG [2022-06-16 15:22:39.88]: DEBUG 2022-06-16 15:22:38.135249 +08:00 > Authorization: Bearer 46841761 DEBUG [2022-06-16 15:22:39.88]: DEBUG 2022-06-16 15:22:38.135251 +08:00 > Content-Type: application/json DEBUG [2022-06-16 15:22:39.88]: DEBUG 2022-06-16 15:22:38.135253 +08:00 > Content-Length: 1295 DEBUG [2022-06-16 15:22:39.88]: DEBUG 2022-06-16 15:22:38.344366 +08:00 < HTTP/1.1 200 OK DEBUG [2022-06-16 15:22:39.88]: DEBUG 2022-06-16 15:22:38.344434 +08:00 < Server: openresty DEBUG [2022-06-16 15:22:39.88]: DEBUG 2022-06-16 15:22:38.344446 +08:00 < Date: Thu, 16 Jun 2022 07:22:38 GMT DEBUG [2022-06-16 15:22:39.88]: DEBUG 2022-06-16 15:22:38.344467 +08:00 < Content-Type: application/json DEBUG [2022-06-16 15:22:39.88]: DEBUG 2022-06-16 15:22:38.344478 +08:00 < Content-Length: 1245 DEBUG [2022-06-16 15:22:39.88]: DEBUG 2022-06-16 15:22:38.344494 +08:00 < Connection: keep-alive DEBUG [2022-06-16 15:22:39.88]: DEBUG 2022-06-16 15:22:38.344504 +08:00 < Allow: POST, OPTIONS DEBUG [2022-06-16 15:22:39.88]: DEBUG 2022-06-16 15:22:38.344513 +08:00 < Access-Control-Allow-Methods: POST, OPTIONS DEBUG [2022-06-16 15:22:39.88]: DEBUG 2022-06-16 15:22:38.344531 +08:00 < Access-Control-Allow-Headers: X-Sentry-Auth, X-Requested-With, Origin, Accept, Content-Type, Authentication, Authorization, Content-Encoding DEBUG [2022-06-16 15:22:39.88]: DEBUG 2022-06-16 15:22:38.344559 +08:00 < Access-Control-Expose-Headers: X-Sentry-Error, Retry-After DEBUG [2022-06-16 15:22:39.88]: DEBUG 2022-06-16 15:22:38.344573 +08:00 < Access-Control-Allow-Origin: * DEBUG [2022-06-16 15:22:39.88]: DEBUG 2022-06-16 15:22:38.344583 +08:00 < Vary: Accept-Language, Cookie DEBUG [2022-06-16 15:22:39.88]: DEBUG 2022-06-16 15:22:38.344593 +08:00 < Content-Language: en DEBUG [2022-06-16 15:22:39.88]: DEBUG 2022-06-16 15:22:38.344602 +08:00 < X-Frame-Options: deny DEBUG [2022-06-16 15:22:39.88]: DEBUG 2022-06-16 15:22:38.344611 +08:00 < X-Content-Type-Options: nosniff DEBUG [2022-06-16 15:22:39.88]: DEBUG 2022-06-16 15:22:38.344620 +08:00 < X-XSS-Protection: 1; mode=block DEBUG [2022-06-16 15:22:39.88]: DEBUG 2022-06-16 15:22:38.344629 +08:00 < Cache-Control: private DEBUG [2022-06-16 15:22:39.88]: DEBUG 2022-06-16 15:22:38.344678 +08:00 response status: 200 DEBUG [2022-06-16 15:22:39.88]: DEBUG 2022-06-16 15:22:38.344695 +08:00 body: {"8b70b742476b4c25823b6ac2b3bb6f1a04074d9a":{"state":"not_found","missingChunks":["e84bb22aef725386947cd6087d4e61bb56322a75","06aee8ad9803ab5d4a0e02b3d0b78f0da98391c7","8419b8e28e750859eca82a217c6369c2e0ae8e45","ddfa4541f6abcb8a5129220d93204046e320010a","f158ebdea63310ad9a69ac0894f083b50fc58485","8e5f8388478c2893011da4be8a338399473f5e37","84cdd6851e579b2573c318731e3729827bd4e9e2","9808764fb53d7ed5a20e273dcbaeedc7884ca2fe","6f55cbdcf6f0fbe1e2865a8e496e04596182cc91","8c31588f54f1ccb1a2238bcef1de5e384a70bffa","a37afd822b2944b4798a8e8d15db8496307f0d69","72b072db3d00e9d4620ea98c834abdbb1a47faae","13296e6c052d4d76bfebcd83f91e5aee7522159b","aac9625151f4f152993142eb96e840fb9f0875d9","cfcb52956d6b4fca0ee27b80bb1543c0fc987253","c7bfc5b2ca7a4f83b6417d9503affca8d960a648","b46ca3cfd335910f4aef13eee34c807bb41bcaae","0bd2d22697be98fa4a51d78e3807fca5595bf9e6","8374a4cd5fe07df2f2a0a1cfd55485d57ff1983b","4472ff75fd5a705c232876dad026d4a387c8a005","e293cffa1f4c5e517332942c0916f2b1540220f9","6687c9677f81161305030129b13570cf03a08e73","3a10df40d9bd1b35fc50de766901618f5900a80a","64e98fb7b164aaaf1fc9eb82fa8802a11f19d6a7","360bccc28ab2e44c1c245ee20778cf22bcbe0446","51871635d09d6574d8423ea5fb9ff231a05992bb","8c78b1d86dd1ab9fcfb7fcf5f41cccfdee26ef74"]}} ERROR [2022-06-16 15:22:39.88]: error: Some uploaded files are now missing on the server. Please retry by running sentry-cli upload-dif again. If this problem persists, please report a bug. DEBUG [2022-06-16 15:22:39.88]: DEBUG 2022-06-16 15:22:39.877571 +08:00 skipping update nagger because session is not attended WARN [2022-06-16 15:22:39.88]: Lane Context: INFO [2022-06-16 15:22:39.88]: {:DEFAULT_PLATFORM=>:ios, :PLATFORM_NAME=>:ios, :LANE_NAME=>"ios upload_dsym"} ERROR [2022-06-16 15:22:39.88]: Error while calling Sentry CLI

aminvakil commented 2 years ago

Try uploading the file directly to self-hosted nginx and bypass your openresty reverse proxy to be sure, then please look for self-hosted logs.

Also please state your self-hosted version accurately.

yufanghui commented 2 years ago

openresty reverse proxy

how can i do that?I am an APP developer, do not know how to configure the server,should i change the server config?

aminvakil commented 2 years ago

You should be able to read the logs at the server at least.

yufanghui commented 2 years ago

You should be able to read the logs at the server at least.

OK,thanks for your reply,could you please tell me which dir will souce map store on the server?

aminvakil commented 2 years ago

I don't know the exact folder really, @chadwhitacre any ideas?

yufanghui commented 2 years ago

@aminvakil i have fix this issue,Sentry - CLI first sends a get request to get the upload address, the upload address is HTTP request, the server is configured to redirect to HTTPS, so 307 is returned, modify the root url to https can fix this return value, thanks you guys very much

chadwhitacre commented 2 years ago

Glad you sorted it out @yufanghui, thanks for posting back.