Command never finishes
yurividal opened this issue · 8 comments
I am trying to execute a command via curl or REST API. The command executes, but it hangs after the execution and never terminates.
On curl, the terminal just gets stuck on the command (eventhough it executes).
On REST Client, it executes, but it also hangs and the timeout counter just keeps counting forever.
Command: curl -X POST -H 'Content-Type: application/json' -i 'http://192.168.0.2:3001/assistant' --data '{ "command": "turn off the Christmas tree", "user": "Yuri" }'
I fixed the issue by completely deleting my GoogleCloud project and restarting from scratch. Not sure what went wont, since i followed the same tutorial both times.
The issue is back. Any command I send, gets executed but assistant relay does not sent back any response. So, the sender (curl, postman etc...) just hangs forever waiting...
The error is here. It keeps trying to find an unexisting audio file. Every time. If I create an empty file with this name, the command finishes fine. But then, next time, It happens again.
Error: ENOENT: no such file or directory, unlink '/data/audio-responses/1606053458852.wav', 0|www | at Object.unlinkSync (fs.js:1051:3), 0|www | at /assistant_relay/helpers/server.js:90:16, 0|www | at processTicksAndRejections (internal/process/task_queues.js:93:5) {, 0|www | errno: -2,, 0|www | syscall: 'unlink',, www | code: 'ENOENT',, 0|www | path: '/data/audio-responses/1606053458852.wav', 0|www | },
How are you running the Assistant Relay? Inside Docker or natively on your OS? Are you executing it under a root user? It sounds like AR can't save the audio file feedback it receives from the the Google Assistant Service to your hard drive. If AR can't write to the folder that it needs to it won't run.
I am running it on docker. AR has RW access to the folder, and is able to store the response wav files. I found that the problem is actually that is is trying to find old responses, and I delete all the .wav files once per day. (i dont need to store these responses).
I have no idea why AR would need a previous response to be able to execute an action. But, anyways...
I was able to workaround the issue by changing the config file to "maxResponses": 0,
You mean the software didn't work when you modified the software? Huh....imagine that. If you could be so kind as to close the issue, that would be great. Thanks.
modify the software? all i did was delete unused files. If i dont do this, soon there will be tons of useless .wav files in the folder. (every time i run a command, it saves the response into the response folder. why would someone want to keep every single audio response? anyways.. thanks, im closing the issue.
The software will automatically delete the old ones.