Bug 58840 - Xamarin.Auth - System.ArgumentNullException: Value cannot be null
Summary: Xamarin.Auth - System.ArgumentNullException: Value cannot be null
Status: RESOLVED DUPLICATE of bug 58813
Alias: None
Product: iOS
Classification: Xamarin
Component: Tools ()
Version: XI 10.12 (d15-3)
Hardware: PC Windows
: --- normal
Target Milestone: Untriaged
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2017-08-17 09:13 UTC by Mithosu
Modified: 2017-08-17 18:54 UTC (History)
3 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED DUPLICATE of bug 58813

Description Mithosu 2017-08-17 09:13:31 UTC
When I use "Don't Link" in my Debug - iPhone Simulator configuration, Xamarin.Auth is working and also the examples I found on internet. But when I change it to "Link Framework SDKs Only" I get this error:

Mono.Linker.MarkException: Error processing method: 'System.Void Xamarin.Auth.Account::.ctor(System.String,System.Collections.Generic.IDictionary`2<System.String,System.String>)' in assembly: 'Xamarin.Auth.dll' ---> System.ArgumentNullException: Value cannot be null.
1>  Parameter name: instruction
1>    at Mono.Cecil.Cil.InstructionOffset..ctor (Mono.Cecil.Cil.Instruction instruction) [0x00003] in <311724b4987d46ff81eafbc5bdc70a4e>:0 
1>    at Mono.Cecil.Cil.CodeReader.ReadScope (Mono.Cecil.Cil.ScopeDebugInformation scope) [0x00015] in <311724b4987d46ff81eafbc5bdc70a4e>:0 
1>    at Mono.Cecil.Cil.CodeReader.ReadScopes (Mono.Collections.Generic.Collection`1[T] scopes) [0x0000c] in <311724b4987d46ff81eafbc5bdc70a4e>:0 
1>    at Mono.Cecil.Cil.CodeReader.ReadScope (Mono.Cecil.Cil.ScopeDebugInformation scope) [0x000af] in <311724b4987d46ff81eafbc5bdc70a4e>:0 
1>    at Mono.Cecil.Cil.CodeReader.ReadScopes (Mono.Collections.Generic.Collection`1[T] scopes) [0x0000c] in <311724b4987d46ff81eafbc5bdc70a4e>:0 
1>    at Mono.Cecil.Cil.CodeReader.ReadScope (Mono.Cecil.Cil.ScopeDebugInformation scope) [0x000af] in <311724b4987d46ff81eafbc5bdc70a4e>:0 
1>    at Mono.Cecil.Cil.CodeReader.ReadDebugInfo () [0x0002a] in <311724b4987d46ff81eafbc5bdc70a4e>:0 
1>    at Mono.Cecil.Cil.CodeReader.ReadMethodBody () [0x00091] in <311724b4987d46ff81eafbc5bdc70a4e>:0 
1>    at Mono.Cecil.Cil.CodeReader.ReadMethodBody (Mono.Cecil.MethodDefinition method) [0x00014] in <311724b4987d46ff81eafbc5bdc70a4e>:0 
1>    at Mono.Cecil.MetadataReader.ReadMethodBody (Mono.Cecil.MethodDefinition method) [0x00000] in <311724b4987d46ff81eafbc5bdc70a4e>:0 
1>    at Mono.Cecil.MethodDefinition+<>c.<get_Body>b__41_0 (Mono.Cecil.MethodDefinition method, Mono.Cecil.MetadataReader reader) [0x00000] in <311724b4987d46ff81eafbc5bdc70a4e>:0 
1>    at Mono.Cecil.ModuleDefinition.Read[TItem,TRet] (TRet& variable, TItem item, System.Func`3[T1,T2,TResult] read) [0x00040] in <311724b4987d46ff81eafbc5bdc70a4e>:0 
1>    at Mono.Cecil.MethodDefinition.get_Body () [0x0002c] in <311724b4987d46ff81eafbc5bdc70a4e>:0 
1>    at Mono.Linker.Steps.MarkStep.ProcessMethod (Mono.Cecil.MethodDefinition method) [0x0019c] in /Users/poupou/git/xamarin/xamarin-macios/external/linker/linker/Mono.Linker.Steps/MarkStep.cs:1275 
1>    at Xamarin.Linker.Steps.CoreMarkStep.ProcessMethod (Mono.Cecil.MethodDefinition method) [0x00060] in /Users/poupou/git/xamarin/xamarin-macios/tools/linker/CoreMarkStep.cs:171 
1>    at Mono.Linker.Steps.MarkStep.ProcessQueue () [0x00023] in /Users/poupou/git/xamarin/xamarin-macios/external/linker/linker/Mono.Linker.Steps/MarkStep.cs:165 
1>     --- End of inner exception stack trace ---
1>    at Mono.Linker.Steps.MarkStep.ProcessQueue () [0x00030] in /Users/poupou/git/xamarin/xamarin-macios/external/linker/linker/Mono.Linker.Steps/MarkStep.cs:167 
1>    at Mono.Linker.Steps.MarkStep.Process () [0x00019] in /Users/poupou/git/xamarin/xamarin-macios/external/linker/linker/Mono.Linker.Steps/MarkStep.cs:122 
1>    at Mono.Linker.Steps.MarkStep.Process (Mono.Linker.LinkContext context) [0x0000f] in /Users/poupou/git/xamarin/xamarin-macios/external/linker/linker/Mono.Linker.Steps/MarkStep.cs:67 
1>    at Xamarin.Linker.Steps.MobileMarkStep.Process (Mono.Linker.LinkContext context) [0x00001] in /Users/poupou/git/xamarin/xamarin-macios/tools/linker/MobileMarkStep.cs:36 
1>    at Xamarin.Linker.Steps.CoreMarkStep.Process (Mono.Linker.LinkContext context) [0x00017] in /Users/poupou/git/xamarin/xamarin-macios/tools/linker/CoreMarkStep.cs:26 
1>    at MonoTouch.Tuner.MonoTouchMarkStep.Process (Mono.Linker.LinkContext context) [0x0001d] in /Users/poupou/git/xamarin/xamarin-macios/tools/linker/MonoTouch.Tuner/MonoTouchMarkStep.cs:36 
1>    at Mono.Linker.Pipeline.Process (Mono.Linker.LinkContext context) [0x00023] in /Users/poupou/git/xamarin/xamarin-macios/external/linker/linker/Mono.Linker/Pipeline.cs:128 
1>    at MonoTouch.Tuner.Linker.Process (MonoTouch.Tuner.LinkerOptions options, MonoTouch.Tuner.MonoTouchLinkContext& context, System.Collections.Generic.List`1[Mono.Cecil.AssemblyDefinition]& assemblies) [0x000e0] in /Users/poupou/git/xamarin/xamarin-macios/tools/mtouch/Tuning.cs:82 
1>  ---
Comment 1 Mithosu 2017-08-17 09:19:05 UTC
I use Xmamrin.Auth 1.5.0.3, Visual Studio 2017.
Comment 2 Elias Rincon 2017-08-17 17:55:46 UTC
This start happend to me, after apply the fix fo the bug [58789]

Comment 4 fix from https://bugzilla.xamarin.com/show_bug.cgi?id=58789

Working over:
VS2017 Enterprise 15.3.0 XamarinIOS 10.12.0.14
MacOSX El Capitan XamarinIOS 10.12.0.18
Comment 3 Brendan Zagaeski (Xamarin Team, assistant) 2017-08-17 18:54:32 UTC
Thanks for the report.  I'll mark this as a duplicate for tallying purposes.

From that duplicate report, one possible temporary workaround if your application will allow for it is to downgrade the Xamarin.Auth NuGet package to version 1.3.2.7.

*** This bug has been marked as a duplicate of bug 58813 ***