I'm having a frustrating issue developing for Windows Phone 8.1 and hoped somebody might have lived through the same thing.
I've had the app running on my phone from a few different deployment packages I created. I recently started deploying directly from VS to my phone when debugging. Everything is working fine. However, when I try to run the app without VS attached, it crashes after the splash screen, with no exception details given. It simply closes.
I've added a handler to the UnhandledException event that will output exception details to a dialog, but this is not displaying anything. The crash only ever occurs when starting the app from the phone.
I reverted to creating a deployment package and deploying that using the tool. However, this version also crashes on start with no message.
Weirder still, I've used one of the deployment packages that had been working fine, and I get the same error: crash, with no message.
I just don't understand this behaviour. Why has an old package that used to work stopped working? I'm using roaming data and considered it might be to do with that, but I really have no other ideas. Please help!
Related
I'm building an app with .NET MAUI Hybrid and I wanted to roll out a new test version of the app on both iOS and Android. All previously test versions have worked just fine but now on Android (works on iOS) an error occurs after the splash screen, the app itself doesn't crash but I get yellow-ish popup that blazor applications gives you when an error has occurred.
I've generated a bug report via settings on the phone but it didn't really tell me much. I did find a small stacktrace but my google attempts were fruitless.
Exceptions thrown (exception_count, class_name):
22 java.lang.IllegalArgumentException
2 java.lang.SecurityException
2 android.os.ParcelableException
I'm unsure if it's my code that's the problem here since it works perfectly whilst debugging on a physical device. I did add Community Toolkit MAUI to the project during this iteration, however currently it's unused on Android, still included in the build but not used.
I have this simple piece of code, adding my application to run when windows start. Works fine.
RegistryKey rk = Registry.CurrentUser.OpenSubKey("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run", true);
rk.SetValue("my_app", Application.ExecutablePath);
Then I package it with a Windows Application Packaging Project, connect it to windows store, choose "Create App Packages.." and get the resulting .appxbundle.
Fine so far. I install it locally. (also installing the generated certificate (.cer) so I can install it at all.)
Once I start the installed app and click a button running the code above, nothing changes in the registry! It does not crash, I have a try..catch around the code. It just silently ignore it.
Running it from visual studio works fine, the registry gets updated.
Actually, all I want is the app to start when windows start, I am not particularly interested in how to achieve that, so any ideas are welcome!
Edit: I forgot to say the most important stuff: It is a Windows Desktop, Windows Forms App. It is not a UWP app, but a window inheriting an ordinary System.Windows.Forms.Form, compiled with x86.
Xavier mentions the StartupTask extension, it's a nuget package but it seems to be used when you have a UWP app.
Actually, all I want is the app to start when windows start, I am not particularly interested in how to achieve that, so any ideas are welcome!
You need to use the windows.startupTask Extension for your packaged UWP app. Please see Start an executable file when users log into Windows. With this extension, you can start your app whenever a user logs on.
Please note: The user has to start your application at least one time to register this startup task.
Our company has a native iOS app that was built in Xamarin/Visual Studio. We originally uploaded it to the App Store a few years ago and have made a few changes to it over the years.
The app itself is very basic. It's basically just a web view that navigates to a Single Page Application. There is very little native app code in the project.
Every week or so I regular launch the native app on our company iPad. Instead of running a version pulled down from the App Store, I periodically rebuild and upload the app from a Mac Mini running Visual Studio and/or debug it directly from the Mac Mini through Visual Studio.
A few days ago I tried launching the native app and after opening it immediately closed. I tried rebooting the iPad but the app still minimizes/closes immediately after opening. If I double-tab the Home button on the iPad, I can see the app still running in the background, but any time I tap on it it immediately minimizes itself.
I tried Cleaning and Rebuilding the native app solution in Visual Studio and re-uploading it to the iPad and that didn't fix it. I updated Visual Studio (and all of its packages) on the Mac Mini, updated XCode, updated Mac OS, updated iOS on the iPad, and nothing resolved the issue.
When I attempt to debug the app from Visual Studio, it shows two error codes in the Output window: MT1043 and MT1007. The debugger always fails to attach to the app as well.
I've tried Googling the error codes and the problem itself and haven't found anything that has worked. I've tried generating a new Development Certificate and Provisioning Profile to use to sign the app when uploading it to the iPad but that didn't work either.
What's strange is that if I download the app off of the App Store it works just fine. The source code that I'm attempting to build/run right now is identical to what it was at the time it was deployed to the app store. What else is strange is that, if I spin up an iOS Emulator and upload/debug against that, the app works just fine.
I tried using a different iPad and it had the same issue. The app minimizes itself immediately after attempting to launch it.
Found the answer. Had to set the system certificate trust from "Always Trust" to "Use System Default". Same solution as provided here: https://stackoverflow.com/a/52506186/9704484
I have a Windows Phone 8.1 application that was just upgraded from Windows Phone 8. When the emulator starts and the app fires up, it immediately crashes to the app list. It doesn't get caught in the debugger at all. Just crashes hard.
The Windows Phone 8 version works fine and I've made sure that the splashscreen.png file is part of the project and is set as content as I've seen elsewhere but I'm at a loss as to what would cause this.
Anyone know what's going on? There's nothing in any logs I can find so I can't provide any further information to assist. Sorry!
Found the Answer: When Visual Studio 2013 Update 4 updated the project, it for some reason cleared the "Startup Object" for the application which caused it to never hit any code which was why this was happening.
Setting this again to the only option fixed the problem. Of course this should compile-time fail with an error but it doesn't, so if you get this issue that's likely why.
I am currently two days into this bug and can't seem to find the cause. I relatively recently installed VS2013 Update 2 RC and started building the Windows Phone 8.1 version of my WinRT app. I have been slowly moving files (mostly Converters/basic resources and pages) over to the Shared project and haven't had too many issues with it.
The Windows Phone 8.1 app builds and runs (though, with some issues that I still need to iron out). My WinRT app, which I haven't changed at all (except for some of its dependencies) aside from moving some things to the Shared project, will not start at all. It throws up "The app didn't start".
So far I've tried slowly moving files back out of the shared project and into the main WinRT project, but still to no avail. My hard drive is not encrypted with TrueCrypt.
One other thing to note is that in the same moves toward Windows Phone 8.1, I also changed my Portable Class Library to target both WP8.1 and Xamarin (iOS and Android).
I haven't been able to get any debug results because any time I start it debugging, it fails with "The app didn't start" error. No exceptions are thrown in the output, even when running the Native/Mixed debuggers. Also, no breakpoints get triggered, even in the App constructor.
I have read that this could be caused by permissions issues. I have checked and double checked all permissions in the prescribed places and registry entries and found no deviations.
One other thing I should note is that this seems to only happen with my application. All other apps seem to run fine.
I figured it out! Based on what I read here, the issue was with a file app.config in my project.
From what I've been able to see, app.config seems to be entirely superfluous. I believe it to be a relic from original Windows 8 applications. I haven't had any issue with it up until now, when it seems Nuget changed the contents of it to reflect some updated app packages.
Excluding this file from the project solved the issue.