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

久未见 提交于 2020-01-02 09:09:10

问题


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 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.



回答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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!