[Question]: Doing wrong?
Oberonskii opened this issue · 21 comments
Okey... So it installed correctly now, but it it not really working. When it is solving, there is nothin in the console, only the Tensorflow warning... I will submit the code I am executing here
What am I doing wrong?
Please read the documentation. The code you've taken from the documentation example is for automatically setting the value within the browser. You haven't added any sort of code to submit the page or notify you in the console to submit the page once completed. If you look at this part of the code
// Your page is ready to submit.
// Captcha solving should be the last function on your page so we
// don't have to worry about the response token expiring.
/**
* Example:
* await page.click("loginDiv > loginBtn");
*/
It explains it there. For your example using 2captcha's demo site you'd want to either add
console.log('Page is ready to submit');
to your code so you are notified to submit. Or, you want to add
await page.click('#root > div > main > div > section > form > button._2iYm2u0v9LWjjsuiyfKsv4._1z3RdCK9ek3YQYwshGZNjf._3zBeuZ3zVV-s2YdppESngy._28oc7jlCOdc1KAtktSUZvQ');
to automatically press the "Check" button after sovling.
The tensorflow warning is noted in the known issues part of the documentation. It has no impact on the functions of the program. Is that what you are talking about?
No. I mean that there is nothing more happening when I run the code/program
Try the token verison, does it return a token?
No. It doesnt...
I ran the code with the chrome tab over night, and got this in my console:
throw new Error('Evaluation failed: ' + helper_js_1.helper.getExceptionMessage(exceptionDetails));
^
Error: Evaluation failed: StatusCodeError: 400 - {"c":{"type":"hsw","req":"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzIjoxNiwidCI6InciLCJkIjoiYzNTOTdKNkNDaXdVbXRsbElHWVVuNXR4azliL3F0TVA2cldDM2JmSG03WWtUMFdoL1I4TXJGb04vcExDZEs4WXdidW92WFhuaEJtMXArcElaZXQrUFpvNDRwRlpoVzN3R3BzRkg2K2ZIRWttWkxwYzJaOVk5Nys5cXhVSkk4NmJIekN3bUFYSUxrVGN4TFRFTXMxOE84Z21LWTZURlN4NmtuUEpRL0MyenFObUJ3c1AzWm50dGcwb0NGYz1neFNNYjB3WkpZOFU2c01TIiwibCI6Imh0dHBzOi8vbmV3YXNzZXRzLmhjYXB0Y2hhLmNvbS9jLzU0MjNlMzI5IiwiZSI6MTY0MDI5OTkxNn0.SrXUnvOS0dxa2NZlx4Y4YmH1RVF-Efw-MWChHM0vRxo"},"pass":false,"error":"missing data"}
at new StatusCodeError (C:\Users\user\node_modules\request-promise-core\lib\errors.js:32:15)
at Request.plumbing.callback (C:\Users\user\node_modules\request-promise-core\lib\plumbing.js:104:33)
at Request.RP$callback [as _callback] (C:\Users\user\node_modules\request-promise-core\lib\plumbing.js:46:31)
at Request.self.callback (C:\Users\user\node_modules\request\request.js:185:22)
at Request.emit (node:events:390:28)
at Request. (C:\Users\user\node_modules\request\request.js:1154:10)
at Request.emit (node:events:390:28)
at IncomingMessage. (C:\Users\user\node_modules\request\request.js:1076:12)
at Object.onceWrapper (node:events:509:28)
at IncomingMessage.emit (node:events:402:35)
at ExecutionContext._evaluateInternal (C:\Users\user\node_modules\puppeteer\lib\cjs\puppeteer\common\ExecutionContext.js:221:19)
at runMicrotasks ()
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async ExecutionContext.evaluate (C:\Users\user\node_modules\puppeteer\lib\cjs\puppeteer\common\ExecutionContext.js:110:16)
at async hcaptcha (C:\Users\user\node_modules\puppeteer-hcaptcha\hcaptcha.js:325:17)
at async C:\Users\user\Desktop\hcaptcha\solve.js:40:11
Seems like there is a token in there, but its still returning an error
Thats not the token thats the request response that gets used multiple times through the solving process. Missing data could mean a few things, sometimes it just happens an you have to retry.
Oh, wow. That means that it never worked for me… Tried about 20 times
Interesting, something is being left out of the request somehow in that case. I can take a look at it on a different computer later today and see if I can replicate the issue
Would be very thankful. Thank you for the help
How is it doing?
Took a look at it. Looks like I'm getting the same issue on multiple computers. It seems either hCaptcha has modified their requests or something is breaking within the code (doesn't seem like it though as I walked through it and the request looked fine). I will try to break down hCaptchas responses sometime next week when I have more time to see if I can figure out what is wrong.
Okey, thanks for the help
Very odd but I just tried it again without making any modifications and it succeeded on the second attempt (failed responses do happen).
Not entirely sure what the issue is for other's besides maybe the part that ghost-cursor has not yet merged my pull request with the source code from my forked version (it realistically shouldn't matter but that could definitely be an issue). I may have to fix up some things with my pr as I noticed that yarn.lock is conflicting so that could be the reason they haven't accepted it yet.
Edit: It looks like the issue is only present with the hCaptchaToken
method.
Edit 2: I made one small change to the request and it seems to work perfectly fine now, even more odd:
Alright 👍
@Oberonskii I pushed the changes so let me know if it works now or you can close yourself.
I still have the same problem…
@Oberonskii did you update to the newest version?
I reinstalled the package with npm
same issue
Haven't heard anything about this for a few months so will be closing this issue. You can open a new issue if there is anything I can fix on my end.