fawazahmed0 / youtube-uploader

Free youtube video uploader with no limits
MIT License
365 stars 86 forks source link

Upload works but "Avatar/Profile picture button not found : TimeoutError" is thrown #143

Open pierreminiggio opened 2 years ago

pierreminiggio commented 2 years ago
Error: Avatar/Profile picture button not found : TimeoutError
    at /var/www/html/youtube-poster-api/node_modules/youtube-videos-uploader/dist/upload.js:662:19
    at Generator.throw (<anonymous>)
    at rejected (/var/www/html/youtube-poster-api/node_modules/youtube-videos-uploader/dist/upload.js:6:65)
Channel already exists or there was an error creating the channel.
Session has been successfully saved
["https://youtu.be/_gO8l-bgB6s"]
github-actions[bot] commented 2 years ago

Paid support is available for quick resolution, new features etc. For paid support, please write mail to youtube-uploader@datascraping.pp.ua

pierreminiggio commented 2 years ago

Okey, looks like we're looking for the avatar before we log in (that's the page we're on before the timeout error is thrown), why do we do that ? image

pierreminiggio commented 2 years ago

I can't tell for certain if that's a normal thing that we check for this profile picture or not.

But we're getting a bit polluted by the logs (and in my implentation, any kind of log showing up is a prohibitive behaviour that breaks my process),

I'll provide a MR to add a logger implementation to choose where to send the logs to.

I'll keep the default settings the same way as it currently is, so that if people who wanna see the logs in their console aren't impacted by the changes.

fawazahmed0 commented 2 years ago

Thanks for looking into this. I agree, this package needs to be refactored

pierreminiggio commented 2 years ago

Here is the MR that allows to divert the log output : https://github.com/fawazahmed0/youtube-uploader/pull/144

pierreminiggio commented 2 years ago

I can't tell for certain if that's a normal thing that we check for this profile picture or not.

I got this error when the saved cookies happens not to allow one to stay connected. My first guess would be that the profile picture error probably happens when the cookies expires ?

zhchhua commented 2 years ago

@pierreminiggio I also encountered this error. Compiling the updated index.ts, upload.ts, types.ts files keeps reporting errors. Can you explain the steps to solve this problem in detail?,thanks

pierreminiggio commented 2 years ago

@pierreminiggio I also encountered this error. Compiling the updated index.ts, upload.ts, types.ts files keeps reporting errors. Can you explain the steps to solve this problem in detail?,thanks

If you get error while compiling, that's a completely different problem. These logs are just errors that shows in the in the logs while executing the program.

Can you explain the steps to solve this problem in detail?,thanks

I've no idea, I don't even know what the avatar checking is for.

You could look up previous MRs to understand why it is in place to get more context about that feature.

jameswangg7 commented 1 year ago

I got this below, but my error is after the "Session has been successfully saved". is it the same? would you please help? @pierreminiggio : Channel already exists or there was an error creating the channel. Session has been successfully saved Error: Avatar/Profile picture button not found : TimeoutError at changeHomePageLangIfNeeded (C:\Users\james\OneDrive\Documents\youtube-\node_modules\youtube-videos-uploader\dist\upload.js:838:15) at async loadAccount (C:\Users\james\OneDrive\Documents\youtube-\node_modules\youtube-videos-uploader\dist\upload.js:797:9)
at async upload (C:\Users\james\OneDrive\Documents\youtube-\node_modules\youtube-videos-uploader\dist\upload.js:46:9) C:\Users\james\OneDrive\Documents\youtube-\node_modules\puppeteer\lib\cjs\puppeteer\common\Connection.js:268 error: new Errors_js_1.ProtocolError(), ^

ProtocolError: Protocol error (Runtime.callFunctionOn): Target closed. at C:\Users\james\OneDrive\Documents\youtube-\node_modules\puppeteer\lib\cjs\puppeteer\common\Connection.js:268:24 at new Promise () at CDPSession.send (C:\Users\james\OneDrive\Documents\youtube-\node_modules\puppeteer\lib\cjs\puppeteer\common\Connection.js:264:16) at next (C:\Users\james\OneDrive\Documents\youtube-\node_modules\puppeteer-extra-plugin-stealth\evasions\sourceurl\index.js:34:41) at CDPSession.send (C:\Users\james\OneDrive\Documents\youtube-\node_modules\puppeteer-extra-plugin-stealth\evasions\sourceurl\index.js:75:16) at ExecutionContext._ExecutionContext_evaluate (C:\Users\james\OneDrive\Documents\youtube-\node_modules\puppeteer\lib\cjs\puppeteer\common\ExecutionContext.js:268:46) at ExecutionContext.evaluateHandle (C:\Users\james\OneDrive\Documents\youtube-\node_modules\puppeteer\lib\cjs\puppeteer\common\ExecutionContext.js:162:107) at WaitTask.rerun (C:\Users\james\OneDrive\Documents\youtube-\node_modules\puppeteer\lib\cjs\puppeteer\common\DOMWorld.js:708:37) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) { originalMessage: '' }

Node.js v20.9.0