ibm-mobilefirstworklight-server

IBM Worklight 6.1 [ Received bad token from client]


After installing the application from the store, the error below is shown on server logs and I getting an unexpected error from worklight.js as WL.DeviceAuth.saveCertificate failed.

DeviceAuthent E com.worklight.core.auth.ext.DeviceAuthenticator checkTokenString FWLSE4007E: Received bad token from client. Server token:'fgak243l7r2ulo2k7mnv63ea57', client token:'8396shihvo3h6r3d3h4om53ba8'

In fact, this error is shown only the first time I open the application, then every thing seems Ok. I wonder if the cause is from AppAuthenticity which is disabled from WL console.

I am using Worklight 6.1.0.02.20141216-0421 and on initOptions.js connectOnStartup is set as true.

Any idea about this issue ?


Solution

  • I solve this issue by changing connectOnStartup property to false, then I tried to call WL.Client.connect() at a later stage in order to connect to the Worklight server.