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

Memory leak when starting puppeteer with userDataDir in headlesss mode #294

Closed
Zzombiee2361 opened this issue Jul 28, 2020 · 1 comment
Closed
Labels
bug Something isn't working

Comments

@Zzombiee2361
Copy link

Bug description

Chrome process just use 50% CPU and keep eating memory. The qr event never fired.
image

Reproduction steps

Steps to reproduce the behavior:

  1. Start client with userDataDir.
  2. Open any process manager and watch as chrome process eating memory.
  3. qr event also never fired.
    ...

Expected behavior

No memory leak and qr event gets fired.

Relevant code

const puppeteerPath = `./puppeteer_data/${id}`;
const client = new Client({
	puppeteer: {
		userDataDir: puppeteerPath,
		args: ['--no-sandbox']
	},
	session: sessionData,
	restartOnAuthFail: true,
});

Environment (please complete the following information):

WhatsApp

  • Account type: Standard
  • Device OS: Android

Library

  • Browser: Chromium
  • NodeJS version (node -v): v12.18.3
  • npm or yarn version (npm -v): yarn v1.22.4
  • whatsapp-web.js version: 1.7.0

Additional context

I'm trying to make multi session authentication. Either disabling headless or userDataDir fixes the issue, but I need both.

@Zzombiee2361 Zzombiee2361 added the bug Something isn't working label Jul 28, 2020
@pedroslopez
Copy link
Owner

This seems like an issue with puppeteer and the path specification. A very similar issue was reported here puppeteer/puppeteer#3453 and the fix was relating to path specification. Please take a look at that issue for more info.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants