matrix-io / matrix-os

MATRIX OS Codebase
https://creator.matrix.one
GNU General Public License v3.0
75 stars 17 forks source link

Error when attempting to stop apps. #84

Closed KyleJosling closed 7 years ago

KyleJosling commented 7 years ago

I get the following error when attempting to stop an app:

 Stopping ledDemo
 Message recieved from app without active application record /home/pi/matrix-os/apps/ledDemo.matrix/index.js
 Uncaught exception:  TypeError: Cannot convert undefined or null to object
 UNKNOWN ERROR! TypeError: Cannot convert undefined or null to object
 at ChildProcess.<anonymous> (/home/pi/matrix-os/lib/service/manager.js:503:21)
 at emitNone (events.js:86:13)
 at ChildProcess.emit (events.js:185:7)
 at finish (internal/child_process.js:711:14)
 at _combinedTickCallback (internal/process/next_tick.js:67:7)
 at process._tickCallback (internal/process/next_tick.js:98:9)
 Unable to clean, exitting...

Applications can start but they are not able to stop. I have to reconnect the device using NODE_ENV=rc node index.js every time I want to deploy a new app version

gordinh commented 7 years ago

Hi @KyleJosling can you pass me the steps you had done until starting that error? Also, which version of the MOS are you running? Did you try to stop the app from the matrix-cli, matrix dashboard or the mobile app?

KyleJosling commented 7 years ago

Hi @gordinh , thanks for the reply. I'm using the newest version of MOS ( 0.14.0). I'm trying to stop the app from the matrix-cli. To start the MOS i use:

pi@openhab:~/matrix-os$ NODE_ENV=rc node index.js
Environment Selected: rc
Loading...  device
Loading...  event
Loading...  service
Not using device data from db, using MATRIX_DEVICE_ID and MATRIX_DEVICE_SECRET instead!
Starting as device: d643a34c038a
Bluetooth pairing enabled
Installed Apps: gaugeLed, ledDemo, testapp, HelloWorld
Local Apps: HelloWorld.matrix, gaugeLed.matrix, ledDemo.matrix
Local / Installed Δ -1
MXSS Connected: http://mxss.admobilize.com
MALOS COMPONENTS  ⚙ IMU:20013 | Provides yaw/pitch/roll. Check Imu message (protocol buffer)
 ⚙ Humidity:20017 | Provides humidity and temperature. Check Humidity message (protocol buffer)
 ⚙ Everloop:20021 | Write-only. There are 35 leds. Values range from 0 to 255. Check message EverloopImage (protocol buffer)
 ⚙ Pressure:20025 | Provides barometer/altimeter and temperature. Check Pressure message (protocol buffer)
 ⚙ UV:20029 | Provides UV index. Check UV index message (protocol buffer). Also provides a string with the UV risk according to the OMS. See: https://www.epa.gov/sunsafety/uv-index-scale-0
 ⚙ MicArray_Alsa:20037 | Simple ALSA Driver for MATRIX Creator's Microphone Array
 ⚙ Lirc:20041 | Write-read. Get list remotes and send commands via IR. In development
 ⚙ Servo:20045 | Write-read. Servo handler. In development
 ⚙ Gpio:20049 | Write-read. Gpio handler. In development

=<[^\/^]>= [d643a34c038a] ready
[5915cadf6af54a2000793da8]
 _  _ ____ ___ ____ _ _  _
 |\/| |__|  |  |__/ |  \/   [o__o]
 |  | |  |  |  |  \ | _/\_  v0.14.0

I can run something like

matrix deploy ledDemo
matrix start ledDemo

from the CLI, but as soon as I do

matrix stop ledDemo

It gives me the error above. and the MOS stops.

eighteyes commented 7 years ago

@KyleJosling thanks for reporting this, it was an issue with some recent changes.

Please update to v0.14.1 and try again, it should be working.