Invalid Token during Matrix Register Device

When I try to register the device (on my Mac Book Pro) I get an invalid token error:

var token = Matrix.config.user.token

When I print the Matrix Log I see this error on the top:

Matrix CLI Error: TypeError: Cannot read property ‘token’ of undefined
at token (/usr/local/lib/node_modules/matrix-cli/bin/matrix-validate.js:23:33)

Any help, guidance or direction will be appreciated.



@terrylarge You haven’t fully respected the MC Setup

On your calling device (MacBook Pro in your case) you need to source your .envrc file
In english you need to load (source) your device ID and Crypted Key (.envrc = EnvironementReleaseCandidate - the “.” before means it will be a hidden file)

  • 1 - In a file called .envrc past your device ID & CK like this :
    export MATRIX_DEVICE_ID=your-device-id export MATRIX_DEVICE_SECRET=your-crypted-key
  • 2 - In the console :
    $ source .envrc

And it should be fine