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

退出登录后无法继续推送二维码 #101

Closed
Tracked by #19
su-chang opened this issue Jan 26, 2022 · 7 comments
Closed
Tracked by #19

退出登录后无法继续推送二维码 #101

su-chang opened this issue Jan 26, 2022 · 7 comments
Assignees

Comments

@su-chang
Copy link
Member

No description provided.

@su-chang
Copy link
Member Author

su-chang commented Jan 27, 2022

whatsapp-web.js 通过puppeteer监听到 framenavigated 事件后会主动调用 destroy() 方法。

可能需要重新init来获取新的二维码。

@lijiarui
Copy link
Member

应该不只是不推送二维码,而是退出进程。

@su-chang
Copy link
Member Author

su-chang commented Feb 7, 2022

@guo40020 可以把你针对whatsapp-web中退出登录后支持获取二维码的相关内容关联在这里。

@kellyiscute
Copy link
Collaborator

prevent exiting after disconnect
This commit modified the destroy() function of whatsapp-web.js to pervent the default behavior of terminating the browser and re-init.

@kellyiscute
Copy link
Collaborator

The browser instance cannot be reused since it caused the new page to be blank or reload infinitely. Therefore, the browser will be re-instancitate after a completed session to get a clean and brand new browser env.

@kellyiscute
Copy link
Collaborator

kellyiscute commented Feb 8, 2022

@juzi.bot/whatsapp-web.js@1.15.10 provides the new solution stated above, which is tested on my machine with the bug resolved.
related commit - bff4699
Close this issue once resolved is confirmed plz. @su-chang

@su-chang su-chang mentioned this issue Feb 9, 2022
@kellyiscute
Copy link
Collaborator

related commit fixed

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