matrix-io / matrix-os

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

update of issue#85: sevice undefined when start face detection app from matrix OS #86

Closed arllllll10 closed 7 years ago

arllllll10 commented 7 years ago

same thing happens again even I update the matrix-os to the latest version (v0.14.1) (this issue is related to issue #85) ==== Application buildindetection started! ==== (buildindetection) Matrix OS Application Library Loading...

(buildindetection) service> undefined

(buildindetection)err invalid service declared. No configuration available for face

Stopping buildindetection (buildindetection)err /home/pi/matrix-os/apps/buildindetection.matrix/app.js:1 (function (exports, require, module, filename, dirname) { matrix.service('face').start().then(function(data){ ^

TypeError: Cannot read property 'start' of undefined at Object. (/home/pi/matrix-os/apps/buildindetection.matrix/app.js:1:85) at Module._compile (module.js:556:32) at Object.Module._extensions..js (module.js:565:10) at Module.load (module.js:473:32) at tryModuleLoad (module.js:432:12) at Function.Module._load (module.js:424:3) at Module.require (module.js:483:17) at require (internal/module.js:20:19) at Object. (/home/pi/matrix-os/apps/buildindetection.matrix/index.js:7:1) at Module._compile (module.js:556:32)

Stopping buildindetection App IPC Disconnect buildindetection Event Listeners Removed buildindetection VES Instances yet not halted on app stop hb: sen> [] svc> []

eighteyes commented 7 years ago

Seems like your configuration file is invalid.

(buildindetection)err invalid service declared. No configuration available for face

Make sure

services:
   faceService: 
      engine:detection
      type: face

is in your config.yaml

arllllll10 commented 7 years ago

I'm pretty sure my code is as the same as online tutorial:

config.yaml:

# do not touch this line
configVersion: 2

description: light a led when detect a face
keywords: 'light, face'
name: face-demo
displayName: Face Demo

services:
    faceDemo:
        engine: detection
        types: face

app.js:

matrix.service('face').start().then(function(data)
{ 
    console.log(data); 
});

and my os version is 0.14.1, I really cannot figure out why my app does not working, need help!!! Thanks.

eighteyes commented 7 years ago

types should be type in the last line of the config. I will try to track down that error in our tutorial.

If it still doesn't work try the below.

Please start matrix-os with DEBUG=* node index.js and paste us all the output after 2 lines above the MATRIX ascii. This will help us diagnose.

eighteyes commented 7 years ago

Yea, I can't find types anywhere. Can you point me to where you found that tutorial so I can get it fixed? Thanks.

arllllll10 commented 7 years ago

I'm so sorry that just my typo, now my face application works. Thanks so much for helping me, and next time I'll try the debug mode.