Skip to content

fix: use node 20 for whatsapp-web.js stability#112

Open
DISTinTheHouse wants to merge 1 commit into
rmyndharis:mainfrom
DISTinTheHouse:fix/node20-stability
Open

fix: use node 20 for whatsapp-web.js stability#112
DISTinTheHouse wants to merge 1 commit into
rmyndharis:mainfrom
DISTinTheHouse:fix/node20-stability

Conversation

@DISTinTheHouse
Copy link
Copy Markdown

Description

Fixes WhatsApp session instability caused by Node.js 22 in the production Docker image.

The application successfully generated QR codes and authenticated sessions, but crashed immediately after login with:

Execution context was destroyed, most likely because of a navigation.

The issue was caused by incompatibility between:

  • Puppeteer
  • whatsapp-web.js
  • Node.js 22

Changes

Replaced:

FROM node:22-slim AS production

With:

FROM node:20-bookworm-slim AS production

Type of Change

  • Bug fix

Checklist

  • Self-reviewed
  • Tested locally
  • Sessions authenticate correctly
  • QR generation works
  • Message sending works
  • Connection remains stable after authentication

Validation Performed

Tested successfully with:

  • Docker Desktop
  • Windows
  • Session creation
  • QR authentication
  • Persistent WhatsApp connection
  • Sending WhatsApp messages

Notes

After this change:

  • sessions no longer disconnect after authentication
  • Puppeteer remains stable
  • WhatsApp sessions stay connected properly

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

Successfully merging this pull request may close these issues.

1 participant