Appcenter-cli: Error Failed to upload ZIP with symbols

Created on 5 Feb 2020  路  8Comments  路  Source: microsoft/appcenter-cli

appcenter crashes upload-symbols --debug --symbol SOME_TOKEN/symbols.zip --app SOME_TOKEN --token SOME_TOKEN
Using appcenter-cli version: 2.3.3
| Uploading symbols...logFilter, request: {
  "rawResponse": false,
  "queryString": {},
  "url": "https://api.appcenter.ms/v0.1/apps/SOME_TOKEN/symbol_uploads",
  "method": "POST",
  "headers": {
    "Content-Type": "application/json; charset=utf-8",
    "user-agent": "appcenterCli/2.3.3 NodeJS/v13.2.0 darwin/18.7.0",
    "x-api-token": "SOME_TOKEN"
  },
  "body": "{\"symbol_type\":\"Apple\"}"
}
- Uploading symbols...Response status code: 200
Body: {"symbol_upload_id":"SOME_TOKEN","upload_url":"SOME_TOKEN","expiration_date":"2020-02-05T22:26:14.323Z"}
\ Uploading symbols...logFilter, request: {
  "rawResponse": false,
  "queryString": {},
  "url": "SOME_TOKEN",
  "method": "PATCH",
  "headers": {
    "Content-Type": "application/json; charset=utf-8",
    "user-agent": "appcenterCli/2.3.3 NodeJS/v13.2.0 darwin/18.7.0",
    "x-api-token": "SOME_TOKEN"
  },
  "body": "{\"status\":\"aborted\"}"
}
- Uploading symbols...Response status code: 200
Body: {"symbol_upload_id":"SOME_TOKEN","app_id":"SOME_TOKEN","user":{"email":"SOME_TOKEN","display_name":"SOME_TOKEN"},"status":"aborted","symbol_type":"Apple","symbols_uploaded":[],"origin":"User","file_name":"upload-2020-02-04T22-26-14Z.zip","file_size":0,"timestamp":"2020-02-04T22:42:38.794Z"}
Error: failed to upload ZIP with symbols

How do I fix "Error: failed to upload ZIP with symbols"? With --debug I see the software is sending an aborted request for some reason?

I'm not being presented with any info I can use to troubleshoot the issue myself.

Any help?

Crashes Enhancements

Most helpful comment

We have been witnessing the issue ourselves when trying to upload large symbol files (hundreds of MB) - the file size itself is not directly the problem. It seems to be more closely related with network resiliency. Looking at the APIs that App Center provides and the CLI uses, you can see the following behavior:

  1. POST to /v0.1/apps/{owner_name}/{app_name}/symbol_uploads to create an upload and acquire an upload_url and upload_id to upload to
  2. Upload data to this upload_url
  3. PATCH /v0.1/apps/{owner_name}/{app_name}/symbol_uploads/{symbol_upload_id} with the upload_id returned in 1. to set the upload to committed (completed).

The failure typically happens within 2. and is part of the azure-storage package being used. It does chunking of the upload and ought to retry if anything in this step fails - however this does not seem to be as resilient as it should. So far we don't have a 100% reproduction of this issue, since it doesn't happen reliably.

There are actually no specific limits for the file size in place for uploads with the CLI.

All 8 comments

I noticed there was a similar ticket https://github.com/microsoft/appcenter-cli/issues/706

Ideally the type of resolution I'm hoping for is an actionable error message and a usable return code or a fix in the software so that the error doesn't occur.

@bobdoe132 are you still seeing this issue? We had an incident with the upload flow a while back that should be fixed by now.

I'm also seeing this issue-- response 200, failed to upload zip-- on appcenter-cli 2.3.3, node 13.10.1, Ubuntu 18.04 VM. For extra information, appcenter-cli always seems to give an exit value of 3 when this occurs.

After some conversation with AppCenter support, they suggested posting here. From their looking-over our logs, they can see that we may be hitting a max upload size (one of our files is ~716 MB), and/or an upload timeout at around 2 minutes.

Is there a specific reason these limits need to be in place, or can they be loosened?

We have been witnessing the issue ourselves when trying to upload large symbol files (hundreds of MB) - the file size itself is not directly the problem. It seems to be more closely related with network resiliency. Looking at the APIs that App Center provides and the CLI uses, you can see the following behavior:

  1. POST to /v0.1/apps/{owner_name}/{app_name}/symbol_uploads to create an upload and acquire an upload_url and upload_id to upload to
  2. Upload data to this upload_url
  3. PATCH /v0.1/apps/{owner_name}/{app_name}/symbol_uploads/{symbol_upload_id} with the upload_id returned in 1. to set the upload to committed (completed).

The failure typically happens within 2. and is part of the azure-storage package being used. It does chunking of the upload and ought to retry if anything in this step fails - however this does not seem to be as resilient as it should. So far we don't have a 100% reproduction of this issue, since it doesn't happen reliably.

There are actually no specific limits for the file size in place for uploads with the CLI.

we have the same problem for a month in the afternoon
but at night there is no problem

"url": "https://api.appcenter.ms/v0.1/apps/android/*******/symbol_uploads/*********",
   "method": "PATCH",
   "headers": {
     "Content-Type": "application/json; charset=utf-8",
     "user-agent": "appcenterCli/2.6.6 NodeJS/v14.2.0 darwin/19.5.0",
     "x-api-token": "****"
   },
   "body": "{\"status\":\"aborted\"}",
   "strictSSL": false,
   "agent": {
     "options": {
       "proxy": {
         "host": "proxy.****.com",
         "port": "3128",
         "protocol": "http:"
       }
     },
     "proxyOptions": {
       "host": "proxy.****.com",
       "port": "3128",
       "protocol": "http:"
     },
     "maxSockets": null,
     "requests": [],
     "sockets": [],
     "_events": {},
     "_eventsCount": 1
   }
 }
 Response status code: 200
 Body: {"symbol_upload_id":"********","app_id":"*********","user":{"email":"**********","display_name":"******"},"status":"aborted","symbol_type":"AndroidProguard","symbols_uploaded":[],"origin":"User","file_name":"mapping.txt","file_size":0,"timestamp":"2020-08-27T10:03:12.386Z","version":"2.24.2711","build":"2711"}
 Error: failed to upload ZIP with symbols

Same here

appcenter crashes upload-symbols -a xxx -s ./Applications/xxx.xcarchive/dSYMs --debug
Using appcenter-cli version: 2.7.4
| Uploading symbols...logFilter, request: {
  "rawResponse": false,
  "queryString": {},
  "url": "https://api.appcenter.ms/v0.1/apps/xxx/symbol_uploads",
  "method": "POST",
  "headers": {
    "Content-Type": "application/json; charset=utf-8",
    "user-agent": "appcenterCli/2.7.4 NodeJS/v15.8.0 darwin/20.3.0",
    "x-api-token": "xxx",
    "internal-request-source": "cli",
    "diagnostic-context": "913c7f77-7624-4dc0-9e6d-aa4349afb4d8",
    "cli-command-name": "crashes upload-symbols"
  },
  "body": "{\"symbol_type\":\"Apple\"}"
}
| Uploading symbols...Response status code: 200
Body: {"symbol_upload_id":"00564515-7035-1188-91fe-ada3abeb50d2","upload_url":"https://hogwartsprodsymbols01.blob.core.windows.net:443/hwprodapp-a3ecd49b-e420-49ff-ac64-2296dbf60927/upload-00564515-7035-1188-91fe-ada3abeb50d2?st=2021-02-10T12%3A34%3A24Z&se=2021-02-11T12%3A49%3A24Z&sp=w&sv=2018-03-28&sr=b&sig=YWkolSuyyvpofNpRkRfWkntOoMFARTRvepj2g5U5E2M%3D","expiration_date":"2021-02-11T12:49:24.812Z"}
| Uploading symbols...logFilter, request: {
  "rawResponse": false,
  "queryString": {},
  "url": "https://api.appcenter.ms/v0.1/apps/xxx/symbol_uploads/00564515-7035-1188-91fe-ada3abeb50d2",
  "method": "PATCH",
  "headers": {
    "Content-Type": "application/json; charset=utf-8",
    "user-agent": "appcenterCli/2.7.4 NodeJS/v15.8.0 darwin/20.3.0",
    "x-api-token": "xxx",
    "internal-request-source": "cli",
    "diagnostic-context": "913c7f77-7624-4dc0-9e6d-aa4349afb4d8",
    "cli-command-name": "crashes upload-symbols"
  },
  "body": "{\"status\":\"aborted\"}"
}
| Uploading symbols...Response status code: 200
Body: {"symbol_upload_id":"xxx","app_id":"xxxxxx","user":{"email":"xxx","display_name":"xxx"},"status":"aborted","symbol_type":"Apple","symbols_uploaded":[],"origin":"User","file_name":"upload-2021-02-10T12-49-24Z.zip","file_size":0,"timestamp":"2021-02-10T12:49:26.526Z"}
Error: failed to upload ZIP with symbols

I was having the same issue. It is connected to an incompatibility between the appcenter cli and the newest Node versions.
I downgraded my Node version to the 10 and it worked perfectly.

Hi! Thanks for getting in touch with us! I checked this behavior with the node version 16.1.0 and for me all worked correctly.
What node version you use before? What version of the appcenter-cli do you use? Could you please try to clean the cache of your project (for example via git clean -dfx), clean node cache (npm cache clean --force) and try again?

Was this page helpful?
0 / 5 - 0 ratings