wppconnect icon indicating copy to clipboard operation
wppconnect copied to clipboard

Right-hand side of 'instanceof' is not callable

Open DikaArdnt opened this issue 1 year ago • 2 comments

Description

I get error while running, how to solve it?

Environment

  • WPPConnect version(s): 1.14.4
  • WA-JS version(s): 2.7.3
  • Browser: Chrome Beta
  • OS: Windows 10
  • Node version: Node 17.4.0
  • WhatsApp version: 2.2224.8
  • MultiDevice (BETA): [Yes]

Log Output

TypeError: Right-hand side of 'instanceof' is not callable
    at kindOf (C:\hisoka\node_modules\kind-of\index.js:30:40)
    at isObject (C:\hisoka\node_modules\merge-deep\index.js:58:10)
    at mergeDeep (C:\hisoka\node_modules\merge-deep\index.js:15:8)
    at new PuppeteerExtraPlugin (C:\hisoka\node_modules\puppeteer-extra-plugin\dist\index.cjs.js:61:22)
    at new StealthPlugin (C:\hisoka\node_modules\puppeteer-extra-plugin-stealth\index.js:74:5)
    at defaultExport (C:\hisoka\node_modules\puppeteer-extra-plugin-stealth\index.js:172:31)
    at C:\hisoka\node_modules\@wppconnect-team\wppconnect\dist\controllers\browser.js:298:96
    at step (C:\hisoka\node_modules\@wppconnect-team\wppconnect\dist\controllers\browser.js:83:23)
    at Object.next (C:\hisoka\node_modules\@wppconnect-team\wppconnect\dist\controllers\browser.js:64:53)
    at C:\hisoka\node_modules\@wppconnect-team\wppconnect\dist\controllers\browser.js:58:71

Your Code

require("../config")

const { create, defaultLogger } = require("@wppconnect-team/wppconnect")
const fs = require("fs")
const chalk = require("chalk")

const EventMessage = require("./Events/message")
const EventNotification = require("./Events/notification")

async function start() {
    const hisoka = await create({
        session: `${sessionName}`,
        headless: false,
        debug: false,
        logQR: true,
        puppeteerOptions: {
            args: ["--no-sandbox", "--disabled-setupid-sandbox"],
            userDataDir: "./sessions/hisoka",
            executablePath:  "C:\\Program Files\\Google\\Chrome Beta\\Application\\chrome.exe"
        },
        disableWelcome: true,
        tokenStore: "hisoka",
        folderNameToken: "./sessions"
    })

    const message = new EventMessage(hisoka)
    const notification = new EventNotification(hisoka)
    message.loadCommands()

    await hisoka.onAnyMessage(message.newMessage)

    await hisoka.onNotificationMessage(notification.newReturn)
}
start()

DikaArdnt avatar Jul 10 '22 04:07 DikaArdnt

@DikaArdnt , could you try another version of puppetter please? I gess that is a problem with puppetter version

edgardmessias avatar Jul 11 '22 02:07 edgardmessias

@DikaArdnt, bisa tolong coba versi lain dari dalang? Saya kira itu masalah dengan versi dalang

I've changed the puppeteer version but the same problem is repeated

DikaArdnt avatar Jul 11 '22 08:07 DikaArdnt