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

whatsapp-web.js suddenly stopped working (src/webCache/LocalWebCache.js:34 throws error) #2889

Closed
1 task done
rseiffert opened this issue Apr 4, 2024 · 1 comment
Closed
1 task done
Labels
bug Something isn't working

Comments

@rseiffert
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

THIS BUG HAS NOT DESCRIBED ENOUGH TO BE WORKED ON, but I am afraid..... I will remove this line if it's ready

whatsapp-web.js worked until yesterday like a charm but stopped working today :-(

Here is some simplified code

//index.ts
import * as wac from './controllers/whatsapp.controller'

wac.initWhatsApp();
// whatsapp.controller.ts
import { Client, MessageMedia, LocalAuth } from 'whatsapp-web.js';

const whatsAppClient = new Client({
   authStrategy: new LocalAuth(),
   puppeteer: {
      executablePath: '/Applications/Google Chrome.app/Contents/MacOS/Google Chrome',
   }
});

export const initWhatsApp:any = ():void => {
   whatsAppClient.initialize()
}

All of a sudden whatsAppClient.initialize() throws an error:

[PATH_IN_node_modules_TO/]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 ([PATH_IN_node_modules_TO/]webCache/LocalWebCache.js:34:69)
   at
   [PATH_IN_node_modules_TO/]whatsapp-web.js@1.23.0/node_modules/whatsapp-web.js/src/Client.js:744:36

indexHtml already is empty

Expected behavior

It worked yesterday, it should work today

Steps to Reproduce the Bug or Issue

  • Create a node.js project
  • Put the attached (simplified) package.json in the project-root and install it
  • create src-folder with the attached index.ts
  • Create controller-folder within the src-folder with the attached whatsapp.controller.tsin it

Try to to run it - CRY ;-)

Relevant Code

see the description above

Browser Type

Google Chrome

WhatsApp Account Type

Standard

Does your WhatsApp account have multidevice enabled?

No, I am not using Multi Device

Environment

  • whatsapp-web.js Version: 1.23.0
  • puppeteer Version: 13.7.0
  • Chrome Version: 123.0.6312.107
  • MacOS Version: 14.4.1

Just for info, but this is nothing new I think, pnpm install (same as npm install) throws a WARNING for puppeteer

WARN 1 deprecated subdependencies found: puppeteer@13.7.0

Additional context

No response

@rseiffert rseiffert added the bug Something isn't working label Apr 4, 2024
@alechkos
Copy link
Collaborator

alechkos commented Apr 4, 2024

#2789

Repository owner locked and limited conversation to collaborators Apr 4, 2024
@alechkos alechkos closed this as not planned Won't fix, can't repro, duplicate, stale Apr 4, 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