Fresh Install not working


#1

I installed a fresh Raspbian Stretch, which should be fully supported by now, as I read. After that I followed exactly the “Getting Started” Guide. And used the install script.

Is it possible, that only the Raspbian Lite version is supported? Because I installed the image with Pixel Desktop.

When I first started the index.js I got a message “Malos not available”. I then installed it as in the Github Documentation which worked and the error disappeared. I sourced the device id into the cli and started. Which got my errors, that I dont have read acces to the database files. After correcting the rights, I was able to start without errors. The Terminal then gives me lines like this every now and then.

hb: sen> [] svc> []

Problem: When looking into the dashboard the device is offline. When listing devices in the cli on my Windows PC it is listed as “ok: no” and “last online: 48 hours ago”, which was when I created it via CLI and before installing anything on the raspi. The matrix ping command gives me errors like the following:

at C:\Users\kolum\AppData\Roaming\nvm\v7.9.0\node_modules\matrix-cli\node_modules\async\lib\async.js:167:37

at Socket. (C:\Users\kolum\AppData\Roaming\nvm\v7.9.0\node_modules\matrix-cli\node_modules\matrix-node-sd
k\utils\Socket.js:28:13)
at Socket.Emitter.emit (C:\Users\kolum\AppData\Roaming\nvm\v7.9.0\node_modules\matrix-cli\node_modules\component-emi
tter\index.js:133:20)
at Socket.onClose (C:\Users\kolum\AppData\Roaming\nvm\v7.9.0\node_modules\matrix-cli\node_modules\engine.io-client\l
ib\socket.js:715:10) TypeError: Cannot read property ‘message’ of null

Any help is appreciated. Thanks ahead guys! :slight_smile:


#2

I now tried using Raspbian Lite and failed again!

When enabling “DEBUG *” I can see, that the ping command from my Windows machine reaches the device, despite the errors. Why cant I see the device in the Online Dashboard and app as online?

It simply does not work :confused:


Cannot do matrix ping
#3

Can you try NODE_ENV=dev node index.js and show the result i think that i have the same problem too.


#4

I have the same issue with matrix v0.15.0 on Jessie Lite

hb: sen> [] svc> []
hb: sen> [] svc> []
hb: sen> [] svc> []

I tried with DEV env but my account is not recognized (work with PROD and RC)

I use the install script, follow all the docs 2 times
It’s not clear if we have to use RC, DEV, PRODUCTION env (RC in installation documentation but DEV in manual installation …)
The mobile app on iOS (in prod env only) never paired with the matrix

Ideally, if someone can update the full install documentation or the installation script …

I also have device in status “ok: no” and “last online: 48 years ago”

But I can install, push and run APPS on the matrix
I got error when trying to ping matrix

#matrix ping

Matrix CLI Error: TypeError: Cannot read property ‘message’ of null
at /usr/local/lib/node_modules/matrix-cli/lib/app.js:163:28
at /usr/local/lib/node_modules/matrix-cli/node_modules/async/lib/async.js:726:13
at /usr/local/lib/node_modules/matrix-cli/node_modules/async/lib/async.js:52:16
at /usr/local/lib/node_modules/matrix-cli/node_modules/async/lib/async.js:269:32
at /usr/local/lib/node_modules/matrix-cli/node_modules/async/lib/async.js:44:16
at /usr/local/lib/node_modules/matrix-cli/node_modules/async/lib/async.js:723:17
at /usr/local/lib/node_modules/matrix-cli/node_modules/async/lib/async.js:167:37
at Socket. (/usr/local/lib/node_modules/matrix-cli/node_modules/matrix-node-sdk/utils/Socket.js:28:13)
at Socket.Emitter.emit (/usr/local/lib/node_modules/matrix-cli/node_modules/component-emitter/index.js:133:20)
at Socket.onClose (/usr/local/lib/node_modules/matrix-cli/node_modules/engine.io-client/lib/socket.js:715:10) TypeError: Cannot read property ‘message’ of null
at /usr/local/lib/node_modules/matrix-cli/lib/app.js:163:28
at /usr/local/lib/node_modules/matrix-cli/node_modules/async/lib/async.js:726:13
at /usr/local/lib/node_modules/matrix-cli/node_modules/async/lib/async.js:52:16
at /usr/local/lib/node_modules/matrix-cli/node_modules/async/lib/async.js:269:32
at /usr/local/lib/node_modules/matrix-cli/node_modules/async/lib/async.js:44:16
at /usr/local/lib/node_modules/matrix-cli/node_modules/async/lib/async.js:723:17
at /usr/local/lib/node_modules/matrix-cli/node_modules/async/lib/async.js:167:37
at Socket. (/usr/local/lib/node_modules/matrix-cli/node_modules/matrix-node-sdk/utils/Socket.js:28:13)
at Socket.Emitter.emit (/usr/local/lib/node_modules/matrix-cli/node_modules/component-emitter/index.js:133:20)
at Socket.onClose (/usr/local/lib/node_modules/matrix-cli/node_modules/engine.io-client/lib/socket.js:715:10)


#5

I tried it with DEV to, but got the following error at first

API Error: 400 - Device not found.
Unable to setup online MOS, something went wrong (400) (Device Token Retrieval Error)
Bad Matrix Initialization Device Token Retrieval Error
Cleanup complete…

But the “matrix set env dev” command in the CLI, logging in again and creating the device in that Environment again helped. Of course you have to create another file like .envdev with the new exported token and have to source it on your pi. Then after restarting the index.js it should connect to the DEV Environment succesfully.

Now for the Ping Error: It is exactly what is discussed here: https://github.com/matrix-io/matrix-cli/issues/105
Just clone the newest “dev” branch github directory to your local machine, cd into the directory, use npm install and after it finished npm link in the same directory. Now when using the “matrix” command in your Terminal it should say version 1.6.1 and the ping command is working as expected.
Another question that remains for me is, wether I can switch between the version in the local cloned directory, which I linked globally and the previously installed global version. Is the link replacing the old version? And of course I am a biit curious, why the latest “dev” branch has an older version number. Maybe anyone knows something about it.

What exactly changes, when I start it in DEV instead of something else? Is it just a name, so that I can have different versions of my programm or are there different features as well?

Hope that helps you guys, if you have any questions feel free to ask :slight_smile:


#6

The same issue.
Any sugestion of the developers of this product!!

‘d1b5d16afeb91a03fc3ec0d22936bd23df3789ea53a6ec00d7b65aba2d102d53f1a26c7379f96360ed1229b948’,
jwt_token: true },
json: true } +5ms
sdk [post] body: { status: ‘error’, status_code: 400, error: ‘Device not found.’ } +329ms
sdk Device Error { status: ‘error’, status_code: 400, error: ‘Device not found.’ } +8ms
API Error: 400 - Device not found.
Unable to setup online MOS, something went wrong (400) (Device Token Retrieval Error)
Bad Matrix Initialization Device Token Retrieval Error
sdk Loader stopped +7ms
sdk Loader stopped +2s
sdk DESTROYING +8ms
sdk Firebase wasn’t initialized +8ms
Cleanup complete…


#7

Hi guys, so i will just make some clarifications for you and read again for other issues you are having.

  1. hb: sen> [] svc> [] These lines aren’t issues. These are the heartbeat, while there are no app process running these shows what sensors and services are activated. When you start an app you will start the sensors and/or services you guys will be using
  2. About the matrix ping error. i made an update at the matrix-cli, if you guys are using the dev branch, you can just use a git pull command and i will be fixed. For now, on the next master updates, this hotfix will be there too. But if you doesn’t want to move to another branch and works at the stable branch, you can change your CLI like this commit https://github.com/matrix-io/matrix-cli/pull/107/files
  3. About the DEV, RC and PRODUCTION environment. It’s important that you always work in the env you registered your account. If you made an account at the RC env, always works on that (register a device, initiates MOS, or work in mobile), always use the env your account was made. If you don’t, you will be receiving errors like “device not found” or “account not recognized” or something like htis.