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

Manifaste,.json Error!!! #3113

Closed
1 task done
joshtin2505 opened this issue Jun 19, 2024 · 1 comment
Closed
1 task done

Manifaste,.json Error!!! #3113

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

Comments

@joshtin2505
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

Estoy experimentando un error al utilizar la biblioteca whatsapp-web.js con la última versión de WhatsApp Web. El error es el siguiente:

TypeError: Cannot read properties of null (reading '1')
at LocalWebCache.persist (...)
at Client.js:786:36
...
----------------------
C:\Users\Producción\Documents\Dev\JS\social-farm\api\node_modules.pnpm\whatsapp-web.js@1.24.0\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\Producción\Documents\Dev\JS\social-farm\api\node_modules.pnpm\whatsapp-web.js@1.24.0\node_modules\whatsapp-web.js\src\webCache\LocalWebCache.js:34:69)
at C:\Users\Producción\Documents\Dev\JS\social-farm\api\node_modules.pnpm\whatsapp-web.js@1.24.0\node_modules\whatsapp-web.js\src\Client.js:786:36
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

Expected behavior

Comportamiento esperado
Se espera que la biblioteca whatsapp-web.js pueda detectar correctamente el patrón del archivo manifest.json y no arroje ningún error al intentar iniciar sesión en WhatsApp Web. El patrón del archivo manifest.json debería ser reconocido y utilizado adecuadamente por la biblioteca, independientemente de los cambios que se realicen en la aplicación web de WhatsApp.

Steps to Reproduce the Bug or Issue

Pasos para reproducir

  1. Instalar la última versión de whatsapp-web.js
  2. Iniciar el proyecto
  3. Intentar iniciar sesión en WhatsApp Web

Relevant Code

import { Client } from 'whatsapp-web.js';
import qrcode from 'qrcode-terminal';

const app = express();

const client = new Client();

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

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

client.initialize();

app.get('/qr', (req, res) => {
client.on('qr', (qr) => {
res.send({ qr });
});
});

Browser Type

Chromium

WhatsApp Account Type

Standard

Does your WhatsApp account have multidevice enabled?

No, I am not using Multi Device

Environment

OS: Windows 10
whatsapp-web.js version: 1.24.0
WhatsApp Web version latest
Node.js Version: v20.14.0

Additional context

Según mi investigación, parece que el problema se debe a un cambio en el patrón del archivo manifest.json en la última versión de WhatsApp Web. El nuevo patrón que he identificado es /data/manifest.json.

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

#2789
#2816

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