xditya / WPTagAll

WhatsApp UserBot to Tag All users in a chat.
5 stars 2 forks source link

Error #3

Closed matteotoma98 closed 2 months ago

matteotoma98 commented 3 months ago

Hello, i have this error trying to execute the program

  C:\Users\matte\Desktop\WPTagAll>node index.js
  C:\Users\matte\Desktop\WPTagAll\node_modules\whatsapp-web.js\src\webCache\LocalWebCache.js:34
          const version = indexHtml.match(/manifest-([\d\\.]+)\.json/)[1];
                                                                      ^

  TypeError: Cannot read properties of null (reading '1')
      at LocalWebCache.persist (C:\Users\matte\Desktop\WPTagAll\node_modules\whatsapp-web.js\src\webCache\LocalWebCache.js:34:69)
      at C:\Users\matte\Desktop\WPTagAll\node_modules\whatsapp-web.js\src\Client.js:744:36
      at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

How can i fix? I have Node.js v20.9.0 And Windows 11

matteotoma98 commented 2 months ago

matteotoma98

I fixed putting

exports.DefaultOptions = {
    puppeteer: {
        headless: true,
        defaultViewport: null
    },
    webVersion: '2.2411.2',
    webVersionCache: {
    type: 'remote',
    remotePath: 'https://raw.githubusercontent.com/wppconnect-team/wa-version/main/html/2.2410.1.html',
    },
    authTimeoutMs: 0,
    qrMaxRetries: 0,
    takeoverOnConflict: false,
    takeoverTimeoutMs: 0,
    userAgent: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/101.0.4951.67 Safari/537.36',
    ffmpegPath: 'ffmpeg',
    bypassCSP: false,
    proxyAuthentication: undefined
};

This in WPTagAll-main\node_modules\whatsapp-web.js\src\util