Skip to content
This repository has been archived by the owner on May 3, 2019. It is now read-only.

face detection app generate error on OS when use "matrix start" from CLI #85

Closed
arllllll10 opened this issue May 18, 2017 · 7 comments
Closed

Comments

@arllllll10
Copy link

I follow the instruction online to run the simple face detection application:
https://www.youtube.com/watch?v=8jkWwum8O8Q
and I also take a look at post #80.
right now my config.yaml is

services:
Buildindetection:
engine: detection
type: face

and the app.js is simply
matrix.service('face').start.then(function(data){ console.log(data); });

but I still get the error message from matrix os:

==== 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
Uncaught exception: TypeError: Cannot convert undefined or null to object
at ChildProcess. (/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) TypeError: Cannot convert undefined or null to object
at ChildProcess. (/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)
UNKNOWN ERROR! TypeError: Cannot convert undefined or null to object
at ChildProcess. (/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...

What's more, I install the malos and malos_eye on my Pi and run the example code successfully, so I've no idea about how to fix this issue, any suggestions?

@gordinh
Copy link
Contributor

gordinh commented May 18, 2017

Hi @arleneF on matrix.service('face').start.then(function(data){ console.log(data); });, start is a function, so should be start()

@arllllll10
Copy link
Author

Thanks for replying. @gordinh
Even I changed start to start(), similar thing happens:
(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
Uncaught exception: TypeError: Cannot convert undefined or null to object
at ChildProcess. (/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) TypeError: Cannot convert undefined or null to object
at ChildProcess. (/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)
UNKNOWN ERROR! TypeError: Cannot convert undefined or null to object
at ChildProcess. (/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...

@gordinh
Copy link
Contributor

gordinh commented May 18, 2017

Are you using the latest MOS version? Also show me your app.js and config.yaml

@arllllll10
Copy link
Author

I think it is the latest one, I download it four days ago, and also do sudo apt-get update && sudo apt-get upgrade today.
Here's my app.js:

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

and config.yaml:

# do not touch this line
configVersion: 2

name: buildindetection
description: follow the online isntruction
keywords: detection
displayName: Buildindetection

services:
	Buildindetection:
		engine: detection
		type: face

@gordinh
Copy link
Contributor

gordinh commented May 18, 2017

Ok @arleneF i've just tested here and as you can see below there's nothing wrong on it. Please check if you are using 0.14.1 version:

 |\/| |__|  |  |__/ |  \/   [o__o]
 |  | |  |  |  |  \ | _/\_  v0.14.1
==== Application Test- started! ==== 
(Test-) Matrix OS Application Library Loading...

(Test-) service> { engine: 'detection', type: 'face' }

(Test-) matrix.service:: face : detection > face

(Test-) setup service listener
Matrix App Host Ready!

(Test-) APP>SERVICE> { type: 'container-ready', app: 'Test-', pid: 8250 }

@arllllll10
Copy link
Author

oh I found my OS version is v0.14.0, so I have to re-install it again? since I did update and upgrade several times and the version keeps the same.

@gordinh
Copy link
Contributor

gordinh commented May 19, 2017

You can just use git pull to update the repo.

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

No branches or pull requests

2 participants