Furry / 2captcha

A wrapper around the 2captcha api
71 stars 23 forks source link

ERROR_NO_SLOT_AVAILABLE #27

Closed matheusbento closed 2 years ago

matheusbento commented 2 years ago

Hi guy, I was doing some tests, and I've got this error.

APIError: An Unexpected Error has occured. Please submit an issue on GitHub detailing this event.
0|api  |     at Solver.imageCaptcha (/home/ubuntu/project/node_modules/2captcha/dist/structs/2captcha.js:277:
19)
0|api  |     at runMicrotasks (<anonymous>)
0|api  |     at processTicksAndRejections (internal/process/task_queues.js:95:5) {
0|api  |   err: 'ERROR_NO_SLOT_AVAILABLE',
0|api  |   code: 0
0|api  | }
Furry commented 2 years ago

Hi guy, I was doing some tests, and I've got this error.

APIError: An Unexpected Error has occured. Please submit an issue on GitHub detailing this event.
0|api  |     at Solver.imageCaptcha (/home/ubuntu/project/node_modules/2captcha/dist/structs/2captcha.js:277:
19)
0|api  |     at runMicrotasks (<anonymous>)
0|api  |     at processTicksAndRejections (internal/process/task_queues.js:95:5) {
0|api  |   err: 'ERROR_NO_SLOT_AVAILABLE',
0|api  |   code: 0
0|api  | }

This error originates from when there's not enough slots for captcha solves within 2captchas servers (They're overloaded from requests, too many jobs too few workers).

In version 3.0.3 (@latest) I made that error a bit more descriptive (and removed the 'submit an issue on github' message). When that error pops up the best thing to do is just wait minute or two for the load to go down. In the future I plan on setting up some rate limiting, but that's a bit of a ways away at the moment. For now, this is a server-side error that I can't really fix.

If it continues though, do let me know and I'll look at what I can do on the library-side to handle this issue. Just depends on how often people run into it to determine it's priority.