matrix-io / matrix-os

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

Error with faceTest and emotionTest #104

Closed jaapmurre closed 6 years ago

jaapmurre commented 6 years ago

After having started malos_eye in a separate CLI (not mentioned in beginner's guides), and starting node index.js, I finally some reaction by the system to the standard face tests for beginners with Matrix OS. However, on seeing a face or on detecting an emotion, I keep getting the following error. It seems the tags such as 'HAPPY' are now coded as numbers like 4 (I may be wrong, just a guess). I am running Matrix OS 0.16 (downloaded yesterday).

Here is my error code from Node JS, which quits after this:

Uncaught exception: TypeError: v.tag.toLowerCase is not a function at /home/pi/matrix-os/lib/device/drivers/detection.js:51:27 at arrayReduce (/home/pi/matrix-os/node_modules/lodash/lodash.js:675:21) at Function.reduce (/home/pi/matrix-os/nodemodules/lodash/lodash.js:9673:14) at .map (/home/pi/matrix-os/lib/device/drivers/detection.js:47:28) at arrayMap (/home/pi/matrix-os/node_modules/lodash/lodash.js:631:23) at Function.map (/home/pi/matrix-os/node_modules/lodash/lodash.js:9546:14) at Object.read (/home/pi/matrix-os/lib/device/drivers/detection.js:34:14) at . (/home/pi/matrix-os/lib/service/component.js:96:26) at emitOne (events.js:96:13) at emit (events.js:188:7) TypeError: v.tag.toLowerCase is not a function at /home/pi/matrix-os/lib/device/drivers/detection.js:51:27 at arrayReduce (/home/pi/matrix-os/node_modules/lodash/lodash.js:675:21) at Function.reduce (/home/pi/matrix-os/nodemodules/lodash/lodash.js:9673:14) at .map (/home/pi/matrix-os/lib/device/drivers/detection.js:47:28) at arrayMap (/home/pi/matrix-os/node_modules/lodash/lodash.js:631:23) at Function.map (/home/pi/matrix-os/node_modules/lodash/lodash.js:9546:14) at Object.read (/home/pi/matrix-os/lib/device/drivers/detection.js:34:14) at . (/home/pi/matrix-os/lib/service/component.js:96:26) at emitOne (events.js:96:13) at emit (events.js:188:7) UNKNOWN ERROR! TypeError: v.tag.toLowerCase is not a function at /home/pi/matrix-os/lib/device/drivers/detection.js:51:27 at arrayReduce (/home/pi/matrix-os/node_modules/lodash/lodash.js:675:21) at Function.reduce (/home/pi/matrix-os/nodemodules/lodash/lodash.js:9673:14) at .map (/home/pi/matrix-os/lib/device/drivers/detection.js:47:28) at arrayMap (/home/pi/matrix-os/node_modules/lodash/lodash.js:631:23) at Function.map (/home/pi/matrix-os/node_modules/lodash/lodash.js:9546:14) at Object.read (/home/pi/matrix-os/lib/device/drivers/detection.js:34:14) at . (/home/pi/matrix-os/lib/service/component.js:96:26) at emitOne (events.js:96:13) at emit (events.js:188:7) Unable to clean, exitting...

maciekrb commented 6 years ago

Hello @jaapmurre

Can you please provide the following information to help us out diagnose the issue ?

Thanks !

jaapmurre commented 6 years ago

Hi Maciek,

I downloaded NOOBS two days ago and installed it as Raspian. When I do uname -a it says: Linux raspberrypi 4.9.59-v7+ #1047 SMP Sun Oct 29 12:19:23 GMT 2017 armv7l GNU/Linux

I have Node.js 6.7.0

I used this page: https://github.com/matrix-io/matrix-creator-quickstart/wiki/MALOS-eye

Thanks for your quick reaction!

  -- Jaap

On Mon, Feb 12, 2018 at 3:33 PM, Maciek Ruckgaber notifications@github.com wrote:

Hello @jaapmurre https://github.com/jaapmurre

Can you please provide the following information to help us out diagnose the issue ?

  • Raspbian release (codename) you are using (jessie, stretch)
  • NodeJS version you are running
  • link to the documentation you are currently following to install MALOS Eye ?

Thanks !

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/matrix-io/matrix-os/issues/104#issuecomment-364939874, or mute the thread https://github.com/notifications/unsubscribe-auth/AAdJuWUuawKVPZZj-_gQLNcdAHbftW7Rks5tUEvTgaJpZM4SBbm0 .

maciekrb commented 6 years ago

Hey, we patched the problem up. Please download the latest MOS release and re-run your application. If that doesn't work for some reason, please follow the provided steps to get a working installation:

  1. Start with a fresh Raspbian (stretch) and add MATRIX debian repo and keys
$ curl https://apt.matrix.one/doc/apt-key.gpg | sudo apt-key add -
$ echo "deb https://apt.matrix.one/raspbian $(lsb_release -sc) main" | sudo tee /etc/apt/sources.list.d/matrixlabs.list
  1. APT update
$ sudo apt-get update
  1. Install latest version of MATRIX MALOS & git
sudo apt-get install git matrixio-malos malos-eye
  1. Install node n package manager and install nodeJS 7
$ curl -L https://git.io/n-install | bash
$ source ~.bashrc
$ n 7
  1. Download the latest release of MOS we just created v0.17.1 release, code was already in the repo but the release was missing. Extract and install node modules.
$ wget https://github.com/matrix-io/matrix-os/archive/v0.17.1.tar.gz
$ tar -xzvf v0.17.1.tar.gz
$ cd matrix-os-0.17.1
$ npm install 
  1. Try to run with your existing MATRIX_DEVICE_ID and MATRIX_DEVICE_SECRET.
$ MATRIX_DEVICE_ID=<redacted> MATRIX_DEVICE_SECRET=<redacted> node index.js
  1. Start your face application

MOS process shouldn't break anymore and should provide face info.

jaapmurre commented 6 years ago

Hi Maciek,

Thanks for the install info and for getting back so fast!!!

I got the faceTest from examples working, though in your list of steps, I first had to uninstall nodeJS before being able to install the new one.

I could not, however, get this one to work: https://github.com/matrix-io/matrix-examples/blob/master/demographicTest: demographics is empty, {}, and the leds stay red no matter what.

Also, the gestures apps worked before the new install (palm, fist) but no longer do. I guess some things in api version 0.17 have changed and have not yet made it into the examples and docs?

Cheers,

 -- Jaap

On Tue, Feb 13, 2018 at 6:39 PM, Maciek Ruckgaber notifications@github.com wrote:

Hey, we patched the problem up. Please download the latest MOS release and re-run your application. If that doesn't work for some reason, please follow the provided steps to get a working installation:

  1. Start with a fresh Raspbian (stretch) and add MATRIX debian repo and keys

$ curl https://apt.matrix.one/doc/apt-key.gpg | sudo apt-key add - $ echo "deb https://apt.matrix.one/raspbian $(lsb_release -sc) main" | sudo tee /etc/apt/sources.list.d/matrixlabs.list

  1. APT update

$ sudo apt-get update

  1. Install latest version of MATRIX MALOS & git

sudo apt-get install git matrixio-malos malos-eye

  1. Install node n package manager and install nodeJS 7

$ curl -L https://git.io/n-install | bash $ source ~.bashrc $ n 7

  1. Download the latest release of MOS https://github.com/matrix-io/matrix-os/releases we just created v0.17.1 release https://github.com/matrix-io/matrix-os/archive/v0.17.1.tar.gz, code was already in the repo but the release was missing. Extract and install node modules.

$ wget https://github.com/matrix-io/matrix-os/archive/v0.17.1.tar.gz $ tar -xzvf v0.17.1.tar.gz $ cd matrix-os-0.17.1 $ npm install

  1. Try to run with your existing MATRIX_DEVICE_ID and MATRIX_DEVICE_SECRET.

$ MATRIX_DEVICE_ID= MATRIX_DEVICE_SECRET= node index.js

  1. Start your face application

MOS process shouldn't break anymore and should provide a face information.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/matrix-io/matrix-os/issues/104#issuecomment-365344418, or mute the thread https://github.com/notifications/unsubscribe-auth/AAdJucLkdO3PwCum7tqQZI_L9ZHu4GGkks5tUcjogaJpZM4SBbm0 .

gordinh commented 6 years ago

Hi @jaapmurre can you please check again regarding the empty demographics? I just merged a fix about so it should be working if you do a pull in dev branch. About the gesture can you check it again? it should be detecting normally too

jaapmurre commented 6 years ago

Hi Lucas,

Yes, I pulled the latest dev version and rebuild node: gestures and demographics are working now.

Thanks!

 -- Jaap

On Fri, Feb 23, 2018 at 2:14 PM, Lucas Morais notifications@github.com wrote:

Hi @jaapmurre https://github.com/jaapmurre can you please check again regarding the empty demographics? I just merged a fix about so it should be working if you do a pull in dev branch. About the gesture can you check it again? it should be detecting normally too

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/matrix-io/matrix-os/issues/104#issuecomment-368005722, or mute the thread https://github.com/notifications/unsubscribe-auth/AAdJucOffcJQPlVcIhtE00aK2zY4rqdLks5tXrmcgaJpZM4SBbm0 .

gordinh commented 6 years ago

Hi @jaapmurre,

Happy to hear that :)

Closing it, Thanks.