WebSocket not available after OBS restart

Prukotar

New Member
Hello,

I've trouble connecting to OBS WebSocket after restarting OBS. I already posted here, that my OBS seems to be crashed, when shutting down the PC and starting OBS the next time. I think that has something to do, with OBS WebSocket. OBS needs ~60 Seconds before it really stops appearing in Task-Manager. That seems to be a timeout, that kills a process after not responding for a 60 second period.

Can someone explain, how OBS WebSocket is integrated into OBS? Are there other executables involved? Can I debug this scenario any better? I always have to restart the full PC before the websockets are working again.

I'm using iobroker with the obs socket javascript implementation. The corresponding script establishes a connection when started and holds it. When the script is stopping, the connection is closed. I also tried to connect and disconnect each time I want to control OBS via iobroker (this fills up the open connections on windows for the OBS WebSocket Port, the connections are never really closed on the windows side). I also have involved another StreamDeck on a different pc that uses the multi obs controller for stream deck.

I tried turning OFF the control via iobroker completly OR the control via the multi obs controller plugin. When both are turned off and I'm not using obs websockets at all, OBS closes faster and the error message after PC restart is gone.

How can I debug this further?
 

Prukotar

New Member
I can add some more information: When I change the port for the OBS WebSocket after restarting inside OBS I can connect again from StreamDeck or iobroker (I have to change the websocket port here, too). However it does not work changing the port one up, save, and change it back to the previous value. So there is something that is blocking the port, when OBS stops. May be a zombie process?
 

Prukotar

New Member
I have a crash report here. May be that helps?
Seems to be, that OBS is having trouble closing the Browser-Instance and therefore not closing any sockets?

Bild_2024-01-18_121659898.png


The log-file itself ends with:
16:30:48.273: [obs-websocket] [WebSocketServer::Stop] Server stopped successfully
16:30:48.275: Tried to call obs_frontend_remove_event_callback with no callbacks!
16:30:48.275: [obs-websocket] [obs_module_unload] Finished shutting down.
16:30:48.288: [obs-ndi] +obs_module_unload()
16:30:48.318: [obs-ndi] obs_module_unload: goodbye !
16:30:48.318: [obs-ndi] -obs_module_unload()
 

Prukotar

New Member
Okay, nice thread... I'm just talking to myself. Cool.

However: I found it. I have the Plugin DroidCam installed. The process adb.exe that's shipped with this plugin hangs when stopping OBS. OBS is waiting 60 seconds and is simply giving up. I don't know why this stops the OBS Socket from reloading on next OBS start. Uninstalling the DroidCam Plugin and reinstalling it without Android and iPhone USB support fixed the problem.
 

razusharma

New Member
Hey bro , i want a small help , is there a way that i can display my obs scene or source to android camera through usb , i have seen lots of people doing such , please help me
 

D34F

New Member
Okay, nice thread... I'm just talking to myself. Cool.

However: I found it. I have the Plugin DroidCam installed. The process adb.exe that's shipped with this plugin hangs when stopping OBS. OBS is waiting 60 seconds and is simply giving up. I don't know why this stops the OBS Socket from reloading on next OBS start. Uninstalling the DroidCam Plugin and reinstalling it without Android and iPhone USB support fixed the problem.
It do be like that sometimes, but I just wanted to thank you for this thread and coming back to let us know your solution. Works like a charm, so thanks again!
 
Top