Download fails when downloading issues export
Asked by davidartrecord:

When I click the issues export zip link, it starts downloading the approx 238MB file. But at around 141MB it fails over and over again.

I got the modal window that says "Issue export complete" which provided the zip link.

Is there a workaround for this bug?

P.S.: Not sure if this is related but a few minutes earlier I had tried to generate the export and got this error in an email notification:

**Error exporting attachment: logo-white.svg: b':dev:557058:adf067a4-81b6...**


Answers:
author: Patrik S
body: Hello [@davidartrecord](/t5/user/viewprofilepage/user-id/5176772) ,

Thank you for reaching out to Atlassian Community!

I understand you are trying to export the issues from your repository using the UI and the download is not completing. In this case, I would ask you to try exporting the issues using our public API endpoint [Bitbucket Cloud API - Export Issues](https://developer.atlassian.com/cloud/bitbucket/rest/api-group-issue-tracker/#api-repositories-workspace-repo-slug-issues-export-post) and check if using the API the download succeeds.

Following are the instructions on how to use the API to export your issues :

**1.** Make a request to the [Export Issues endpoint](https://developer.atlassian.com/cloud/bitbucket/rest/api-group-issue-tracker/#api-repositories-workspace-repo-slug-issues-export-post) with '-v' verbose.   
Example curl request:

```
 curl -v -X POST -u "username:AppPassword" https://api.bitbucket.org/2.0/repositories/workspaceId/reposlug/issues/export 
```

![](https://getsupport.atlassian.com/images/icons/emoticons/information.png) Make sure to replace username, [app password](https://support.atlassian.com/bitbucket-cloud/docs/app-passwords/), workspace and repository.

The response of that API will contain a field named **Location** similar to the below:

```
 Location: https://api.bitbucket.org/2.0/repositories/workspaceID/reposlug/issues/export/reposlug-issues-taskid.zip 
```

Along with the status of the export:

```
 {"status": "ACCEPTED", "count": 0, "pct": 0, "phase": "Initializing", "total": 0, "type": "issue_job_status"}    
```

**2.** Since the export archive may take time to complete depending on the size of the issue, you can check the status of the export using [Check issue export API](https://developer.atlassian.com/cloud/bitbucket/rest/api-group-issue-tracker/#api-repositories-workspace-repo-slug-issues-export-repo-name-issues-task-id-zip-get).

Example curl request:

```
 curl -X GET -u "username:AppPassword" "https://api.bitbucket.org/2.0/repositories/workspaceID/reposlug/issues/export/reposlug-issues-taskid.zip" 
```

![](https://getsupport.atlassian.com/images/icons/emoticons/information.png) Make sure to replace with the the**Location URL** from step 1.

**3.** Once the status is complete, you can use the below curl command to download the file locally:

Example curl request:

```
curl --location -v -X GET -u "username:AppPassword" "https://api.bitbucket.org/2.0/repositories/workspaceID/reposlug/issues/export/reposlug-issues-taskid.zip" -O 
```

![](https://getsupport.atlassian.com/images/icons/emoticons/information.png) Make sure to replace with the the**Location URL** from step 1.

Once the download is completed, you should be able to see "reposlug-issues-taskid.zip" file locally.

You can try using the workaround above and let us know how it goes.

In case you have any questions, feel free to ask.

Thank you, [@davidartrecord](/t5/user/viewprofilepage/user-id/5176772) !

Patrik S


Tags: bitbucket-cloud

cloud