Security handshake failed and speech recognition stops working
See original GitHub issueDescription I encountered this random bug on the smart mirror project, but it seems to come from sonus. When I try the sonus test command (see below)
case 1 : I say the hotword sonus detects it, I wait a while and sometimes if I say nothing I have an handshake error.
case 2 : I say the hotword sonus detects it, I wait a while and I say “hello” or something and then I have an handshake error.
case 3 : I say the hotword sonus detects it, I speak, everthing is going well, I wait a while and I say the hotword then I have an handshake error.
After that it can detect the hotword but it doesn’t detect the speech anymore. Everytime I have at least 3 handshake errors
Unfortunalty it s not easy to reproduce, even if it occurs very often.
How to reproduce
pi@raspberrypi:~/smart-mirror $ npm run sonus
> smart-mirror@0.0.7 sonus /home/pi/smart-mirror
> node sonus.js
!h: 2
E1227 00:11:15.508035697 1888 handshake.c:128] Security handshake failed: {"created":"@1482793875.507858875","description":"Handshake read failed","file":"../src/core/lib/security/transport/handshake.c","file_line":237,"referenced_errors":[{"created":"@1482793875.507826480","description":"FD shutdown","file":"../src/core/lib/iomgr/ev_epoll_linux.c","file_line":948}]}
E1227 00:11:17.511256783 1885 handshake.c:128] Security handshake failed: {"created":"@1482793877.511095482","description":"Handshake read failed","file":"../src/core/lib/security/transport/handshake.c","file_line":237,"referenced_errors":[{"created":"@1482793877.511069961","description":"FD shutdown","file":"../src/core/lib/iomgr/ev_epoll_linux.c","file_line":948}]}
E1227 00:11:18.513975132 1885 handshake.c:128] Security handshake failed: {"created":"@1482793878.513764665","description":"Handshake read failed","file":"../src/core/lib/security/transport/handshake.c","file_line":237,"referenced_errors":[{"created":"@1482793878.513719300","description":"FD shutdown","file":"../src/core/lib/iomgr/ev_epoll_linux.c","file_line":948}]}
E1227 00:11:19.516665305 1885 handshake.c:128] Security handshake failed: {"created":"@1482793879.516573118","description":"Handshake read failed","file":"../src/core/lib/security/transport/handshake.c","file_line":237,"referenced_errors":[{"created":"@1482793879.516554004","description":"FD shutdown","file":"../src/core/lib/iomgr/ev_epoll_linux.c","file_line":948}]}
Configuration
pi@raspberrypi:~/smart-mirror $ ulimit -n
65536
pi@raspberrypi:~/smart-mirror $ node -v
v6.9.2
pi@raspberrypi:~/smart-mirror $ npm -v
3.10.9
Comments I have this error on the smart-mirror master branch and on the dev branch too I make sure to clean up everything with “git clean -xdf -e config.js” and “npm install” each time
Ideas After some googling, some grpc users seems to have the same issues and it looks related to a connection limit but I only have the smart-mirror running … so it’s weird https://github.com/grpc/grpc/issues/7985
Thanks in advance for your help !
Issue Analytics
- State:
- Created 7 years ago
- Comments:5 (3 by maintainers)
This is an issue with the google speech library, more specifically with the way that grpc handles ongoing connections: GoogleCloudPlatform/google-cloud-node#1905
Seems like the workaround is to extend the time allowed when trying to reestablish a connection. This is something that doesn’t require the modification of sonus to fix!
I’m taking a bit of a guess here because I only glanced at the code, but if you construct your speech object like this before you pass it to Sonus it might fix your issue:
I believe this issue is now resolved. If it isn’t I can reopen 😃