Closed krazazian closed 3 months ago
Could you please provide a sample project that demonstrates this issue?
I've the same problem here, i'm using .NET8.0 with the following dependencies.
<ItemGroup>
<PackageReference Include="CommunityToolkit.Maui" Version="7.0.0" />
<PackageReference Include="CommunityToolkit.Mvvm" Version="8.2.2" />
<PackageReference Include="MetroLog.Maui" Version="2.1.0" />
<PackageReference Include="MetroLog.Net6" Version="2.1.0" />
<PackageReference Include="Plugin.Firebase.Auth" Version="2.0.5" />
<PackageReference Include="Plugin.Firebase.CloudMessaging" Version="2.0.4" />
<PackageReference Include="Plugin.Firebase.Crashlytics" Version="2.0.1" />
<PackageReference Include="Plugin.LocalNotification" Version="10.1.8" />
<PackageReference Include="Shiny.Hosting.Maui" Version="3.1.2" />
<PackageReference Include="Shiny.Jobs" Version="3.1.2" />
<PackageReference Include="Shiny.Locations" Version="3.1.2" />
<PackageReference Include="Shiny.Notifications" Version="3.1.2" />
<PackageReference Include="sqlite-net-pcl" Version="1.8.116" />
<PackageReference Include="SQLitePCLRaw.bundle_green" Version="2.1.6" />
<PackageReference Include="System.IdentityModel.Tokens.Jwt" Version="7.0.3" />
<PackageReference Include="Prism.DryIoc.Maui" Version="9.0.271-pre" />
<PackageReference Include="Xamarin.Build.Download" Version="0.11.4" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'net8.0-android'">
<PackageReference Include="Xamarin.AndroidX.Core" Version="1.12.0.2" />
<PackageReference Include="Xamarin.AndroidX.Collection" Version="1.3.0.1" />
<PackageReference Include="Xamarin.AndroidX.Collection.Ktx" Version="1.3.0.1" />
<PackageReference Include="Xamarin.AndroidX.Activity.Ktx" Version="1.8.0.1" />
<PackageReference Include="Xamarin.AndroidX.Browser" Version="1.6.0.2" />
</ItemGroup>
And if I uncomment one of these 2 lines it crashes with a null exception on Current object.
@TobiasBuchholz - basically the same thing that @Gius95 has mentioned above
@TobiasBuchholz - I have the same issue as mentioned above. Are there any news about this issue? CorssFirebaseCrashlytics is always NULL in my case ...
Probably I'm encountering the same problem. I have uploaded a simple sample project. https://github.com/iida-i3/FirebaseExperiment
It's not possible for CrossFirebaseCrashlytics.Current to return null.
Please call CrossFirebase.Initialize()
during WillFinishLaunching
as shown in the basic setup instructions
The exception that I encountered was not CrossFirebaseCrashlytics.Current is null, but seemed to be happening in the following code
Plugin.Firebase.Crashlytics.FirebaseCrashlyticsImplementation.SetCrashlyticsCollectionEnabled(Boolean enabled)
INFO: 2024-06-12 11:04:12.511 FirebaseExperiment.iOS[592:70161] Object reference not set to an instance of an object.
INFO: 2024-06-12 11:04:16.769 FirebaseExperiment.iOS[592:70161] at FirebaseExperiment.iOS.AppDelegate.FinishedLaunching(UIApplication application, NSDictionary launchOptions) in C:\work\FirebaseExperiment\FirebaseExperiment\FirebaseExperiment.iOS\AppDelegate.cs:line 22
INFO: 2024-06-12 11:04:16.769 FirebaseExperiment.iOS[592:70161] at Plugin.Firebase.Crashlytics.FirebaseCrashlyticsImplementation.SetCrashlyticsCollectionEnabled(Boolean enabled)
As basic setup, moved the process to WillFinishLaunching and to be no problem.
I updated my sample project. it's not as basic setup, but worked, I'm not sure why.
Lots of strangeness, but I was able to try it anyway. Thanks for the reply.
(P.S.) I was able to try, but still have problem. Specifically, I used version 3.0.0, but it only shows xamarin_find_protocol_wrapper_type. I will continue to look into other Issues, etc. Stacktrace:
Crashed: tid_103
0 libsystem_kernel.dylib 0xc42c __pthread_kill + 8
1 libsystem_pthread.dylib 0x7c0c pthread_kill + 268
2 libsystem_c.dylib 0x75ba0 abort + 180
3 FirebaseExperiment.iOS 0x1537030 xamarin_find_protocol_wrapper_type + 1201 (runtime.m:1201)
4 FirebaseExperiment.iOS 0x1731744 mono_invoke_unhandled_exception_hook + 1263 (exception.c:1263)
5 FirebaseExperiment.iOS 0x17d158c mono_jit_exec + 1375 (driver.c:1375)
6 FirebaseExperiment.iOS 0x153f58c xamarin_main + 495 (monotouch-main.m:495)
7 FirebaseExperiment.iOS 0x1839f14 main + 202 (main.arm64.mm:202)
8 ??? 0x1c31c1e4c (シンボルが不足しています)
I've set up my project correctly based on the setup documentation, but I'm always getting an object null reference exception on the CrossFirebaseCrashlytics.Current.SetCrashlyticsCollectionEnabled(true); call. Am I missing something in the setup for iOS?
` builder.ConfigureLifecycleEvents(events => {
if IOS
else`