Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to run shell command #1

Closed
drakhart opened this issue Sep 26, 2021 · 0 comments · Fixed by #2
Closed

Unable to run shell command #1

drakhart opened this issue Sep 26, 2021 · 0 comments · Fixed by #2

Comments

@drakhart
Copy link
Contributor

Hi! I'm using your MM module and loving it so far, thanks for your work!

Unfortunately I recently run into issues with it. All of a sudden I realized it was no longer turning on and off my monitor, and found this related error in the logs:

0|magicmir | [2021-09-26 15:54:09.290] [ERROR]  Whoops! There was an uncaught exception...
0|magicmir | [2021-09-26 15:54:09.294] [ERROR]  TypeError: exec is not a function
0|magicmir |     at Class.turnDisplayOff (/home/pi/MagicMirror/modules/mmm-toggle-by-mqtt/node_helper.js:85:9)
0|magicmir |     at MqttClient.<anonymous> (/home/pi/MagicMirror/modules/mmm-toggle-by-mqtt/node_helper.js:63:26)
0|magicmir |     at MqttClient.emit (events.js:200:13)
0|magicmir |     at MqttClient._handlePublish (/home/pi/MagicMirror/modules/mmm-toggle-by-mqtt/node_modules/mqtt/lib/client.js:1162:12)
0|magicmir |     at MqttClient._handlePacket (/home/pi/MagicMirror/modules/mmm-toggle-by-mqtt/node_modules/mqtt/lib/client.js:351:12)
0|magicmir |     at work (/home/pi/MagicMirror/modules/mmm-toggle-by-mqtt/node_modules/mqtt/lib/client.js:283:12)
0|magicmir |     at Writable.writable._write (/home/pi/MagicMirror/modules/mmm-toggle-by-mqtt/node_modules/mqtt/lib/client.js:294:5)
0|magicmir |     at doWrite (/home/pi/MagicMirror/modules/mmm-toggle-by-mqtt/node_modules/readable-stream/lib/_stream_writable.js:428:64)
0|magicmir |     at writeOrBuffer (/home/pi/MagicMirror/modules/mmm-toggle-by-mqtt/node_modules/readable-stream/lib/_stream_writable.js:417:5)
0|magicmir |     at Writable.write (/home/pi/MagicMirror/modules/mmm-toggle-by-mqtt/node_modules/readable-stream/lib/_stream_writable.js:334:11)
0|magicmir | [2021-09-26 15:54:09.307] [ERROR]  MagicMirror will not quit, but it might be a good idea to check why this happened. Maybe no internet connection?
0|magicmir | [2021-09-26 15:54:09.310] [ERROR]  If you think this really is an issue, please open an issue on GitHub: https://github.com/MichMich/MagicMirror/issues

I don't know why it started happening, because I didn't update or change either the tmp folder permissions, MM, Node, ShellJS or your module, but I found a related ShellJS issue where they're still trying to find an explanation: shelljs/shelljs#1024

Anyway I managed to fix it by getting rid of ShellJS in favor of Node's native child_process, so I'll be opening a PR soon... I guess there's no need to specify all the versions or how to reproduce the error (I wouldn't know how anyway).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant