bluerobotics / companion

Companion computer startup scripts and examples
https://www.ardusub.com/operators-manual/companion-web.html
GNU General Public License v3.0
48 stars 54 forks source link

camera disconnection can crash webui #375

Closed jaxxzer closed 2 years ago

jaxxzer commented 3 years ago
2020-08-17T22:06:00+0000 <log> index.js:1271 (Socket.<anonymous>) get companion                                                                   
version                                                                                                                                           
2020-08-17T22:06:00+0000 <log> index.js:1273 () null0.0.22                                                                                        

2020-08-17T22:06:00+0000 <log> index.js:1483 () The file was loaded!                                                                              
2020-08-17T22:06:00+0000 <log> index.js:819 (Socket.<anonymous>) get v4l2 camera                                                                  
s                                                                                                                                                 
2020-08-17T22:06:00+0000 <log> index.js:826 () getting control: Brightness int                                                                    
/home/pi/companion/br-webui/index.js:827                                                                                                          
                                                control.value = cam.controlGet(c                                                                  
ontrol.id);                                                                                                                                       
                                                                    ^                                                                             

Error: CAMERA ERROR [VIDIOC_G_CTRL] 19 No such device                                                                                             
    at Error (native)                                                                                                                             
    at /home/pi/companion/br-webui/index.js:827:27                                                                                                
    at Array.forEach (native)                                                                                                                     
    at /home/pi/companion/br-webui/index.js:824:17                                                                                                
    at Array.forEach (native)                                                                                                                     
    at Socket.<anonymous> (/home/pi/companion/br-webui/index.js:822:12)                                                                           
    at emitNone (events.js:80:13)                                                                                                                 
    at Socket.emit (events.js:179:7)                                                                                                              
    at /home/pi/companion/br-webui/node_modules/socket.io/lib/socket.js:503:12                                                                    
    at nextTickCallbackWith0Args (node.js:453:9)