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

TypeError: Cannot read properties of null (reading '1') #2786

Closed
1 task done
MoatazAbdAlmageed opened this issue Feb 24, 2024 · 4 comments
Closed
1 task done

TypeError: Cannot read properties of null (reading '1') #2786

MoatazAbdAlmageed opened this issue Feb 24, 2024 · 4 comments
Labels
bug Something isn't working

Comments

@MoatazAbdAlmageed
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

I got this error

/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 (/Users/moataz_mohammady/projects/whatsapp/node_modules/whatsapp-web.js/src/webCache/LocalWebCache.js:34:69)
    at /Users/moataz_mohammady/projects/whatsapp/node_modules/whatsapp-web.js/src/Client.js:729:36
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

Node.js v18.12.1
[nodemon] app crashed - waiting for file changes before starting...

Expected behavior

get client ready so I can use it

Steps to Reproduce the Bug or Issue

add this to package.json
"whatsapp-web.js": "https://github.com/Julzk/whatsapp-web.js/tarball/jkr_hotfix_7"

Relevant Code

No response

Browser Type

Chromium

WhatsApp Account Type

Standard

Does your WhatsApp account have multidevice enabled?

Yes, I am using Multi Device

Environment

os Mac
"whatsapp-web.js": "https://github.com/Julzk/whatsapp-web.js/tarball/jkr_hotfix_7"

Additional context

No response

@MoatazAbdAlmageed MoatazAbdAlmageed added the bug Something isn't working label Feb 24, 2024
@alechkos
Copy link
Collaborator

Local web caching works as expected, check your code

@ashusoni-eng
Copy link

i am getting same error. I am using this basic code starting code.
when i scan for first time than it works perfectly but after close the app and start again this error shows.
Code is

`const qrcode = require('qrcode-terminal');

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

client.on('qr', (qr) => {
qrcode.generate(qr, { small: true });
});

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

client.initialize();
`

OS: Windows
Whatsapp-web.js Version: I have tries this version https://github.com/Julzk/whatsapp-web.js/tarball/jkr_hotfix_7 and also test current version.
Node js: i have tries v18.12.1, v21.6.2 and many other versions also

before 3 days it runs perfectly.

@ashusoni-eng
Copy link

this issue is shown if i use Whatsapp business. If i use Whatsapp than it works fine.

@Eonus
Copy link

Eonus commented Feb 25, 2024

I think this issue can be related to 17c75cc (new 2.2408.1 wweb version), also as my issue #2785 and I dont undertand why @alechkos close such issues, also without any comment why.

Repository owner locked as resolved and limited conversation to collaborators Feb 25, 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

4 participants