Search code examples
pebble-watchpebble-js

Pebble.js WatchApp displays: "Disconnected - run the pebble phone app"


I can't find much documentation around this issue. All other running apps on my pebble have a connection to my phone, and work as expected. However, a Pebble.js application I'm currently working on simply displays Disconnected - run the pebble phone app.

I have noticed that in my Developer Settings that the Connection Manager is listed as Disconnected. Is this part of the problem? I see nothing in the logs.

For reference, the application is doing a simple ajax request and displaying the result.


Solution

  • This message is often caused by the JavaScript crashing on the phone (undefined reference, unknown function, etc) and so the watch thinks it is not running.

    Some ideas to debug this:

    • Replace your code with one very simple console.log("hello world") statement and see if this works.
    • Look at the Logs (View Logs button in CloudPebble or pebble logs on the command line).
    • Very rarely, on Android, I have seen situation where the Pebble app is in a bad state where it cannot execute the JS for only one app. When this happens, you need to force-kill the Pebble app and relaunch it.