I recently developed an android app in Visual Studio with Xamarin and I'm able to open the app when downloading the release apk to my phone, but once I uploaded it to the google play store and try to download it and then open it crashes. And the crash log displays this error below:
java.lang.RuntimeException:
at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1410)
Caused by: java.lang.reflect.InvocationTargetException:
at java.lang.reflect.Method.invoke (Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run (ZygoteInit.java:1520)
at md5d38b484f2053706449e9bb7e84aa7c74.HomeFragment.n_onCreateView (Native Method)
at md5d38b484f2053706449e9bb7e84aa7c74.HomeFragment.onCreateView (HomeFragment.java:38)
at android.app.Fragment.performCreateView (Fragment.java:2352)
at android.app.FragmentManagerImpl.moveToState (FragmentManager.java:995)
at android.app.FragmentManagerImpl.moveToState (FragmentManager.java:1171)
at android.app.BackStackRecord.run (BackStackRecord.java:815)
at android.app.FragmentManagerImpl.execPendingActions (FragmentManager.java:1582)
at android.app.FragmentManagerImpl$1.run (FragmentManager.java:483)
at android.os.Handler.handleCallback (Handler.java:751)
at android.os.Handler.dispatchMessage (Handler.java:95)
at android.os.Looper.loop (Looper.java:154)
at android.app.ActivityThread.main (ActivityThread.java:6682)
What am I doing wrong? Is there a way to get a more verbose crash log?
The OnCreateView that the log is referencing is trying to get access to a PCL that has functions for hitting a remote api to get data from. Could this be the issue? The PCL is referenced via dll in the android app's project but is there something else I needed to do?
UPDATE
I'm seeing tons of responses related to this stating that is a bug with Xamarin but I'm not understanding exactly code-wise what I need to do to fix it.
Related
I use the FirebasePushNotificationsPlugin in my Xamarin Forms project (4.7) to have the push notifications in my project.
I updated to the latest version (3.3.10) but now I get this error on Android (working on iOS):
**Java.Lang.IllegalStateException:** 'Default FirebaseApp is not initialized
in this process com.companyname.firebasetest.
Make sure to call FirebaseApp.initializeApp(Context) first.'
I found some solutions that does not work for me:
My google-services.json has the GoogleServicesJson build action
My firebase android app package name is the same package name on my Android project.
I tried to update android's tools
Also tried to add this line:
FirebaseApp app = FirebaseApp.InitializeApp(Android.App.Application.Context);
PS:
I created a new project (and new firebase project) but I get the same error
I pulled the sample of the FirebasePushNotification Plugin, and still getting the error
Notifications was working with version 2.3.x
What can I do ? I need help
Thx guys
Whenever I try to sign into Xbox Live on my Unity game (using creators program Unity plugin), both on UWP PC and Xbox One, the game throws an exception:
Exception thrown at 0x00007FFAEF0AA899 in Boulder Falls.exe: Microsoft C++ exception: Platform::COMException ^ at memory location 0x000000E51B6FEC20. HRESULT:0x803E0110 The application does not have the cloud notification capability.
WinRT information: The application does not have the cloud notification capability.
Stack trace:
>[External Code]
The program '[5896] Boulder Falls.exe' has exited with code 0 (0x0).]
I am using the included prefab to sign in, and I do have developer mode enabled on both the PC and the Xbox, they are all in the correct sandbox, XboxServices.config has XboxLiveCreatorsTitle set to true, and the account I am using is in the test account list. Is there any solution to this?
Edit:
If I try to continue past the exception, it throws another one:
Exception thrown at 0x00007FFA7F1BA839 in Boulder Falls.exe: Microsoft C++ exception: Platform::AccessDeniedException ^ at memory location 0x000000D2BA3FE740. HRESULT:0x80070005 Access is denied.
WinRT information: A network capability is required to access this network resource occurred
I fixed it, I just rebuilt the program in a new folder from Unity, and compiled it from Visual Studio 2017 instead of 2019.
We ran into this issue, too. For us it turned out to be setting the "InternetClient" capability in the Unity PlayerSettings. However, even after checking that, we had to delete the existing build folder because Unity wouldn't update the existing files with the new capability. For reference, there's a quick mention of setting the capability (step 10):
https://learn.microsoft.com/en-us/gaming/xbox-live/get-started/setup-ide/managed-partners/unity-win10/live-partner-unity-uwp-il2cpp
I am implementing push notifications within an application using the Azure Messaging component from Xamarin - iOS only.
I have been able to successfully build, deploy to a device, and test
locally.
The component is installed using the Nuget package for the component.
However, when I check the changes into source control and try to
build on our build server
I receive the following error message:
MTOUCH: error MT1304: The embedded framework
'WindowsAzureMessaging.framework' in
/Users/Clinician/TeamCity/buildAgent/work/b535d319c25da2ee/Frameworks
/packages/Xamarin.Azure.NotificationHubs.iOS.1.2.5.2/lib/Xamarin.iOS10/Xamarin.Azure.NotificationHubs.iOS.dll
is invalid: it does not contain an Info.plist.
I haven't been able to find a lot of information about the MT1304 error.
Has anyone else encountered this or have any suggestions on how to resolve?
I have now had an error with VS2013 and WP8.1 silverlight for a couple of days.
I get a couple of different errors, ..Ensure unlocked screen.., AgHost.exe could not be launched, port is in use by another program and ensure the device is unlocked.
These errors came suddenly after I retarged the solution. I have no compiling errors.
Solution Attempts
Restart PC
Restart program
unregister and reregister the phone
reinstall Update 3
reinstall VS2013
Windows Phone 8 Application crash once its launched AgHost.exe' has exited with code -532265403
Install VS2015 with no luck.
reinstall VS2013 Update 4
Nothing worked. The error is also the same for emulator as well as different devices. I can however get the release mode installed. Break points can be used when using release mode, but I have to Clean, Rebuild and then deploy for every time I want to deploy the application. Further the deploy time has gone up exponentially. Before upgrading I used a maximum of 10 seconds. Now it is above a minute in wait time. :/
Anyone has a solution for this ?
Extra
If I run the solution before upgrade on device or Emulator It spins up with debugger. If then go to the updated WP81, I get a popup with info Something is taking longer then normal and then it crashes with ..Ensure unlocked screen.. :/
Could it be an issue with the differen SDKS?
During a repair of all the SDKs, I found an issue with the event log, which I cleared based on The Event Log File is full
Still no success.
Extra
I cannot spin up the emulator from VS2013, when using the WP8.1 solution, but the wp8.0 solution in the same VS works :S
I found an error in a log file, from:
The errors are:
[0F08:14A8][2015-07-23T09:11:44]: Applying execute package: silverlight5_DRT, action: Repair, path: C:\ProgramData\Package Cache\DEB5078B60B74431E2830831EB48DF129CB32932\packages\Silverlight\5.0_DRT\Silverlight_Developer.exe, arguments: '"C:\ProgramData\Package Cache\DEB5078B60B74431E2830831EB48DF129CB32932\packages\Silverlight\5.0_DRT\Silverlight_Developer.exe" /q /ignorewarnings'
[0F08:14A8][2015-07-23T09:11:45]: Error 0x800705de: Process returned error: 0x5de
[0F08:14A8][2015-07-23T09:11:45]: Error 0x800705de: Failed to execute EXE package.
[0550:0E74][2015-07-23T09:11:45]: Error 0x800705de: Failed to configure per-machine EXE package.
[0550:0E74][2015-07-23T09:11:45]: MUX: Installation size in bytes for package: silverlight5_DRT MaxAppDrive: 0 MaxSysDrive: 0 AppDrive: 0 SysDrive: 0
AND
[0F08:14A8][2015-07-23T09:16:16]: Applying execute package:
{312d9252-c71c-4c84-b171-f4ad46e22098}, action: Repair, path:
C:\ProgramData\Package
Cache{312d9252-c71c-4c84-b171-f4ad46e22098}\VS2012.4.exe, arguments:
'"C:\ProgramData\Package
Cache{312d9252-c71c-4c84-b171-f4ad46e22098}\VS2012.4.exe" -repair
-quiet -burn.related.patch' [0F08:14A8][2015-07-23T09:16:23]: Error 0x80048bc7: Process returned error: 0x80048bc7
[0F08:14A8][2015-07-23T09:16:23]: Error 0x80048bc7: Failed to execute
EXE package. [0550:0E74][2015-07-23T09:16:23]: Error 0x80048bc7:
Failed to configure per-machine EXE package.
Anybody knows what to do with this? The error is coming when I repair Windows Phone SDK 8.0
There was a post-VS2013 update for the Windows Phone 8.1 SDK, some odds that you don't have it installed since you did not need it before. The download location is here.
Getting error messages like "port is in use" when there's no obvious reason why it should be in use and seeing excessive download times is also a very strong selector for your installed anti-malware product getting in the way. No specific advice on how to configure it when we don't know what it might be. You definitely first want to try to temporarily disable it so you can identify it as the source of the problem.
I have no Idea of what is the issue, but creating a new solution and importing the existing projects into a new solution has solved all the issues regarding emulator and debugger an AgHost.
Seems like the upgrade function integrated in the solution did not work properly.
I'm getting the below error when I try to run the app certification test on my windows 8.1 app. I've looked around for a while and can't seem to find any solutions for this. The app is written in C#/xaml which I wasn't aware even had a linker.
I'm hoping that someone can guide me in the right direction on how I should start to investigate an error like this as web searches have thus far failed me
Binary analyzer
•Error Found: The binary analyzer test detected the following errors:
◦File [MyTabletApplication.exe] has failed the AppContainerCheck check.
•Impact if not fixed: If the app doesn’t use the available Windows protections, it can increase the vulnerability of the customer's computer to malware.
•How to fix: Apply the required linker options - SAFESEH, DYNAMICBASE, NXCOMPAT, and APPCONTAINER - when you link the app. See links below for more information:
If you are using Visual Studio 2015 and this is a new solution/project make sure the 'Compile with .NET Native tool chain' check box is cleared in the startup project properties in the Release configuration.