CloudPebble PebbleJS Emulator hanging - pebble-sdk

I'm trying to emulate an app that works on my pebble, using PebbleJS. When I install it on the emulator, it hangs on "Preparing to install app…"
I can't see any logs to see where or why it hung.

Try a different browser,refreshing browser or clicking on the cog and selecting shut down and then installing on emulator, Try to use "console.log()" as much as you can to see how far your code goes before it hangs

Related

Shut down JVM when Firebase emulator closes

firebase-tools is an NPM package that uses the JVM. It includes an emulators:start command which fires up the JVM, and it has the JVM use some ports (defined in settings) for the emulators' input/output.
I use MacOS. I use a VSCode terminal to start/end the emulators, and define the details of how to start using an NPM script. Like this:
npm run build && firebase emulators:start --only functions,auth,firestore,database --import ./db-temp
In other words, run the build script, then start some emulator services.
So when running the emulators, I:
Open a terminal,
Navigate to the folder containing the script
Run the script (npm run serve)
This gives me a convenient place to get feedback from the emulators for things like errors, network activity, etc.
If I close VSCode using VSCode's X button, everything in VSCode is immediately shut down. When the terminal is closed, the JVM doesn't detect this and quit: it keeps running. Then when I open VSCode and try running my script again, it tells me that the port normally used by the emulators is still open, because the JVM didn't shut down properly. So I have to track down the JVM process, Force Quit it, and then everything works fine.
To shut the emulators down properly, I have to go to the terminal process running the emulators, press ALT+C to close the process, and then close VSCode. This extra step is inconvenient, and easily forgotten.
Can I convince the JVM to shut down when its originating process terminates via a configuration option? I looked through the configuration options on my local machine via java and java -x, and didn't see anything promising, but I am sure that there are people who know much more about Java than I do.
The Firebase emulator has an environment variable available for Java configuration.
I would be open to other options if available: telling VSCode to automatically shut down terminals properly before exiting, for example.
Or must this be handled by firebase-tools itself, perhaps via a ShutdownHook?
After a little conversation with Firebase and some troubleshooting, I learned a few things:
This issue only occurs when running firebase emulators:start --only firestore,database: when they run together, the Firestore process never closes. Start either one by itself and everything closes fine. This leads me to suspect that this is a bug.
This is reproducible outside VSCode, leading me to suspect that the issue has nothing to do with VSCode.
I filed https://github.com/firebase/firebase-tools/issues/4657. We'll see how it turns out.

Expo: "Something went wrong" immediately on start

I have used Expo a few times successfully before, but for a few days now, I am unable to get into the Expo App. Whenever I open it, I see the Expo icon for a few seconds up to even minutes, and then it redirects me to the blue "Something went wrong" screen, as if I had tried to open an app.
But I didn't! It doesn't even let me scan a QR code, it just always shows this error. If I click the back button in the app, it simply terminates. I have ensured that it is the latest version and already reinstalled it once.
It seems like it somehow had locked itself onto an old, now non-existant server, and kept at it after reinstalling the app. Here is how I solved the problem:
In the metro bundler, choose connection type "Tunnel" and copy and send the URL to your phone. If you then click on it on your phone, it should redirect to the expo app. After that it got unstuck and I could finally use it normally with the QR code again!
The tools sometimes do get locked into this state.
Close and restart all components (Expo cli, browser tabs and clients) making sure to:
Kill any stray processes on the server (you need to check Activity Monitor / Process Explorer or similar depending on your platform)
Force quit all client devices and simulators using the correct method for each platform. To verify that the client process has actually been killed, check that the app splash screen is displayed for a short while when invoking it.
Clear the Expo cache when starting again: $ expo start --clear
I ran into the same issue. Solved it by going to the left sidebar in the Metro Bundler and sending a link via email!
I've tried many of the solutions and only one worked for me (which i found trying random things). I already had 'allow display over other apps' turned on (Android/OnePlus 6t) and didn't think it had anything to do with that. But I tried this...
Close the Expo app, go the the app settings and turn off 'allow display over other apps', open the expo app and [when prompted] turn on 'allow display over other apps' again.
That seems to work in my case - at least until the next time.

Why can't I run my WatchOS 2 app?

It runs just fine on the iPhone. When I select the Watch App Target, however, it simply won't run on the watch.
I don't get any errors or anything. I can see the app downloading on the Watch sometimes; when it does download, it deletes itself the moment the download is complete.
I've tried uninstalling the watch app and reinstalling via the Apple Watch app on the iPhone, and the same thing happens: it downloads and deletes itself before I can run it.
I've also reset the watch, reset Xcode, deleted the iOS app, and just about everything else I could possibly think off, but I'm starting to lose my mind.
The problem started happening when I (attempted to) set up the Watch Connectivity framework. I don't know if this is related. I've been unable to verify that WC is working properly as I can't open the app.
I've been lucky enough to get it to actually load on the watch only a few times since integrating WC framework, but even when I have, all I got was the loading screen for about a minute each time.
UPDATE:
I'm now seeing some consistent behavior.
I'm now able to debug my app by launching the watch app via Xcode. The app icon does not appear at all on the watch when this happens, however. (Weirdly enough, it shows the launch screen for a different watch app when launching.) So I can't run the app at all unless it is launched from Xcode.
Also, I am not able to download the app to the watch via the phone. I want to be able to run it outside of debug mode, and I can't. When I attempt to install it from the Apple Watch iOS9 app, the install begins, I see the icon on the watch as it downloads, and just as it finishes, it deletes itself from the watch before I can run it. This just keeps happening.
Please help!
Make sure your Apple Watch device ID is in your provisioning profile.
So, this kind of sucks as an answer, but I've had enough.
I decided to copy all of my code and storyboards into a new Xcode project. The Watch App now works exactly as it should. Hopefully Apple sorts out these bugs in an update.
I believe repairing the watch would help as well. I had the same problem before and the only thing which helped was repairing the watch.
I also have other issues debugging the watch app properly - see my question here Proper way to debug watchos2 app in XCode7

Why is iOS Simulator not running?

When I try to run my program, iOS Simulator goes black and displays this error:
Unable to boot the iOS Simulator.
When I click OK, Xcode shows this error:
Unable to run app in Simulator. An error was encountered while running (Domain = NSMachErrorDomain, Code = -300)
How I can I make it run again?
You probably are running two different instances of the iOS Simulator.
Clean the project. (CMD+SHIFT+K)
Quit Xcode.
Quit all instances of iOS Simulator.
Restart the computer.
Log in.
Make sure no instances of iOS Simulator are running (I had a wrong version set to Open At Login)
Run your project, and let Xcode open the right Simulator.
If you've recently updated XCODE and possibly have more than one installation you may need to specify which XCode is being used via the command line.
sudo xcode-select -s /Applications/Xcode6-Beta4.app/Contents/Developer/
Just Reset Content and Settings worked for me. Also clean the project once and build.

How do I completely exit a Flex 4.6 Air mobile Android app?

Ive been trying to add a button to properly exit an Android app, built using Flex 4.6. I have used the command NativeApplication.nativeApplication.exit(); which seems to work on the emulator, and kills off the emulator.
When I run it on a device, it doesnt exit, it actually seems to go to start of the app (my login screen) which is kinda strange.
I hypothesise that something system-wide is holding the app in process or re-starting it. Anyone had any experience with this?
That code should work. I use it in my android flex app with no problem. The application quits correctly and I am dropped back at the home screen. What version of Android are you using? I was using 2.3 when I did this. If you have it running in debug mode, do you see any errors output to the console? Using the debugger will also allow you to see if it is not quitting properly or restarting on quit(you would see the splash screen again if this was the case)

Resources