whatsapp-api
                                
                                 whatsapp-api copied to clipboard
                                
                                    whatsapp-api copied to clipboard
                            
                            
                            
                        could you implement a method to restart the session when its recovery does not go as planned
from time to time such situations occur when you change the markup and restart the container, or take out other nuances when the session stops responding and you restart the session, it is not restored the first time, sometimes it takes up to 6 restarts, but in the documentation, I saw the method and it seems to solve the problem after restarting the session
https://docs.wwebjs.dev/Client.html#resetState
Not sure if it helps, but we can indeed add resetState to the library
this helps when we get such an error when initializing a session, or simply killing a page or killing a popitir process, but it seems to me that this is a more disastrous way than destroying a window
Initialize error: Waiting for selector [data-icon='search'] failed: Protocol error (Runtime.callFunctionOn): Target closed.