Chated with Diego to troubleshoot getting matrix linked with app.
Hi , how can we help you today?
How can I help you?
I’m having trouble connecting my matrix to the matrix app
What problem is happening?
Can you share with me more information
I can connect the only device, name it, but then it shows it’s offline. I click on the red box, it then says No device found.
on the pi, it shows my phone connecting, then disconnectin.
Device registration failed: Environment mismatch dev
the green box shows after that?
Did you follow the installation steps on our documentation page?
Yes, several times
The ENV variables went successful configured?
How are you running the matrix-os?
I can load the device on PC, I can run node index.js on the pi. The clock app works, the ifttt-weather works. The app on my phone does not connect.
what is your NODE_ENV on the matrix os?
rc or dev?
What is the mobile phone? Android or iOs?
phone is android, tablet is ios
Are you trying in which device?
Ok. Let’s do it with iOS
We need to check the Environment for the Mobile App
Firstly let me ask you something:
Did you login with your account on the iOS app?
Do you can see your MATRIX Device there?
in the iOS App after the login?
I see one, but it may be an old one, I have registered several (on one matrix card)
Please click in the three dots button on the top right of the iOS App
At the bottom You’ll see the version of this app
can you share with me?
2.0.2 build 74 prod
You are using a different environment for the app
We need to change it to rc, to be the same as you matrix device
can you go to the iOS settings?
Go down this page until you see the MATRIX App
Please click there and click again in Environment
and please set: Release Candidate
Go back and close your MATRIX Mobile App
only thing it says is Cellular Data
Let me see it
Please wait a moment
Please wait a bit more
Hey! I have a solution but I’ll have to configure your MATRIX OS and MATRIX CLI again
to match the same environment as the MATRIX App
okay. The first this is create a new env for you
so. In your matrix please run: matrix set env prod
This is for you local machine
please run there: matrix set env prod
prod didn’t work, needed production, done
now you need to create a new account for prod env
create new or loging with old?
please create an account, register a new device, copy the env variables and put in your matrix device.
the env is different. So that account only exists for RC
now you have to create a new one for PROD
Create an envprod file and put your new settings there
we’ll load those new variables with:
Now, we’ll run the MATRIX OS with the new env
NODE_ENV=prod node index.js
sudo is not necessary
After that close you MATRIX iOS App and open again. When you open please logout and login with your prod account
getting an error…
what error? Because of the sudo?
enviroment selected: prod
please replace prod by production
cannot find module’home/pi/matrix-os/config/env/prod.js
NODE_ENV=production node index.js
is working for me.
Looks good for you?
didn’t work that way, does work with sudo, now asking for BLE pairing
is working with sudo because You certainly tried with sudo before. So some files permissions went changed
ok. Is asking BLE pairing because the env variables aren’t working
Let’s do something to check if everything is ok:
It shows same as PC matrix device
and let me know if match with the new env
yes it does
same with secret
Is the same secret as the rc?
prod and rc are the same?
no, id and secret are the new prod ones
Can you share with me how are you running the matrix os?
are you doing: NODE_ENV=production node index.js ?
sudo first, then what u have above
so the MATRIX is blinking blue?
please go to your MATRIX iOS App
and click to add a new device. Let’s do it this time because I don’t know why the prod env is ignoring your new env variables
Tried with new account, does not let me login.
please try the old account
im in on the android
Tried to add matrix to phone app, still get Environment missmatch dev
Please logout from the Android app
at the bottom of the login page can you see the environment?
Hey! Can you be using your MATRIX Device from CLI (with RC env) for while?
I’ll need to report this issue to the Engineering Team.
I’m sorry about that. But I’ll report it to the guys
And a soon as possible this will be fixed
Sounds good, is there a case number ?
I’ll report internally but you can do it the community or in some github repo
I think the Community is better
How will I know when it’s fixed?
Do you want do that? I think is better because maybe another user could be getting the same issue
Anyone else have this issue?