question

HugoGallardo-6069 avatar image
0 Votes"
HugoGallardo-6069 asked RobCaplan edited

Xamarin iOS app crashes on startup after updating to iOS 14.6

Hi, my app has a login and then a home page with donwloads lists from API.

After upgrading the iOS to 14.6 version it never starts. With earlier version it does.

And also I'm getting a warning that the Xamarin.ios is not found.

We upgraded everything up to date so we can compile with the latest versions.


Error: System.NullReferenceException
Mensaje = Object reference not set to an instance of an object

Method Main.cs On IOS package

using System;
using System.Collections.Generic;
using System.Linq;

using Foundation;
using UIKit;

namespace SOS.iOS
{
public class Application
{
// This is the main entry point of the application.
static void Main(string[] args)

     {
         // if you want to use a different Application Delegate class from "AppDelegate"
         // you can specify it here.
         UIApplication.Main(args, null, "AppDelegate");
     }
 }

}


My stacktrace goes as follows:

  •      $exception    {System.NullReferenceException: Object reference not set to an instance of an object
    
  •      base    {System.SystemException}    System.SystemException
    
  •      base    {System.Exception}    System.Exception
    
  •      Data    {System.Collections.ListDictionaryInternal}    System.Collections.ListDictionaryInternal
         Count    0    int
         IsFixedSize    false    bool
         IsReadOnly    false    bool
         IsSynchronized    false    bool
    
  •      Keys    {System.Collections.ListDictionaryInternal.NodeKeyValueCollection}    System.Collections.ListDictionaryInternal.NodeKeyValueCollection
         Count    0    int
         IsSynchronized    false    bool
    
  •      SyncRoot    {object}    object
    
  •      Non-public members        
    
  •      IEnumerator        
         SyncRoot    {object}    object
    
  •      Values    {System.Collections.ListDictionaryInternal.NodeKeyValueCollection}    System.Collections.ListDictionaryInternal.NodeKeyValueCollection
         Count    0    int
         IsSynchronized    false    bool
    
  •      SyncRoot    {object}    object
    
  •      Non-public members        
    
  •      IEnumerator        
    
  •      Non-public members        
    
  •      IEnumerator        
         HResult    -2147467261    int
         InnerException    (null)    System.Exception
         Message    "Object reference not set to an instance of an object"    string
         Source    "mscorlib"    string
         StackTrace    "  at SOS.View.Landing.Home.LoadOrden () [0x00106] in <07085e5ebd574a3ebe24784d2332353a>:0 \n  at Syst…"    string
    
  •      Static members        
    
  •      Non-public members        
         _COMPlusExceptionCode    -532462766    int
    
  •      s_EDILock    {object}    object
    
  •      Non-public members        
         _HResult    -2147467261    int
         _className    "System.NullReferenceException"    string
    
  •      _data    {System.Collections.ListDictionaryInternal}    System.Collections.ListDictionaryInternal
         _dynamicMethods    (null)    object
         _helpURL    (null)    string
         _innerException    (null)    System.Exception
         _message    "Object reference not set to an instance of an object"    string
         _remoteStackIndex    0    int
         _remoteStackTraceString    (null)    string
    
  •      _safeSerializationManager    {System.Runtime.Serialization.SafeSerializationManager}    System.Runtime.Serialization.SafeSerializationManager
         _source    "mscorlib"    string
    
  •      _stackTrace    {System.IntPtr[21]}    System.IntPtr[]
         _stackTraceString    (null)    string
    
  •      captured_traces    {System.Diagnostics.StackTrace[1]}    System.Diagnostics.StackTrace[]
         caught_in_unmanaged    0    int
         native_trace_ips    (null)    System.IntPtr[]
    

Advertencia Debugging symbol file for '/Users/MezcalTeam/Library/Caches/Xamarin/mtbs/builds/SOS.iOS/cae444b42975878605001bc50213d52b2b0d52fb4a5adc92030be99e420cbf67/obj/iPhone/Debug/device-builds/iphone10.6-14.6/mtouch-cache/1-Link/Xamarin.Forms.Core.dll' does not match the assembly and is ignored. SOS.iOS

Advertencia MSB3245 No se pudo resolver esta referencia. No se encuentra el ensamblado "Xamarin.iOS". Compruebe si el ensamblado existe en el disco. Si el código necesita esta referencia, podrían producirse errores de compilación. SOS C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets 2202

Gravedad Código Descripción Proyecto Archivo Línea Estado suprimido
Advertencia Xamarin.Forms recommends TargetPlatformVersion >= 10.0.17763.0 (current project is -1) SOS C:\Users\hugog.nuget\packages\xamarin.forms\4.6.0.726\buildTransitive\Xamarin.Forms.targets 233


dotnet-xamarin
· 3
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

@HugoGallardo-6069 Since this is an English forum, please post the error info in English.

0 Votes 0 ·

I have the same problem with my app. I guess it is caused by a fact that Xamarin.iOS 14.20.0.3 does not suport iOS 14.6 yet.

0 Votes 0 ·

Hi,

Did you get any solution for this. I am facing the same after updating to 14.6.

0 Votes 0 ·

1 Answer

MathiasHartner-7258 avatar image
0 Votes"
MathiasHartner-7258 answered MathiasHartner-7258 edited

Same problem here: Even with Xamarin.iOS 14.20.0.10 our apps DO NOT run on iOS 14.6 on a physical device!!!
Simulator runs fine but it is stuck to iOS 14.5.

On iOS 14.5.1 we had no problem at all...

EDIT: A "Hello World" Xamarin.Forms Shell app is working so I guess it has to do with a third party library or maybe a custom renderer. Not sure about this.
I try digging into it and keep you guys posted.

EDIT2: It is a linker problem when building your Xamarin iOS app from a windows machine running VS 2019 version 16.10.x.
I had no problems with VS 2019 version 16.8.6 in the meantime there were changes in the Xamarin.iOS packages which are causing these issues.

EDIT 3: The solution is to disable incremental builds! Microsoft broke that since VS 16.10.x. Just disable it within iOS project settings and you can debug again.
See xamarin-ios-app-crashing-with-error-dyld-library-not-loaded-mapped-file-has-no on stackoverflow.

 Exception Type:  EXC_CRASH (SIGABRT)
 Exception Codes: 0x0000000000000000, 0x0000000000000000
 Exception Note:  EXC_CORPSE_NOTIFY
 Termination Description: DYLD, Library not loaded: @rpath/libCompany.AppName.iOS.exe.dylib | Referenced from: /private/var/containers/Bundle/Application/906C4A47-857B-4E0E-96F8-E46791C3A037/Company.AppName.iOS.app/Company.AppName.iOS | Reason: no suitable image found.  Did find: | /private/var/containers/Bundle/Application/906C4A47-857B-4E0E-96F8-E46791C3A037/Company.AppName.iOS.app/libCompany.AppName.iOS.exe.dylib: code signature in (/private/var/containers/Bundle/Application/906C4A47-857B-4E0E-96F8-E46791C3A037/Company.AppName.iOS.app/libCompany.AppName.iOS.exe.dylib) not valid for use in process using Library Validation: mapped file has no cdhash, completely unsigned? Code has to be at least ad-hoc signed. | /private/var/containers/Bundle/Application/906C4A47-857B-4E0E-96F8-E46791C3A037/Company.AppName.iOS.app/libCompany.AppName.iOS.exe.dylib: stat() failed with errno=1


· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi, yes I fixed it!

I had to go to the Azure SSL certificate and resign it, like the picture.

It's a new compliance by both Apple and Android111451-img12323233.png


0 Votes 0 ·
img12323233.png (39.7 KiB)