问题
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.
回答1:
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 orpebble 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.
回答2:
I have had the same experience.
I usually kill and restart the pebble app on my phone and then I also do refresh the browser. Sometimes you have to log out of and then log back into Cloudpebble.
来源:https://stackoverflow.com/questions/26746475/pebble-js-watchapp-displays-disconnected-run-the-pebble-phone-app