MainSilent / Discord-Screenshare

First ever discord video screenshare SELFBOT
297 stars 80 forks source link

bot stuck at loading *play not joining VC #26

Closed celiswen closed 2 years ago

celiswen commented 2 years ago

Webdriver started Bot started Downloading... Loading...

MainSilent commented 2 years ago

To troubleshoot remove the headless option in stream.js and inspect in the browser

celiswen commented 2 years ago

Webdriver started
Bot started
(node:45244) UnhandledPromiseRejectionWarning: WebDriverError: unknown error: Chrome failed to start: crashed.
  (unknown error: DevToolsActivePort file doesn't exist)
  (The process started from chrome location /usr/bin/google-chrome is no longer running, so ChromeDriver is assuming that Chrome has crashed.)
    at Object.throwDecodedError (/home/celiswen/Discord-Screenshare/node_modules/selenium-webdriver/lib/error.js:517:15)
    at parseHttpResponse (/home/celiswen/Discord-Screenshare/node_modules/selenium-webdriver/lib/http.js:642:13)
    at Executor.execute (/home/celiswen/Discord-Screenshare/node_modules/selenium-webdriver/lib/http.js:568:28)
    at processTicksAndRejections (internal/process/task_queues.js:95:5)
(Use `node --trace-warnings ...` to show where the warning was created)
(node:45244) 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: 1)
(node:45244) [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:45244) UnhandledPromiseRejectionWarning: WebDriverError: unknown error: Chrome failed to start: crashed.
  (unknown error: DevToolsActivePort file doesn't exist)
  (The process started from chrome location /usr/bin/google-chrome is no longer running, so ChromeDriver is assuming that Chrome has crashed.)
    at Object.throwDecodedError (/home/celiswen/Discord-Screenshare/node_modules/selenium-webdriver/lib/error.js:517:15)
    at parseHttpResponse (/home/celiswen/Discord-Screenshare/node_modules/selenium-webdriver/lib/http.js:642:13)
    at Executor.execute (/home/celiswen/Discord-Screenshare/node_modules/selenium-webdriver/lib/http.js:568:28)
    at processTicksAndRejections (internal/process/task_queues.js:95:5)
(node:45244) 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: 2)
(node:45244) UnhandledPromiseRejectionWarning: WebDriverError: unknown error: Chrome failed to start: crashed.
  (unknown error: DevToolsActivePort file doesn't exist)
  (The process started from chrome location /usr/bin/google-chrome is no longer running, so ChromeDriver is assuming that Chrome has crashed.)
    at Object.throwDecodedError (/home/celiswen/Discord-Screenshare/node_modules/selenium-webdriver/lib/error.js:517:15)
    at parseHttpResponse (/home/celiswen/Discord-Screenshare/node_modules/selenium-webdriver/lib/http.js:642:13)
    at Executor.execute (/home/celiswen/Discord-Screenshare/node_modules/selenium-webdriver/lib/http.js:568:28)
    at processTicksAndRejections (internal/process/task_queues.js:95:5)
(node:45244) 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)
MainSilent commented 2 years ago

You need to have GUI to open chrome without headless

celiswen commented 2 years ago

2 seems doesn't have a fix do i have to install chome and chomedriver both?

 npm chomedriver -v
8.4.1
Webdriver started
/home/celiswen/Discord-Screenshare/node_modules/selenium-webdriver/lib/error.js:517
    let err = new ctor(data.message)
              ^

WebDriverError: unknown error: cannot find Chrome binary
    at Object.throwDecodedError (/home/celiswen/Discord-Screenshare/node_modules/selenium-webdriver/lib/error.js:517:15)
    at parseHttpResponse (/home/celiswen/Discord-Screenshare/node_modules/selenium-webdriver/lib/http.js:642:13)
    at Executor.execute (/home/celiswen/Discord-Screenshare/node_modules/selenium-webdriver/lib/http.js:568:28)
    at processTicksAndRejections (node:internal/process/task_queues:96:5) {
  remoteStacktrace: '#0 0x55a3863c7b33 <unknown>\n' +
    '#1 0x55a385e906d8 <unknown>\n' +
    '#2 0x55a385eb17f9 <unknown>\n' +
    '#3 0x55a385eaefca <unknown>\n' +
    '#4 0x55a385ee9e0a <unknown>\n' +
    '#5 0x55a385ee3f53 <unknown>\n' +
    '#6 0x55a385eb9a0a <unknown>\n' +
    '#7 0x55a385ebaad5 <unknown>\n' +
    '#8 0x55a3863f92fd <unknown>\n' +
    '#9 0x55a3864124bb <unknown>\n' +
    '#10 0x55a3863fb0d5 <unknown>\n' +
    '#11 0x55a386413145 <unknown>\n' +
    '#12 0x55a3863eeaaf <unknown>\n' +
    '#13 0x55a38642fba8 <unknown>\n' +
    '#14 0x55a38642fd28 <unknown>\n' +
    '#15 0x55a38644a48d <unknown>\n' +
    '#16 0x7ff12b8b1609 <unknown>\n'
}

Node.js v17.5.0
MainSilent commented 2 years ago

Yes.

celiswen commented 2 years ago

could you tell me the youtube-dl chrome and chromedriver version you are using?

MainSilent commented 2 years ago

Please check all the issues and the README file

celiswen commented 2 years ago

still got the WebDriverError: unknown error: cannot find Chrome binary error with same chrome version and chromedriver version installed (v. 98.0.4758.102 )

MainSilent commented 2 years ago

Make sure both are accessible via PATH Variable

celiswen commented 2 years ago
root@discord-video-bot:/home/celiswen/Discord-Screenshare# npm i
npm WARN deprecated snekfetch@3.6.4: use node-fetch instead
npm WARN deprecated discord.js@11.6.4: no longer supported

headless=false

Webdriver started
Bot started
Downloading...
(30secs after)
/home/celiswen/Discord-Screenshare/node_modules/selenium-webdriver/lib/error.js:517
    let err = new ctor(data.message)
              ^

WebDriverError: unknown error: DevToolsActivePort file doesn't exist
    at Object.throwDecodedError (/home/celiswen/Discord-Screenshare/node_modules/selenium-webdriver/lib/error.js:517:15)
    at parseHttpResponse (/home/celiswen/Discord-Screenshare/node_modules/selenium-webdriver/lib/http.js:642:13)
    at Executor.execute (/home/celiswen/Discord-Screenshare/node_modules/selenium-webdriver/lib/http.js:568:28)
    at processTicksAndRejections (node:internal/process/task_queues:96:5) {
  remoteStacktrace: '#0 0x55c126fa9b33 <unknown>\n' +
    '#1 0x55c126a726d8 <unknown>\n' +
    '#2 0x55c126a98462 <unknown>\n' +
    '#3 0x55c126a949e9 <unknown>\n' +
    '#4 0x55c126a90fca <unknown>\n' +
    '#5 0x55c126acbe0a <unknown>\n' +
    '#6 0x55c126ac5f53 <unknown>\n' +
    '#7 0x55c126a9ba0a <unknown>\n' +
    '#8 0x55c126a9cad5 <unknown>\n' +
    '#9 0x55c126fdb2fd <unknown>\n' +
    '#10 0x55c126ff44bb <unknown>\n' +
    '#11 0x55c126fdd0d5 <unknown>\n' +
    '#12 0x55c126ff5145 <unknown>\n' +
    '#13 0x55c126fd0aaf <unknown>\n' +
    '#14 0x55c127011ba8 <unknown>\n' +
    '#15 0x55c127011d28 <unknown>\n' +
    '#16 0x55c12702c48d <unknown>\n' +
    '#17 0x7f3ec9875609 <unknown>\n'
}

headless=true

Webdriver started
Bot started
Downloading...
Loading...   (the bot didnt join)
Play
celiswen@discord-video-bot:~/Discord-Screenshare$ google-chrome -version ; chromedriver -version
Google Chrome 98.0.4758.102
ChromeDriver 98.0.4758.102 (273bf7ac8c909cde36982d27f66f3c70846a3718-refs/branch-heads/4758@{#1151})
MainSilent commented 2 years ago

10

celiswen commented 2 years ago

i tried running with a monitor, discord seems stuck at the loading page image

MainSilent commented 2 years ago

Have you properly set a user account token in .env?

celiswen commented 2 years ago

yes i checked the token is correct owner_id is my discord id log_channel_id is the chat channel that i type the p play cmd

(using chrome and chrome-driver v88.0.4324.96) (node 14.9.0)

image

MainSilent commented 2 years ago

Have you properly set a user account token in .env?

This project is a self bot.