Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot Start Server - Web Cache Error #3149

Closed
1 task done
giyaseddin opened this issue Jun 29, 2024 · 1 comment
Closed
1 task done

Cannot Start Server - Web Cache Error #3149

giyaseddin opened this issue Jun 29, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@giyaseddin
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

Starting today, a running server that uses whatsapp-web.js started to raise this following error:

 user@server:$ npm start

> [email protected] start
> node index.js

/home/giyaseddin/[path]/whatstapp-js-server/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 (/home/giyaseddin/[path]/whatstapp-js-server/node_modules/whatsapp-web.js/src/webCache/LocalWebCache.js:34:69)
    at /home/giyaseddin/[path]/whatstapp-js-server/node_modules/whatsapp-web.js/src/Client.js:786:36
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

Node.js v18.17.0                   

The community is saying things about resetting cache but that didn't seem to solve the issue (for me)

Expected behavior

For a simple example that I'm running, I expect the server to run normally, NOT raise the error.

Steps to Reproduce the Bug or Issue

First install the package:

 npm install whatsapp-web.js qrcode-terminal

Then start the app

npm start

Relevant Code

Example code taken from https://docs.wwebjs.dev/

const { Client } = require('whatsapp-web.js');

const client = new Client();

client.on('qr', (qr) => {
    // Generate and scan this code with your phone
    console.log('QR RECEIVED', qr);
});

client.on('ready', () => {
    console.log('Client is ready!');
});

client.on('message', msg => {
    if (msg.body == '!ping') {
        msg.reply('pong');
    }
});

client.initialize();

Browser Type

Google Chrome

WhatsApp Account Type

Standard

Does your WhatsApp account have multidevice enabled?

No, I am not using Multi Device

Environment

OS: Linux and Docker node:18-slim faced the same problem
whatsapp-web.js version: ^1.24.0 and ^1.23.0

WhatsApp Web version: Version 2.3000.1014580163
Node.js Version: v18.17.0

Additional context

No response

@giyaseddin giyaseddin added the bug Something isn't working label Jun 29, 2024
@alechkos
Copy link
Collaborator

#2816

@alechkos alechkos closed this as not planned Won't fix, can't repro, duplicate, stale Jun 29, 2024
Repository owner locked and limited conversation to collaborators Jun 29, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants