-
-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
Problem with Chromium #338
Labels
bug
Something isn't working
Comments
This error is a bug from puppeter about canvas qrcode after pairing a number... I've sent one PR to avoid this error → #334 |
Look this question -> WhatsApp Web is asking to update Chrome while using Chromium I believe this issue is related to cookies and temporary data |
I took the userDataDir out of the puppeteer and it seems to have solved the problem |
Just save/restore the session: import * as fs from "fs";
import * as util from "util";
const readFile = util.promisify(fs.readFile);
const writeFile = util.promisify(fs.writeFile);
const sessionFilePath = "./session.json";
async function initialize() {
let session: any = undefined;
try {
session = JSON.parse(await readFile(sessionFilePath, 'utf-8'));
} catch (e) {
logger.info('Couldnt load existing session')
}
const client = new Client({
puppeteer: {
headless: process.env.HEADLESS !== 'false',
},
...(session ? { session } : {})
});
client.on('authenticated', (session: any) => {
logger.info(`Authenticated: Saving session to ${sessionFilePath}`);
writeFile(sessionFilePath, JSON.stringify(session));
});
client.initialize();
}
initialize(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
WhatsApp works with Google Chrome 49 or higher.
Chromium r782078
Library
The text was updated successfully, but these errors were encountered: