smstuebe / xamarin-fingerprint

Xamarin and MvvMCross plugin for authenticate a user via fingerprint sensor
Microsoft Public License
490 stars 115 forks source link

The "XamlCTask" task failed unexpectedly #69

Closed nielscup closed 6 years ago

nielscup commented 7 years ago

Steps to reproduce

  1. Download code from github

  2. Open project in VS Mac (v7.1 build 1258)

  3. Restore packges

  4. (Re)Build

Expected behavior

Build succeeded

Actual behavior

Build error:

Error MSB4018: The "XamlCTask" task failed unexpectedly.
System.IO.FileNotFoundException: Could not find file "/Users/ncu/Downloads/xamarin-fingerprint-master/src/Sample/SMS.Fingerprint.Sample/obj/Debug/SMS.Fingerprint.Sample.dll.mdb".
File name: '/Users/ncu/Downloads/xamarin-fingerprint-master/src/Sample/SMS.Fingerprint.Sample/obj/Debug/SMS.Fingerprint.Sample.dll.mdb'

Is this an error in the project or is this a bug in Xamarin? I've seen this bug before and was able to fix it by upgrading Xamarin.Forms packages, however I am unable to fix it in this project. Ps. The reason I need to test the project is because I have seen the plugin not working on iOS 11 (preview), so I would like to debug it.

Crashlog

Server stack trace: 
  at System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, System.Int32 bufferSize, System.Boolean anonymous, System.IO.FileOptions options) [0x00293] in /private/tmp/source-mono-2017-04/bockbuild-2017-04/profiles/mono-mac-xamarin/build-root/mono-x64/mcs/class/corlib/System.IO/FileStream.cs:282 
  at System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, System.Int32 bufferSize, System.Boolean isAsync, System.Boolean anonymous) [0x00000] in /private/tmp/source-mono-2017-04/bockbuild-2017-04/profiles/mono-mac-xamarin/build-root/mono-x64/mcs/class/corlib/System.IO/FileStream.cs:149 
  at System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access) [0x00000] in /private/tmp/source-mono-2017-04/bockbuild-2017-04/profiles/mono-mac-xamarin/build-root/mono-x64/mcs/class/corlib/System.IO/FileStream.cs:86 
  at (wrapper remoting-invoke-with-check) System.IO.FileStream:.ctor (string,System.IO.FileMode,System.IO.FileAccess)
  at Mono.CompilerServices.SymbolWriter.MonoSymbolFile.ReadSymbolFile (System.String mdbFilename) [0x00000] in <f812160bc1d54955ae9692ed601b6f12>:0 
  at Mono.CompilerServices.SymbolWriter.MonoSymbolFile.ReadSymbolFile (System.String mdbFilename, System.Guid assemblyGuid) [0x00000] in <f812160bc1d54955ae9692ed601b6f12>:0 
  at Mono.Cecil.Mdb.MdbReaderProvider.GetSymbolReader (Mono.Cecil.ModuleDefinition module, System.String fileName) [0x00012] in <f812160bc1d54955ae9692ed601b6f12>:0 
  at Mono.Cecil.ModuleReader.ReadSymbols (Mono.Cecil.ModuleDefinition module, Mono.Cecil.ReaderParameters parameters) [0x00032] in <d4dd94f3e5f74095b62543e88f18941d>:0 
  at Mono.Cecil.ModuleReader.CreateModuleFrom (Mono.Cecil.PE.Image image, Mono.Cecil.ReaderParameters parameters) [0x00042] in <d4dd94f3e5f74095b62543e88f18941d>:0 
  at Mono.Cecil.ModuleDefinition.ReadModule (System.IO.Stream stream, Mono.Cecil.ReaderParameters parameters) [0x00028] in <d4dd94f3e5f74095b62543e88f18941d>:0 
  at Mono.Cecil.ModuleDefinition.ReadModule (System.String fileName, Mono.Cecil.ReaderParameters parameters) [0x0000a] in <d4dd94f3e5f74095b62543e88f18941d>:0 
  at Mono.Cecil.AssemblyDefinition.ReadAssembly (System.String fileName, Mono.Cecil.ReaderParameters parameters) [0x00000] in <d4dd94f3e5f74095b62543e88f18941d>:0 
  at Xamarin.Forms.Build.Tasks.XamlCTask.Compile () [0x001ca] in <1eeee30f2b6d417892034c6c5a6de832>:0 
  at Xamarin.Forms.Build.Tasks.XamlCTask.Execute () [0x00007] in <1eeee30f2b6d417892034c6c5a6de832>:0 
  at (wrapper xdomain-dispatch) Xamarin.Forms.Build.Tasks.XamlCTask:Execute (object,byte[]&,byte[]&)

Exception rethrown at [0]: 
  at (wrapper xdomain-invoke) Xamarin.Forms.Build.Tasks.XamlCTask:Execute ()
  at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute () [0x00023] in /private/tmp/source-mono-2017-04/bockbuild-2017-04/profiles/mono-mac-xamarin/build-root/msbuild-15.3/src/Build/BackEnd/TaskExecutionHost/TaskExecutionHost.cs:631 
  at Microsoft.Build.BackEnd.TaskBuilder+<ExecuteInstantiatedTask>d__26.MoveNext () [0x00249] in /private/tmp/source-mono-2017-04/bockbuild-2017-04/profiles/mono-mac-xamarin/build-root/msbuild-15.3/src/Build/BackEnd/Components/RequestBuilder/TaskBuilder.cs:787  (MSB4018) (SMS.Fingerprint.Sample)

Configuration

Version of the Plugin: latest (download zip via github)

Platform: VS Mac (v7.1 build 1258)

Device: MacBook Pro

smsissuechecker commented 7 years ago

Hi @nielscup,

I'm the friendly issue checker. Thanks for using the issue template :star2: I appreciate it very much. I'm sure, the maintainers of this repository will answer, soon.

smstuebe commented 7 years ago

Updated to a preview buid of xamarin.forms and switched the sample to the new project format. I don't get the build error anymore. You?

nielscup commented 7 years ago

Yes it works now, thanks a lot! I will have a look at your changes so I can learn from it 👍

One more thing: I noticed that on iOS 11 (preview) the "Authenticate" button does not work anymore, it returns "UI service connection invalidated" error. But the "Authenticate localized" does work. The reason is because the CancelTitle seems to required in iOS 11. Should I log a new issue for this?

smstuebe commented 7 years ago

https://developer.apple.com/documentation/localauthentication/lacontext?changes=latest_minor

Doesn't state that this is required. We can leave the Issue open and have a look at it when iOS 11 is stable.

nielscup commented 7 years ago

Good idea.

smstuebe commented 6 years ago

Looks like it is working as expected with stable iOS 11.