-
-
Notifications
You must be signed in to change notification settings - Fork 760
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
The "chunk" argument must be of type string or an instance of Buffer or Uint8Array. Received an instance of Promise #980
Comments
I am getting the same error on version |
I'm encountering this same issue. |
Same issue. |
Same issue, how do we resolve this pls? |
U are talking about, my problem on stackoverflow ?
Em ter., 3 de ago. de 2021 às 11:27, Igbatayo Adetunji <
***@***.***> escreveu:
… Same issue, how do we resolve this pls?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#980 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AM5FTDY4BPYRBTBGF4GATULT27AA5ANCNFSM4V7U2PMA>
.
|
We're getting the same error on version
|
I encountered this when trying to read, manipulate and eventually write every image from a given collection of images . What I did to workaround it:
|
Hi there. I've just added a pull request to resolve this issue. When I tested this issue, I was only able to recreate this when encoding as a GIF. Upon inspection, it looks like the GIF type encoder returns a Promise, whereas the other types return strings or buffers. This is especially difficult for the write function, which opened a stream and wrote the buffer to the stream. For GIFs, that meant the write function was trying to write a promise to the stream, which is what was throwing the error. The commit I made should resolve the issue. Please let me know if this doesn't solve the issue for everyone. |
Expected Behavior
I need it will not kill the program because of an error I dont know why is happening
Current Behavior
I get sometimes error, I dont know when, but it not on my code.
events.js:292
throw er; // Unhandled 'error' event
^
TypeError [ERR_INVALID_ARG_TYPE]: The "chunk" argument must be of type string or an instance of Buffer or Uint8Array. Received an instance of Promise
at WriteStream.Writable.write (internal/streams/writable.js:285:13)
at WriteStream. (/home/XXX/domains/XXX.com/public_html/server/node_modules/@jimp/core/dist/index.js:589:18)
at WriteStream.emit (events.js:315:20)
at internal/fs/streams.js:380:12
at FSReqCallback.oncomplete (fs.js:171:23)
Emitted 'error' event on process instance at:
at emitUnhandledRejectionOrErr (internal/event_target.js:545:11)
at MessagePort.[nodejs.internal.kHybridDispatch] (internal/event_target.js:358:9)
at MessagePort.exports.emitMessage (internal/per_context/messageport.js:18:26) {
code: 'ERR_INVALID_ARG_TYPE'
}
Failure Information (for bugs)
An error, it happening 1 - 2 times in a day I dont know why, but I using your library to resize and compress images.
Steps to Reproduce
Screenshots
Context
Failure Logs
Thank you!
The text was updated successfully, but these errors were encountered: