onStateChanged not working
See original GitHub issueDescription
onStateChanged not working .
Environment
Venom version(s): e.g. 4.0.4
Browser: Chromium 938248
OS: Windows 10 Pro (WSL: Ubuntu)
Node version: Node 14.8.2 (I also tested with node 17+ and node 8.x)
Your Code
this.whatsapp.onStateChange((state) => {
console.log('State changed: ', state);
// force whatsapp take over
if ('CONFLICT'.includes(state)) {
//this.whatsapp.useHere();
process.exit(1)
}
// detect disconnect on whatsapp
if ('UNPAIRED'.includes(state)) {
console.log('logout');
process.exit(1)
}
});
Additional context / Screenshot
Issue Analytics
- State:
- Created 2 years ago
- Comments:10
Top Results From Across the Web
onStateChanged not working · Issue #910 - GitHub
i built an app to listen to some values on HTML file but first you should listen to onStateChanged function but this Stream...
Read more >Flutter Webview onStateChanged is not getting triggered
When i changed this part of the code it started working. Now i need to figure out why: final flutterWebviewPlugin = new ...
Read more >onStateChanged - Mozilla - MDN Web Docs
onStateChanged. Fires when the captive portal state changes. ... onStateChanged. ... Report problems with this compatibility data on GitHub ...
Read more >LifecycleEventObserver - Android Developers
abstract void onStateChanged( @NonNull LifecycleOwner source, @NonNull Lifecycle.Event event ). Called when a state transition event happens.
Read more >Scripting API: CullingGroup.onStateChanged - Unity - Manual
Is something described here not working as you expect it to? It might be a Known Issue. Please check with the Issue Tracker...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
the WAPI code is listening to state change
window.Store.State.default.on...
but instead it should usewindow.Store.State.Socket.on...
Same problem here