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 create qr #287

Open
Tsjippy opened this issue Oct 30, 2024 · 5 comments
Open

Cannot create qr #287

Tsjippy opened this issue Oct 30, 2024 · 5 comments

Comments

@Tsjippy
Copy link

Tsjippy commented Oct 30, 2024

Thank you for this great package.

I have installed it on a rpi3b. I access it fro a winows 11 machine

This command http://192.168.0.202:3000/session/start/test runs fine.

But this command http://192.168.0.202:3000/session/qr/test leads to the following error:

 npm run start

> whatsapp-web-api@1.0.0 start
> node server.js

(node:24289) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
Server running on port 3000
existing session detected birhtdays
existing session detected birthdays
Initialize error: Failed to launch the browser process!
/home/pi/whatsapp-api/node_modules/puppeteer-core/.local-chromium/linux-1045629/chrome-linux/chrome: 1: cannot create �v@H�@8
@$@@@����
�v
�v�v�v�v�s�     �s�     �#$
�C$
�C$
��{��{ �
P�
P�
��(�#$
�C$
�C$
��@�i�
���
���
�R�td�#$
�C$
�C$
��{��{P�td@@@�M;�M;Q�td���XX/lib64/ld-linux-x86-64.so.2GNU     INFOCrashpad<\�                                                                                                                                                              GNU�x���Ba p � ��������: Directory nonexistent
/home/pi/whatsapp-api/node_modules/puppeteer-core/.local-chromium/linux-1045629/chrome-linux/chrome: 1: Syntax error: Unterminated quoted string


TROUBLESHOOTING: https://github.com/puppeteer/puppeteer/blob/main/docs/troubleshooting.md

Initialize error: Failed to launch the browser process!
/home/pi/whatsapp-api/node_modules/puppeteer-core/.local-chromium/linux-1045629/chrome-linux/chrome: 1: cannot create �v@H�@8
@$@@@����
�v
�v�v�v�v�s�     �s�     �#$
�C$
�C$
��{��{ �
P�
P�
��(�#$
�C$
�C$
��@�i�
���
���
�R�td�#$
�C$
�C$
��{��{P�td@@@�M;�M;Q�td���XX/lib64/ld-linux-x86-64.so.2GNU     INFOCrashpad<\�                                                                                                                                                              GNU�x���Ba p � ��������: Directory nonexistent
/home/pi/whatsapp-api/node_modules/puppeteer-core/.local-chromium/linux-1045629/chrome-linux/chrome: 1: Syntax error: Unterminated quoted string


TROUBLESHOOTING: https://github.com/puppeteer/puppeteer/blob/main/docs/troubleshooting.md

PuTTYPuTTYInitialize error: Failed to launch the browser process!
/home/pi/whatsapp-api/node_modules/puppeteer-core/.local-chromium/linux-1045629/chrome-linux/chrome: 1: cannot create �v@H�@8
@$@@@����
�v
�v�v�v�v�s�     �s�     �#$
�C$
�C$
��{��{ �
P�
P�
��(�#$
�C$
�C$
��@�i�
���
���
�R�td�#$
�C$
�C$
��{��{P�td@@@�M;�M;Q�td���XX/lib64/ld-linux-x86-64.so.2GNU     INFOCrashpad<\�                                                                                                                                                              GNU�x���Ba p � ��������: Directory nonexistent
/home/pi/whatsapp-api/node_modules/puppeteer-core/.local-chromium/linux-1045629/chrome-linux/chrome: 1: Syntax error: Unterminated quoted string


TROUBLESHOOTING: https://github.com/puppeteer/puppeteer/blob/main/docs/troubleshooting.md

PuTTYTimed out waiting for nested object
Timed out waiting for nested object
Timed out waiting for nested object
Timed out waiting for nested object
node:_http_outgoing:699
    throw new ERR_HTTP_HEADERS_SENT('set');
          ^

Error [ERR_HTTP_HEADERS_SENT]: Cannot set headers after they are sent to the client
    at ServerResponse.setHeader (node:_http_outgoing:699:11)
    at ServerResponse.header (/home/pi/whatsapp-api/node_modules/express/lib/response.js:794:10)
    at ServerResponse.send (/home/pi/whatsapp-api/node_modules/express/lib/response.js:174:12)
    at ServerResponse.json (/home/pi/whatsapp-api/node_modules/express/lib/response.js:278:15)
    at sendErrorResponse (/home/pi/whatsapp-api/src/utils.js:12:22)
    at /home/pi/whatsapp-api/src/controllers/sessionController.js:47:25
    at process.processTicksAndRejections (node:internal/process/task_queues:105:5) {
  code: 'ERR_HTTP_HEADERS_SENT'
}

Node.js v22.11.0

@avoylenko
Copy link
Collaborator

I think the browser is not able to start due to architecture of your board. Try to install it from your repository and point the CHROME_BIN env to the executable.

@Tsjippy
Copy link
Author

Tsjippy commented Oct 30, 2024

thanks for the quick reply.

That at least changed things.

Timed out waiting for nested object
Timed out waiting for nested object
node:_http_outgoing:699
    throw new ERR_HTTP_HEADERS_SENT('set');
          ^

Error [ERR_HTTP_HEADERS_SENT]: Cannot set headers after they are sent to the client
    at ServerResponse.setHeader (node:_http_outgoing:699:11)
    at ServerResponse.header (/home/pi/whatsapp-api/node_modules/express/lib/response.js:794:10)
    at ServerResponse.send (/home/pi/whatsapp-api/node_modules/express/lib/response.js:174:12)
    at ServerResponse.json (/home/pi/whatsapp-api/node_modules/express/lib/response.js:278:15)
    at sendErrorResponse (/home/pi/whatsapp-api/src/utils.js:12:22)
    at /home/pi/whatsapp-api/src/controllers/sessionController.js:47:25
    at process.processTicksAndRejections (node:internal/process/task_queues:105:5) {
  code: 'ERR_HTTP_HEADERS_SENT'
}

Node.js v22.11.0

If I run the url http://192.168.0.202:3000/session/qr/test again this is what I get: {"success":false,"error":"Session already exists for: test"}

@avoylenko
Copy link
Collaborator

@Tsjippy the ERR_HTTP_HEADERS_SENT error has been fixed and awaits @chrishubert approve

@Tsjippy
Copy link
Author

Tsjippy commented Oct 31, 2024

Thank you.

for now I will just runs the thing on my laptop and copy the session folder to my rpi. See if that works

@weichen1002
Copy link

Hello, how do I deal with the same problem

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants