Closed mszpr closed 2 months ago
@mszpr, ⭐3 XP earned, 🏆First Issue Created completed! Contribute more to raise your XP/Level, complete challenges for extra achievements! [Sign up for personal dashboard]
i found the issue, the issue was when i close the node js by my self or by any exception , Google Chrome page not closing and still working in background.
so the solution was to set listener to listen if node about to close, close all pages then continue closing the node app.
exmaple:
var softCloseAll = false;
process.stdin.resume();
[`exit`, `SIGINT`, `SIGUSR1`, `SIGUSR2`, `SIGTERM`].forEach((eventType) => {
if(!softCloseAll){
process.on(eventType, (e) => {
softCloseAll = true;
ws.softCloseAll().then(() => {
console.log("All clients has been closed!");
process.exit();
});
});
}
});
@mszpr, ⭐3 XP earned, 🏆First Comment Added completed, 💪Level 1 achieved! Contribute more to raise your XP/Level, complete challenges for extra achievements! [Sign up for personal dashboard]
@mszpr, ⭐3 XP earned, 🏆First Issue Closed completed, 💪Level 1 achieved! Contribute more to raise your XP/Level, complete challenges for extra achievements! [Sign up for personal dashboard]
i found the issue, the issue was when i close the node js by my self or by any exception , Google Chrome page not closing and still working in background.
so the solution was to set listener to listen if node about to close, close all pages then continue closing the node app.
exmaple:
var softCloseAll = false; process.stdin.resume(); [`exit`, `SIGINT`, `SIGUSR1`, `SIGUSR2`, `SIGTERM`].forEach((eventType) => { if(!softCloseAll){ process.on(eventType, (e) => { softCloseAll = true; ws.softCloseAll().then(() => { console.log("All clients has been closed!"); process.exit(); }); }); } });
Getting the same even for new sessions ..
@Saifallak, ⭐3 XP earned, 🏆First Comment Added completed, 💪Level 1 achieved! Contribute more to raise your XP/Level, complete challenges for extra achievements! [Sign up for personal dashboard]
Description
Hi there!, When i want to run multi instances on wppconnect this message appeared to me:
info: [10000000004:browser] Using browser folder '/Users/mahmoud/Desktop/Projects/whatsapp/wa-instance-wppconnect/tokens/10000000004' info: [10000000004:browser] Initializing browser... error: [10000000003:browser] Error no open browser error: [10000000003:browser] Failed to launch the browser process! undefined [98249:259:0712/030811.557031:ERROR:process_singleton_posix.cc(335)] Failed to create /Users/mahmoud/Desktop/Projects/whatsapp/wa-instance-wppconnect/tokens/10000000003/SingletonLock: File exists (17) [98249:259:0712/030811.557323:ERROR:chrome_main_delegate.cc(592)] Failed to create a ProcessSingleton for your profile directory. This means that running multiple instances would start multiple browser processes rather than opening a new window in the existing process. Aborting now to avoid profile corruption.
TROUBLESHOOTING: https://pptr.dev/troubleshooting
Environment
Log Output
Your Code
This issue happen when i restore all instances after restart supervisor using restorePreviousSessions() method
thanks in advance.