Connect mobile client to server

I followed the tutorials in the home page to try to config a server and then the mobile app to connect to the server. After setting up the server, I tried to create an intervention named “sleep1”, set it as “Dashboard enabled”, and the “Dashboard password expression” and “Deepstream client access password” to “123”. I then tried to update the fields in AppConfig.js as:

interventionPattern: 'sleep1',
interventionPassword: '123',

The mobile app can launch but reported that there is no internet connection. After some investigation I found the logs from the deepstream docker container contains the following messages:

AUTH_ATTEMPT | 138.19.191.214: AREQ{"client-version":1,"role":"participant","nickname":"MobileCoach Client User","intervention-pattern":"sleep1","intervention-password":"123"}
AUTH_ERROR | http auth error: Error: socket hang up
INVALID_AUTH_DATA | invalid authentication data
CLIENT_DISCONNECTED | null
INCOMING_CONNECTION | from undefined (138.19.191.214)
AUTH_ATTEMPT | 138.19.191.214: AREQ{"client-version":1,"role":"participant","nickname":"MobileCoach Client User","intervention-pattern":"sleep1","intervention-password":"123"}

May I know what can I do so that the mobile client can connect to the server properly? I guess maybe the intervention was too “blank”?

Thank you for your help.

Thank you for your question.

It is possible that the client connected to deepstream before the tomcat could connect to the deepstream server. Please check if the logs of deepstream looks like below,

Please close the app when you restart the containers using “docker-compose restart”.

Additionally please note that in order to connect, “intervention” should be active in the MC designer. For more details refer to the documentation in https://www.mobile-coach.eu/, video tutorials in https://vimeo.com/user74133231 and/or contact us.