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

The loadImage() method can fail with Request timed out error on older hardware #2363

Open
1 task done
Cryotalis opened this issue Mar 13, 2024 · 0 comments
Open
1 task done

Comments

@Cryotalis
Copy link

Cryotalis commented Mar 13, 2024

Issue

Issue does not occur on my desktop PC, but on my weaker and older laptop (where I'm hosting my app), the loadImage() method can fail with a Request timed out error (at simple-get/index.js:75:8). I can resolve this issue myself by going into node modules and setting a 10 second timeout in either the simple-get module itself or the node-canvas module where simple-get is being called (canvas > lib > image.js), but obviously this isn't ideal because my modification can get overwritten when I update my dependencies. The loadImage() method has an options parameter, but I don't think this options parameter has anything to do with the options you can set for simple-get. If there is a way to set a timeout without locally editing simple-get or node-canvas, please enlighten me. I was able to get around this issue by rewriting my code to load the images in a slightly different way, but I'd appreciate being able to set a timeout.

Environment

  • Version of node-canvas: 2.11.2
  • Environment: node 21.4.0 on Ubuntu Server
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

1 participant