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

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.

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.

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.

Related

Chromecast sender app from Chrome on Android failing

I'm building a Cast app with a chrome sender and custom HTML/CSS/JS receiver. While it works correctly from desktop chrome, I've noticed that I can't connect via the Android Chrome app.
With Android, when clicking the Cast button and selecting the correct receiver device in the Popup, nothing happens (my listener for SESSION_STATE_CHANGE is not called). After clicking the button again, my session listener says:
{type: "sessionstatechanged",
session: null,
sessionState: "SESSION_START_FAILED",
errorCode: "invalid_parameter"}
At first, I thought my setup was incorrect, but after looking at the official chrome sender app and following the same steps as above, I noticed a similar problem with a different error code:
Request session failure:
{"code":"invalid_parameter",
"description":"Already requesting session",
"details":null}
In the above case the visual indicator starts it's 'active' state on first click, but there's no change/activity otherwise it just stays in that state.
This was working before, so I know this is a relatively new issue (at least since Feb, possibly sooner). I also know since it's working on desktop, there's nothing wrong with the setup per se -- but it's still failing for Android.
Any help or feedback here would be great, thank you!
Okay, after updating my Android phone (missed an update this morning) it seems to be fixed.
EDIT:
Turns out, it was due to the restart. So as a patch, restarting your mobile device will reset your Chrome and allow it to send correctly.

Create Android OAUTH client fails with: "An unexpected error occurred. Please try again later. (4800001)"

So I am trying to setup Google Play Games Services in the Google Play Developer Console.
This worked for me yesterday.
Today however, when setting up another app, and trying to link an android app to the games services, I get this error:
An unexpected error occurred. Please try again later. (4800001)
I got this in:
Google Play Developer Console -> Games Services -> [game] -> Linked Apps -> STEP 2 Authorize your app.
This happens regardless which key I try, my release key, or my debug key.
I don't understand why this would be happening, as it was working yesterday, albeit for an app without real-time multi player. The app I am trying to setup now needs real-time multiplayer, but I'm not sure whether this difference is the cause of it. Maybe servers at google are down?
I get the error each time I try, regardless which browser I use, or which OS. I tried on Ubuntu Firefox and OSX Safari.
This was a temporary breakage in the Google Play Developer Console.
They fixed it today, by rolling back changes to the console, see:
https://github.com/playgameservices/android-basic-samples/issues/153#issuecomment-134749998
I opened https://console.developers.google.com/ page and successfully registered my app there while I was having same issue as you.

My windows phone application runs when ran though visual studio (onclick of device button) but when I disconnect and run it doesn't?

I have written file picker code in my project. When i run the project in my windows phone by clicking on device button in visual studio, the app runs fine(I mean it opens pictures library and i can select a photo and preview it).
But when I disconnect my usb and then open the app in the phone and when i open pictures library on click of a button , the pictures library opens briefly and then the app crashes immediately(My app closes).
Can anyone please help me with this??
As written in the blog post , the AndContinue method run in a different process and to do so, the current running app goes into the background or even gets closed sometimes, that is what you are experiencing in your app as far i can tell but not sure why different things happening during debug & deploy.
There must be a callback inside app.xaml.cs specifically to handle the condition when calling application(which was sent into background) comes in foreground, read this blog post carefully & you'll understand as what you need to change in your code :
using-the-andcontinue-methods-in-windows-phone
http://blogs.msdn.com/b/wsdevsol/archive/2014/05/08/using-the-andcontinue-methods-in-windows-phone-silverlight-8-1-apps.aspx
I just dealt with this issue and one of the reasons why there are differences between debug and deploy is because of the suspending event.
During debug, the application does not actually get suspended until you manually do it through Lifecycle Events. This means that when you pick a file on debug and the app is put to the background to load the file picker, it is not actually suspended, while when the app is deployed, it actually gets suspended.
Look into your app_resuming method and OnSuspending methods in your app.xaml that may be causing errors not occurring during debug.

App approved, but crashes

I have made a Windows Phone app (for WP7.1) that uses BackgroundAudio for streaming, nothing too complicated. It was approved and made available for download in the store. However it no longer works, i.e. the app worked in debug+release when run from VS2012, and I assume the .xap I uploaded worked since microsoft approved it (they rejected it once and I was able to reproduce and fix the bugs they reported).
When downloaded the app simply bails on load on WP8 (lumia 820) i.e. flips back to the tiles immediately.
On WP7 (lumia 800) but the playbutton ignores input, however it downloads and displays the playlist, so some kind of functionality+network connection works.
I have tried the basics: installing using the application-deployment tool (app working), running the "Store Test Kit" which reports some slowdowns in the UI animations, but nothing serious (I hope).
Any ideas how to reproduce ".xap approved and downloaded from store but not working" or getting debug info from the phone without VS? Or any other things i can try out?
Every time your app crashes it will be logged and reported on your Windows Phone Dev Center Account. Just go in there and export the details to excel. Get the stack trace and put it in here. Maybe we can help.
The very first thing i can tell you is the opening page has some exceptions and that too it doesn't go well with some phones. Seriously there are concerns when a wp7 app is ported on wp8 device and vice-verse. To the extent of my knowledge there might be some binding issues. make sure you got the binding class to be public. And just as #AMR mentioned go the dev center and export the stacktrace. Try resolving them. Moreover if an app get certifies, it doesn't mean it is completely error free. The tests are limited to very coomon errors only.

WP7 app won't launch from app list

I have a simple Windows Phone 7 application which is working perfectly when started from Visual Studio. However, if I deactivate the app (press Windows button or back button from the application's MainPage) and then click the app's icon to relaunch, the screen will flash and return to the list/home screen. I assumed this was an issue with the emulator but when I got a developer device I have the same issue.
Note that reactivating without a complete tombstone works (pressing Windows button from the app and then back).
I have no idea what causes this or how to proceed with debugging. Hopefully someone else has experienced this and knows a fix.
Turns out there is a bug, i found the solution here http://forums.create.msdn.com/forums/p/67522/416995.aspx
In short, it turns out that the Microsoft.Xna.Framework.Media.MediaLibrary class (which I am using to display pictures on applications main page) is not properly initialized when the user has not opened a media hub prior to you calling it. So picture collection properties are null or empty. The solution is to add a call to MediaPlayer.Queue.ToString(), it will force the initialization of the native media library allowing you to invoke the MediaLibrary later on.
Sounds like an unhandled error on startup is causing the app to crash.
Trap/log/handle/display any unhandled exceptions. Also check what you're doing on startup.
IF you are saving something (to Isolated Storage) after first run and then opening it on subsequent launches then that's where I'd look first.
If it works when launched from Visual Studio then this will probably be due to the way you are rebuilding/redeploying the app before launching it in that case.

Resources