Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Strapi data transfer fails on specific files: Write after end error #20087

Open
bieblebrox opened this issue Apr 11, 2024 · 3 comments
Open

Strapi data transfer fails on specific files: Write after end error #20087

bieblebrox opened this issue Apr 11, 2024 · 3 comments
Assignees
Labels
issue: bug Issue reporting a bug severity: medium If it breaks the basic use of the product but can be worked around source: core:data-transfer Source is core/data-transfer package status: pending reproduction Waiting for free time to reproduce the issue, or more information

Comments

@bieblebrox
Copy link

Bug report

Required System information

Environment: development
OS: darwin-arm64
Strapi Version: 4.15.5
Node/Yarn Version: yarn/3.6.1 npm/? node/v18.19.0 darwin arm64
Edition: Community
Database: postgres

Describe the bug

I'm trying to use the strapi data transfer command to move data across environments. It worked fine initially but now the client has uploaded a large number of files and the scripts fails when transferring these files. We are using the google cloud storage plugin @strapi-community/strapi-provider-upload-google-cloud-storage.

When running the transfer command and it reaches the transfer assets I get this error:

node:internal/process/promises:288
            triggerUncaughtException(err, true /* fromPromise */);
            ^

Error [ERR_STREAM_WRITE_AFTER_END]: write after end
    at new NodeError (node:internal/errors:405:5)
    at _write (node:internal/streams/writable:322:11)
    at Writable.write (node:internal/streams/writable:337:10)
    at /my_project_path/node_modules/@strapi/data-transfer/dist/index.js:2816:15
    at new Promise (<anonymous>)
    at RemoteStrapiSourceProvider.writeAsync (/my_project_path/node_modules/@strapi/data-transfer/dist/index.js:2814:12)
    at PassThrough.<anonymous> (/my_project_path/node_modules/@strapi/data-transfer/dist/index.js:2850:26)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
  code: 'ERR_STREAM_WRITE_AFTER_END'
}

I've added some logs in the transfer script which shows that this issue happens with large files.
When I delete one of these files the script runs further, but it's not really an option for us to remove all the files that throw errors.

@richardweaver
Copy link

I have the exact same issue but am using the @strapi/provider-upload-cloudinary provider:

Environment: development
OS: darwin-x64
Strapi Version: 4.20.1
Node/Yarn Version: yarn/1.22.19 npm/? node/v18.18.0 darwin x64
Edition: Community
Database: postgres

@OIvanytskyi-Conduent
Copy link

OIvanytskyi-Conduent commented Apr 18, 2024

The same issue is with the strapi-provider-upload-azure-storage provider.

Environment: development
OS: darwin-x64
Strapi Version: 4.23.1
Yarn/Node Version: yarn/1.22.18 node/v18.16.1
Edition: Community
Database: postgres / sqlite

@ststaynov
Copy link

Issue persists in version 4.24 as well. :/

@joshuaellis joshuaellis added issue: bug Issue reporting a bug severity: medium If it breaks the basic use of the product but can be worked around status: pending reproduction Waiting for free time to reproduce the issue, or more information source: core:data-transfer Source is core/data-transfer package labels May 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
issue: bug Issue reporting a bug severity: medium If it breaks the basic use of the product but can be worked around source: core:data-transfer Source is core/data-transfer package status: pending reproduction Waiting for free time to reproduce the issue, or more information
Projects
Status: To be reviewed (Open)
Status: To review
Development

No branches or pull requests

6 participants