xamarin / GoogleApisForiOSComponents

MIT License
225 stars 161 forks source link

ddyl: Library not loaded #390

Open mwiszomirski opened 4 years ago

mwiszomirski commented 4 years ago

I run my Xamarin ios application on simulator, and it runs perfectly fine. However when I try to run it on my own device (iPhone 6s) it crushes at the start. I tried multiple things and seen similar issues but nothing helped so far. This is an output in the console:

Application 'com.appsbymarcin.Choosy' terminated.
dyld: Library not loaded: @rpath/FirebaseDatabase.framework/FirebaseDatabase
  Referenced from: /private/var/containers/Bundle/Application/BB31469B-4AA1-49CF-A735-00EE08792BFA/Test.app/Test
  Reason: no suitable image found.  Did find:
    /private/var/containers/Bundle/Application/BB31469B-4AA1-49CF-A735-00EE08792BFA/Test.app/Frameworks/FirebaseDatabase.framework/FirebaseDatabase: code signature invalid for '/private/var/containers/Bundle/Application/BB31469B-4AA1-49CF-A735-00EE08792BFA/Test.app/Frameworks/FirebaseDatabase.framework/FirebaseDatabase'

    /private/var/containers/Bundle/Application/BB31469B-4AA1-49CF-A735-00EE08792BFA/Test.app/Frameworks/FirebaseDatabase.framework/FirebaseDatabase: stat() failed with errno=1

Information about my packages:

Screen Shot 2020-04-08 at 3 10 47 PM
SotoiGhost commented 4 years ago

@mwiszomirski Can you upgrade to most recent version and try again? Please, remove bin and obj folders and XBD cache. Thanks in advance!

ghost commented 4 years ago

I have the same problem with Xamarin.Firebase.iOS.Auth package. Simulator works fine, but the application crashes when is launched on a real device:

Exception Type: EXC_CRASH (SIGABRT) Exception Codes: 0x0000000000000000, 0x0000000000000000 Exception Note: EXC_CORPSE_NOTIFY Termination Description: DYLD, Library not loaded: @rpath/FirebaseAuth.framework/FirebaseAuth | Referenced from: /private/var/containers/Bundle/Application/45456E1A-565C-477A-A33E-4B4014954965/test.app/test | Reason: no suitable image found. Did find: | /private/var/containers/Bundle/Application/45456E1A-565C-477A-A33E-4B4014954965/test.app/Frameworks/FirebaseAuth.framework/FirebaseAuth: code signature invalid for '/private/var/containers/Bundle/Application/45456E1A-565C-477A-A33E-4B4014954965/test.app/Frameworks/FirebaseAuth.framework/FirebaseAuth' | /private/var/containers/Bundle/Application/45456E1A-565C-477A-A33E-4B4014954965/test.app/Frameworks/FirebaseAuth.framework/FirebaseAuth: stat() failed with errno=1

Machine info: Xcode Version 11.4.1 (11E503a) Visual Studio Community 2019 for Mac (Preview) Version 8.6 Preview (8.6 build 4274) Mono 6.10.0.101 Xamarin.iOS Version: 13.18.1.31 (Visual Studio Community) Operating System Mac OS X 10.15.4

Installed packages: Xamarin.Firebase.iOS.Auth 6.5.1 Xamarin.Firebase.iOS.Core 6.6.6

The only code that calls firebase auth library is var authResult = await Auth.DefaultInstance.SignInAnonymouslyAsync();

SotoiGhost commented 4 years ago

@Castaneda1914 Can you share a test case, please? Thanks in advance! I have just tested our sample and everything seems to be working ok.

ghost commented 4 years ago

@SotoiGhost My test case is pretty simple - launch VS for Mac, create new iOS single view application, add the last version (right now it is 6.5.1) of Xamarin.Firebase.iOS.Auth package and add code

var authResult = await Firebase.Auth.DefaultInstance.SignInAnonymouslyAsync();

to ViewController's ViewDidLoad method. That's all.

chrisfoulds commented 4 years ago

I have been experiencing this with firebase and other libraries since 8.6 VS and associated mono upgrades. A full clean and rebuild and it works, change one line of code and build again and a bunch of libraries such as firebase are suddenly not part of the .app package