SlavyanDesu / BocchiBot

BocchiBot is a multipurpose WhatsApp bot using wa-automate-nodejs library!
MIT License
317 stars 412 forks source link

Error Message #452

Closed FrankerySalto closed 1 year ago

FrankerySalto commented 2 years ago

Question Hello, I tried to setup the bot and everything seems to be fine but when I try to start it I get following Error Message:

bocchibot@1.0.0 start node index.js

(node:10012) [DEP0128] DeprecationWarning: Invalid 'main' field in 'C:\Users\User\Documents\GitHub\BocchiBot\node_modules\video-url-link\package.json' of './lib/index.js'. Please either fix that or report it to the module author (Use node --trace-deprecation ... to show where the warning was created) ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓ ┃ ┃ ┃ @open-wa/wa-automate ┃ ┃ 💬 🤖 The most reliable NodeJS whatsapp library for chatbots with advanced features. ┃ ┃ Version: 4.47.0 ┃ ┃ Check out the latest changes: https://github.com/open-wa/wa-automate-nodejs#latest-changes ┃ ┃ ┃ ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛

Error: spawn wmic.exe ENOENT at Process.ChildProcess._handle.onexit (node:internal/child_process:283:19) at onErrorNT (node:internal/child_process:478:16) at processTicksAndRejections (node:internal/process/task_queues:83:21) Emitted 'error' event on ChildProcess instance at: at Process.ChildProcess._handle.onexit (node:internal/child_process:289:12) at onErrorNT (node:internal/child_process:478:16) at processTicksAndRejections (node:internal/process/task_queues:83:21) { errno: -4058, code: 'ENOENT', syscall: 'spawn wmic.exe', path: 'wmic.exe', spawnargs: [ 'PROCESS', 'GET', 'Name,ProcessId,ParentProcessId,Status' ] }

I can't figure out how to fix this problem, I'm a beginner in all this but I would be thankfull for any kind of help/advice :)

github-actions[bot] commented 2 years ago

Hello! Thanks for submiting the issue, we will respond to you ASAP.

Slavecode commented 2 years ago

Question Hello, I tried to setup the bot and everything seems to be fine but when I try to start it I get following Error Message:

bocchibot@1.0.0 start node index.js

(node:10012) [DEP0128] DeprecationWarning: Invalid 'main' field in 'C:\Users\User\Documents\GitHub\BocchiBot\node_modules\video-url-link\package.json' of './lib/index.js'. Please either fix that or report it to the module author (Use node --trace-deprecation ... to show where the warning was created) ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓ ┃ ┃ ┃ @open-wa/wa-automate ┃ ┃ 💬 🤖 The most reliable NodeJS whatsapp library for chatbots with advanced features. ┃ ┃ Version: 4.47.0 ┃ ┃ Check out the latest changes: https://github.com/open-wa/wa-automate-nodejs#latest-changes ┃ ┃ ┃ ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛

  • Starting
  • Version: 4.47.0
  • Initializing WA
  • Using custom chromium args with multi device will cause issues! Please remove them: --aggressive-cache-discard,--aggressive-tab-discard,--disable-accelerated-2d-canvas,--disable-application-cache,--disable-cache,--disable-dev-shm-usage,--disable-gpu,--disable-offline-load-stale-cache,--disable-setuid-sandbox,--disable-setuid-sandbox,--disk-cache-size=0,--ignore-certificate-errors,--no-first-run,--no-sandbox,--no-zygote
  • Launching Browser
  • MD Enabled, turning off incognito mode.
  • Data dir: ./_IGNORE_BocchiBot
  • Browser launched: 637ms
  • Setting Up Page
  • Loading session data
  • No session data file found for session : BocchiBot
  • No session data detected. Opting in for MD.
  • Make sure to keep the session alive for at least 5 minutes after scanning the QR code before trying to restart a session!!
  • Pre page launch setup complete: 5ms
  • Navigating to WA
  • Page loaded in 1273ms: 200
  • Page loaded Error: Command failed with exit code 1: powershell (Get-CimInstance -ClassName Win32_OperatingSystem).caption Der Befehl "powershell" ist entweder falsch geschrieben oder konnte nicht gefunden werden. at makeError (C:\Users\User\Documents\GitHub\BocchiBot\node_modules\execa\lib\error.js:59:11) at Function.module.exports.sync (C:\Users\User\Documents\GitHub\BocchiBot\node_modules\execa\index.js:188:17) at windowsRelease (C:\Users\User\Documents\GitHub\BocchiBot\node_modules\windows-release\index.js:39:19) at osName (C:\Users\User\Documents\GitHub\BocchiBot\node_modules\os-name\index.js:43:18) at C:\Users\User\Documents\GitHub\BocchiBot\node_modules@open-wa\wa-automate\dist\controllers\initializer.js:184:46 at Generator.next () at fulfilled (C:\Users\User\Documents\GitHub\BocchiBot\node_modules@open-wa\wa-automate\dist\controllers\initializer.js:24:58) at processTicksAndRejections (node:internal/process/task_queues:96:5) node:events:491 throw er; // Unhandled 'error' event ^

Error: spawn wmic.exe ENOENT at Process.ChildProcess._handle.onexit (node:internal/child_process:283:19) at onErrorNT (node:internal/child_process:478:16) at processTicksAndRejections (node:internal/process/task_queues:83:21) Emitted 'error' event on ChildProcess instance at: at Process.ChildProcess._handle.onexit (node:internal/child_process:289:12) at onErrorNT (node:internal/child_process:478:16) at processTicksAndRejections (node:internal/process/task_queues:83:21) { errno: -4058, code: 'ENOENT', syscall: 'spawn wmic.exe', path: 'wmic.exe', spawnargs: [ 'PROCESS', 'GET', 'Name,ProcessId,ParentProcessId,Status' ] }

I can't figure out how to fix this problem, I'm a beginner in all this but I would be thankfull for any kind of help/advice :)

Install git bash

FrankerySalto commented 2 years ago

I have git bash installed

SlavyanDesu commented 1 year ago

spawn wmic.exe ENOENT

Sorry for late reply. Try reinstall Node.js and make sure you're running it on CMD/bash not PowerShell.

FrankerySalto commented 1 year ago

spawn wmic.exe ENOENT

Sorry for late reply. Try reinstall Node.js and make sure you're running it on CMD/bash not PowerShell.

I tried reinstalling everything, still won't work, this is the error I keep getting, I am using gitbash and not powershell:

Error: spawn wmic.exe ENOENT at ChildProcess._handle.onexit (node:internal/child_process:285:19) at onErrorNT (node:internal/child_process:483:16) at process.processTicksAndRejections (node:internal/process/task_queues:82:21) Emitted 'error' event on ChildProcess instance at: at ChildProcess._handle.onexit (node:internal/child_process:291:12) at onErrorNT (node:internal/child_process:483:16) at process.processTicksAndRejections (node:internal/process/task_queues:82:21) { errno: -4058, code: 'ENOENT', syscall: 'spawn wmic.exe', path: 'wmic.exe', spawnargs: [ 'PROCESS', 'GET', 'Name,ProcessId,ParentProcessId,Status' ] }

Node.js v19.4.0

any more ideas what could be wrong? Sadly chatgpt has no clue either ^^

SlavyanDesu commented 1 year ago

spawn wmic.exe ENOENT

Sorry for late reply. Try reinstall Node.js and make sure you're running it on CMD/bash not PowerShell.

I tried reinstalling everything, still won't work, this is the error I keep getting, I am using gitbash and not powershell:

  • Starting
  • Version: 4.55.0
  • Initializing WA
  • Launching Browser
  • MD Enabled, turning off incognito mode.
  • Data dir: ./_IGNORE_BocchiBot
  • Browser launched: 156ms
  • Setting Up Page
  • Loading session data
  • No session data file found for session : BocchiBot
  • No session data detected. Opting in for MD.
  • Make sure to keep the session alive for at least 5 minutes after scanning the QR code before trying to restart a session!!
  • Pre page launch setup complete: 4ms
  • Navigating to WA
  • Page loaded in 673ms: 200
  • Page loaded Error: Command failed with exit code 1: powershell (Get-CimInstance -ClassName Win32_OperatingSystem).caption Der Befehl "powershell" ist entweder falsch geschrieben oder konnte nicht gefunden werden. at makeError (C:\Users\User\BocchiBot\node_modules\execa\lib\error.js:59:11) at module.exports.sync (C:\Users\User\BocchiBot\node_modules\execa\index.js:188:17) at windowsRelease (C:\Users\User\BocchiBot\node_modules\windows-release\index.js:39:19) at osName (C:\Users\User\BocchiBot\node_modules\os-name\index.js:43:18) at C:\Users\User\BocchiBot\node_modules@open-wa\wa-automate\dist\controllers\initializer.js:188:46 at Generator.next () at fulfilled (C:\Users\User\BocchiBot\node_modules@open-wa\wa-automate\dist\controllers\initializer.js:28:58) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) node:events:491 throw er; // Unhandled 'error' event ^

Error: spawn wmic.exe ENOENT at ChildProcess._handle.onexit (node:internal/child_process:285:19) at onErrorNT (node:internal/child_process:483:16) at process.processTicksAndRejections (node:internal/process/task_queues:82:21) Emitted 'error' event on ChildProcess instance at: at ChildProcess._handle.onexit (node:internal/child_process:291:12) at onErrorNT (node:internal/child_process:483:16) at process.processTicksAndRejections (node:internal/process/task_queues:82:21) { errno: -4058, code: 'ENOENT', syscall: 'spawn wmic.exe', path: 'wmic.exe', spawnargs: [ 'PROCESS', 'GET', 'Name,ProcessId,ParentProcessId,Status' ] }

Node.js v19.4.0

any more ideas what could be wrong? Sadly chatgpt has no clue either ^^

Please try to add wmic folder to path.

%SystemRoot%\System32\Wbem

SlavyanDesu commented 1 year ago

Closed due to the inactivity. Feel free to reopen.