I have an electron app I develop on MacOS and build for Windows. I can properly install the .exe that's generated from electron-builder on to Windows.
When I run the app on Windows, I get a spinning loader for 1-2 sec. and then nothing happens. The app, when running properly, shows an icon in the task bar and opens a browser window for the user to login.
I'm using electron-log, but nothing is printed to the logs. It seems like the app is dying before it can start. I'm looking through Event Viewer and don't see anything obvious. I feel like I'm missing something and don't have a great way to understand what's happening.
Any suggestions on where to look on Windows 10 to understand why an electron app isn't doing anything?
Related
I've got a MacOS app, written in Python, using Tkinter, and built into a MyAppName.app bundle with pyinstaller.
When I run open -a MyAppName in terminal, everything works, great.
When I run /path/to/app/dist/MyAppName.app/Contents/MacOS/main, it works and I see terminal output. Great!
However, when I double-click on MyAppName.app, it bounces around in the icon tray a bit then disappears. If I change the app to just open a message box, it works, so I know it's something about the app itself that's wrong.
How can I debug this? Is there some way I can see the logs from the app after opening it in finder, so I can find out what is crashing?
I recently upgraded some Firebase packages in my iOS Xamarin app, and now the thing refuses to work. The app opens (shows a splash screen) and immediately closes without producing an error.
While I want to fix the package problem, I have no clue where to start. I set a breakpoint on the App.xaml.cs constructor, but this never gets hit when I run the iOS version. So my next idea was to read the output like I do on Android.
I've been Googling around for a few hours, and everyone seems to say 'Go to Debug > Open System Log...', but this is absolutely rubbish! The system log seems to show everything except for my app running... (E.g. I run the app in the simulator, reload the system logs, and the freshest thing is from 10 minutes ago...)
I'm at my wits end here. Does anyone know a trick for viewing my app output in the simulator? Even just an exit code would be useful 😥
You could view the logs in these locations:
Mac – ~/Library/Logs/Xamarin/Simulator.Server
Windows – %LOCALAPPDATA%\Xamarin\Logs\Xamarin.Simulator
So I'm trying to track down an issue that crops up when I'm NOT debugging with Xcode on the Apple watch, and I've discovered that the Apple Watch has some serious problems with console output if it wasn't launched via the debugger. Given the following code:
- (IBAction)onPrint:(id)sender
{
NSLog(#"############## Printing! ##################");
printf("************** Printf! ******************\n");
}
When launching via the debugger, it shows both lines in Xcode's console window. Great, no problems there.
If, however, I launch the watch app manually (from the watch itself), I get nothing in the console log via the devices window in Xcode, and nothing in the Console app on the mac (other than the normal "kernel[0] : prevent idle sleep list" messages the watch emits to the console from time to time).
I also tried connecting to the watch extension process using the Debug -> Attach to Process menu in Xcode, but it still won't print anything. Clear console, reload console... nothing works. I've looked all over SO for answers, and tried everything marked as an accepted answer or not, but nothing seems to work. This app is as simple as it can get: A single button that executes the code above to print to the console.
Is it just broken? Or is there some other arcane magic I must weave? I'm running Xcode 8.1 and WatchOS 3.1 on an Apple Watch 2.
It looks like this is just a limitation of WatchOS. The only way I've been able to get data back is by storing logs in a file and then fetching the file later.
Thing that can help you is called sysanalyse: you'll have to add special profile to both iPhone and Watch, and this will allow to see your app's logs in Console and via sysanalyse reports. Instructions and profiles are provided here.
If you are debugging background tasks, important to know: watchos's daemon will not terminate process what had already used it's background execution time limit if it is connected to debugger.
This is really odd because I was able to see log statements on the console. It's just now, I'm not. This is for Watch OS 6, xcode 11.2.1.
I have been searching all around for a way to check which app did launch my cocoa app.
It seems I cannot use NSWorkspaceDidDectivateApplicationNotification because it starts tracking after the app was launched. Do someone know how to do this? The app in question is a status bar app, not sure if that makes any difference.
I'm rewriting my watch app to work in watchos2 but have problems debugging on the actual watch (XCode7). What is the correct way how to do this?
1) Obvious (but naive) approach - connect your phone with paired watch, in XCode select Extension scheme to run on Phone + Watch. Click play and it should work, right? This seems to work only just after fresh pairing and breaks very quickly (after few debug runs). See issues and behaviour below
2) Run phone app first then add run of extension - this approach worked for me longer but eventually broke as well.
3) Unpair and pair again - more than painful experience, time consuming and not practical at all. Will help for a while though.
Main problems:
phone app not communicating - I've seen not reachable or messages just time out
watch app stops running - XCode is saying it's running but it's not - won't even attach. If I run it manually on watch most of the times it will attach but then the phone app is not reachable
watch app won't even install - I suspect when the XCode is saying it's running it in fact it doesn't because when I remove the app from watch and then run XCode goes through the whole install process and "running" but the icon doesn't even appear on the main screen
phone stops reacting when I use option 2) and try to run something else while app is attached
phone seems to be blocked, selecting other apps (even going back to my app) won't work until I kill the session
Setup: The phone and watch is paired correctly, phone can see watch, watch can see phone, other apps are working. Watch "trusts" the computer as well, app is "shown on apple watch". Phone is 5s 9.0.1.
I've tried various restart combinations (phone|watch|xcode|mac), shuffled cables, disconnect, reconnect, etc. but that didn't help either.
Did anybody find a usable way how to debug watchos2 app from XCode? Nobody else seems to be complaining about this with released XCode7 though I've seen lots of similar issues in beta builds.
Use Apple watch recharging cable, connect your watch to developing Mac that runs Xcode.
It provides much more successful and fast debugging.
I have been dealing with the same issue this last days, I just updated to iOS 9.2, watchOS 2.1 and XCode 7.2, and now everything works.
After update XCode to 7.2, iOS9.2 my phone and WatchOS2.1 my Apple Watch the debug process is better. I suggest to update all your devices.