matrix-io / matrix-os

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

permission denied for firebase #39

Closed daadu closed 7 years ago

daadu commented 7 years ago
 $ NODE_ENV=rc node index.js
Environment Selected: rc
Loading Core Matrix Files
Loading...  device
Loading...  event
Loading...  service
Dependencies up to date.

Installed Apps: 
Local Apps: clock.matrix, clock2.matrix, gestureTest.matrix
Local / Installed Δ 3
MXSS Connected: http://rc-mxss.admobilize.com
=<[^\/^]>= [d5dee0d22747] ready
[5830c0c68bc14a2000f1e4d2]
 _  _ ____ ___ ____ _ _  _ 
 |\/| |__|  |  |__/ |  \/   [o__o]
 |  | |  |  |  |  \ | _/\_  v0.6.2
FIREBASE WARNING: set at /users/5830c0c68bc14a2000f1e4d2/devices/d5dee0d22747/online failed: permission_denied 
(node:8022) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: PERMISSION_DENIED: Permission denied
(node:8022) DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
daadu commented 7 years ago

i haven't installed matrix-cli on pi.

should i install it on pi and register device on pi instead of another machine?

daadu commented 7 years ago

I am following this: https://matrix-io.github.io/matrix-documentation/#matrix-cli-setup

eighteyes commented 7 years ago

That is a known issue, and will be resolved this week. It won't affect the stability of your device.

eighteyes commented 7 years ago

matrix-cli is intended to be installed on another computer. i suppose you could install it on the pi, i can't see why that wouldn't work, but that isn't what we've been testing.

eighteyes commented 7 years ago

I made a hotfix for that issue. If you go to the matrix-os folder on your pi and issue matrix reinstall matrix-firebase it should resolve it.

daadu commented 7 years ago

I did:

pi@raspberrypi:~/matrix-os $ npm update matrix-firebase
pi@raspberrypi:~/matrix-os $ NODE_ENV=rc node index.js
Environment Selected: rc
Loading Core Matrix Files
Loading...  device
Loading...  event
Loading...  service
Upgrading Dependencies....
Upgrade Done! Please restart MATRIX OS.

I reboot raspi

and then i did:

pi@raspberrypi:~/matrix-os $ source ~/.envrc
pi@raspberrypi:~/matrix-os $ NODE_ENV=rc node index.js
Environment Selected: rc
Loading Core Matrix Files
Loading...  device
Loading...  event
Loading...  service
Dependencies up to date.
Installed Apps: 
Local Apps: clock.matrix, clock2.matrix, gestureTest.matrix
Local / Installed Δ 3
MXSS Connected: http://rc-mxss.admobilize.com
=<[^\/^]>= [d7b18560048f] ready
[5831f4781e709e2000e2452a]
 _  _ ____ ___ ____ _ _  _ 
 |\/| |__|  |  |__/ |  \/   [o__o]
 |  | |  |  |  |  \ | _/\_  v0.6.2
FIREBASE WARNING: set at /users/5831f4781e709e2000e2452a/devices/d7b18560048f/online failed: permission_denied 
(node:1262) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: PERMISSION_DENIED: Permission denied
(node:1262) DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
^CMatrix -- CTRL+C kill detected

the error is still present.

my current version of matrix-firebase is:

pi@raspberrypi:~/matrix-os $ npm list | grep "matrix-firebase"
├─┬ matrix-firebase@1.0.27
daadu commented 7 years ago

problem solved by removing matrix-firebase from node_modules directory and running npm install