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

Issue exporting files with new extension version. Error: [ERR_STREAM_WRITE_AFTER_END] #179

Open
arpit-beautifi opened this issue Sep 26, 2024 · 3 comments

Comments

@arpit-beautifi
Copy link

Hello!

Thank you for the great app! We find it extremely useful to export files in bulk from our org.

When trying to export files from Opportunities today like usual, I am getting the error:

Bulk Query: SELECT ContentDocumentId,LinkedEntityId FROM ContentDocumentLink WHERE LinkedEntityId IN ('%%OPPIDs%%','006OJ00000...node:events:497
     throw er; // Unhandled 'error' event
     ^

Error [ERR_STREAM_WRITE_AFTER_END]: write after end
   at _write (node:internal/streams/writable:487:11)
   at Writable.write (node:internal/streams/writable:508:10)
   at DuplexifiedStream.ondata (node:internal/streams/readable:1007:22)
   at DuplexifiedStream.emit (node:events:519:28)
   at addChunk (node:internal/streams/readable:559:12)
   at readableAddChunkPushByteMode (node:internal/streams/readable:510:3)
   at Readable.push (node:internal/streams/readable:390:5)
   at DuplexifiedStream._readStream (%%USER%%\AppData\Local\sf\node_modules\@jsforce\jsforce-node\lib\util\stream.js:81:18)
   at PassThrough.<anonymous> (%%USER%%\AppData\Local\sf\node_modules\@jsforce\jsforce-node\lib\util\stream.js:64:18)  
   at PassThrough.emit (node:events:519:28)
   at emitReadable_ (node:internal/streams/readable:832:12)
   at process.processTicksAndRejections (node:internal/process/task_queues:81:21)
Emitted 'error' event on PassThrough instance at:
   at PassThrough.onerror (node:internal/streams/readable:1026:14)
   at PassThrough.emit (node:events:519:28)
   at emitErrorNT (node:internal/streams/destroy:169:8)
   at emitErrorCloseNT (node:internal/streams/destroy:128:3)
   at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
 code: 'ERR_STREAM_WRITE_AFTER_END'
}

Node.js v20.17.0

I have replaced actual Ids and names with placeholders for confidentiality reasons.

Let me know if you need any more information!

Thank you in advance!

@arpit-beautifi arpit-beautifi changed the title Issue exporting files with new extension version Issue exporting files with new extension version. Error: [ERR_STREAM_WRITE_AFTER_END] Sep 26, 2024
@nvuillam
Copy link
Member

@arpit-beautifi is it happening everytime, or is it just bad luck ?
I'm not sure there is an error handling in case Bulk API does not reply for a while ^^

@arpit-beautifi
Copy link
Author

arpit-beautifi commented Sep 27, 2024

@nvuillam Still happening! I have tried creating completely new SFDX projects, reinstalling the plugin, downgrading the version, etc. Nothing seems to be working.

@nvuillam
Copy link
Member

nvuillam commented Oct 3, 2024

@arpit-beautifi you can use the downgrade workaround until I succeed to reproduce it :)

hardisgroupcom/sfdx-hardis#809

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants