question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

UnhandledPromiseRejectionWarning: Error: error while reading from input stream

See original GitHub issue

hashlips_art_engine@1.1.1 generate C:\Users\w4sb0y\Downloads\hashlips_art_engine-main\hashlips_art_engine-main

(node:6792) UnhandledPromiseRejectionWarning: Error: error while reading from input stream at setSource (C:\Users\w4sb0y\Downloads\hashlips_art_engine-main\hashlips_art_engine-main\node_modules\canvas\lib\image.js:91:13) at Image.set (C:\Users\w4sb0y\Downloads\hashlips_art_engine-main\hashlips_art_engine-main\node_modules\canvas\lib\image.js:62:9) at C:\Users\w4sb0y\Downloads\hashlips_art_engine-main\hashlips_art_engine-main\node_modules\canvas\index.js:34:15 at new Promise (<anonymous>) at loadImage (C:\Users\w4sb0y\Downloads\hashlips_art_engine-main\hashlips_art_engine-main\node_modules\canvas\index.js:23:10) at C:\Users\w4sb0y\Downloads\hashlips_art_engine-main\hashlips_art_engine-main\src\main.js:181:25 at new Promise (<anonymous>) at loadLayerImg (C:\Users\w4sb0y\Downloads\hashlips_art_engine-main\hashlips_art_engine-main\src\main.js:180:10) at C:\Users\w4sb0y\Downloads\hashlips_art_engine-main\hashlips_art_engine-main\src\main.js:361:31 at Array.forEach (<anonymous>) (Use node --trace-warnings ... to show where the warning was created) (node:6792) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 3) (node:6792) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code. (node:6792) UnhandledPromiseRejectionWarning: Error: error while reading from input stream at setSource (C:\Users\w4sb0y\Downloads\hashlips_art_engine-main\hashlips_art_engine-main\node_modules\canvas\lib\image.js:91:13) at Image.set (C:\Users\w4sb0y\Downloads\hashlips_art_engine-main\hashlips_art_engine-main\node_modules\canvas\lib\image.js:62:9) at C:\Users\w4sb0y\Downloads\hashlips_art_engine-main\hashlips_art_engine-main\node_modules\canvas\index.js:34:15 at new Promise (<anonymous>) at loadImage (C:\Users\w4sb0y\Downloads\hashlips_art_engine-main\hashlips_art_engine-main\node_modules\canvas\index.js:23:10) at C:\Users\w4sb0y\Downloads\hashlips_art_engine-main\hashlips_art_engine-main\src\main.js:181:25 at new Promise (<anonymous>) at loadLayerImg (C:\Users\w4sb0y\Downloads\hashlips_art_engine-main\hashlips_art_engine-main\src\main.js:180:10) at C:\Users\w4sb0y\Downloads\hashlips_art_engine-main\hashlips_art_engine-main\src\main.js:361:31 at Array.forEach (<anonymous>) (node:6792) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 4)

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:10

github_iconTop GitHub Comments

3reactions
itsDev018commented, Jan 13, 2022

I had the same problem. I fixed it by deleting the .DS_Store from the layers folder. It, was a hidden file(in my case). I hope it helps you.

2reactions
littlehanselcommented, Jan 21, 2022

This error occurs when you have something other than the images in your layer folders. For instance if you have a folder or an mp4 file in one of your layer folders , the code will go through every layer folder and try to pick each item , one at a time … so if it picks up at random, a folder or an mp4 (or anything else other than the image) the code will try to parse it but fail throwing an “Error while reading from input stream”. Just make sure that your layer folders only have images and nothing else … ✌️

Read more comments on GitHub >

github_iconTop Results From Across the Web

error while reading from input stream (Image given has not ...
When I am trying to use JPEG with Canvas.Image it is triggering error event with message: "Error: error while reading from input stream"....
Read more >
Error while reading from input stream using Node Canvas API ...
I figured it out, the issue was how I was handling the order of my post request uploading an image, and then combining...
Read more >
InputStream (Java SE 19 & JDK 19) - Oracle Help Center
If an I/O error occurs reading from the input stream, then it may do so after some, but not all, bytes have been...
Read more >
Canvas help (discord.js) - Glitch Support
(node:4749) UnhandledPromiseRejectionWarning: Error: error while reading from input stream
Read more >
Error handling with Java input streams - Javamex
In the isJpegFile() method above, a problem occurs if an I/O error occurs while reading the file: we won't call close() on the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found