Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1.5+ Breaks using Sentry 3.31 or higher #137

Closed
tibuprophen opened this issue May 12, 2023 · 6 comments
Closed

1.5+ Breaks using Sentry 3.31 or higher #137

tibuprophen opened this issue May 12, 2023 · 6 comments
Labels
Platform: Xamarin question Further information is requested

Comments

@tibuprophen
Copy link

tibuprophen commented May 12, 2023

Environment

  • MacOS 13.3.1 (a) (22E772610a)
  • Xamarin Forms 5.0.0.2578

Steps to Reproduce

(I'm using Rider, but the setup should be very similar to VS)

  1. New Solution Xamarin Application (Cross Platform, Xamarin.Forms, .NET Standard, API 31)
  2. Add Sentry.Xamarin.Forms 1.5.1 to all 3 Projects
  3. Update the default Sentry Package to 3.31 or higher
  4. Build App (with Release configuration)

Note: Using Sentry.Xamarin.Forms 1.4.6 will work with Sentry 3.31 or higher

Expected Result

No Errors

Actual Result

  Xamarin.Android.Legacy.targets(649, 5): [XALNK7000] Mono.Linker.MarkException: Error processing method: 'System.Void Xamarin.Forms.Platform.Android.ShellSearchView/ClipDrawableWrapper::.ctor(Android.Graphics.Drawables.Drawable)' in assembly: 'Xamarin.Forms.Platform.Android.dll' ---> Mono.Cecil.ResolutionException: Failed to resolve AndroidX.AppCompat.Graphics.Drawable.DrawableWrapper
  at Mono.Linker.Steps.MarkStep.HandleUnresolvedType (Mono.Cecil.TypeReference reference) [0x00013] in <68c6268fbc45467eab046a8db2d5d932>:0 
  at Mono.Linker.Steps.MarkStep.MarkType (Mono.Cecil.TypeReference reference) [0x0002c] in <68c6268fbc45467eab046a8db2d5d932>:0 
  at MonoDroid.Tuner.MonoDroidMarkStep.MarkType (Mono.Cecil.TypeReference reference) [0x00000] in <68c6268fbc45467eab046a8db2d5d932>:0 
  at Mono.Linker.Steps.MarkStep.MarkType (Mono.Cecil.TypeReference reference) [0x00060] in <68c6268fbc45467eab046a8db2d5d932>:0 
  at MonoDroid.Tuner.MonoDroidMarkStep.MarkType (Mono.Cecil.TypeReference reference) [0x00000] in <68c6268fbc45467eab046a8db2d5d932>:0 
  at Mono.Linker.Steps.MarkStep.ProcessMethod (Mono.Cecil.MethodDefinition method) [0x0001e] in <68c6268fbc45467eab046a8db2d5d932>:0 
  at Mono.Linker.Steps.MarkStep.ProcessQueue () [0x0001b] in <68c6268fbc45467eab046a8db2d5d932>:0 
   --- End of inner exception stack trace ---
  at Mono.Linker.Steps.MarkStep.ProcessQueue () [0x00047] in <68c6268fbc45467eab046a8db2d5d932>:0 
  at Mono.Linker.Steps.MarkStep.ProcessPrimaryQueue () [0x0000a] in <68c6268fbc45467eab046a8db2d5d932>:0 
  at Mono.Linker.Steps.MarkStep.Process () [0x000f6] in <68c6268fbc45467eab046a8db2d5d932>:0 
  at Mono.Linker.Steps.MarkStep.Process (Mono.Linker.LinkContext context) [0x0000d] in <68c6268fbc45467eab046a8db2d5d932>:0 
  at MonoDroid.Tuner.MonoDroidMarkStep.Process (Mono.Linker.LinkContext context) [0x0000b] in <68c6268fbc45467eab046a8db2d5d932>:0 
  at Mono.Linker.Pipeline.ProcessStep (Mono.Linker.LinkContext context, Mono.Linker.Steps.IStep step) [0x0000d] in <68c6268fbc45467eab046a8db2d5d932>:0 
  at Mono.Linker.Pipeline.Process (Mono.Linker.LinkContext context) [0x0000f] in <68c6268fbc45467eab046a8db2d5d932>:0 
  at MonoDroid.Tuner.Linker.Run (Mono.Linker.Pipeline pipeline, Mono.Linker.LinkContext context) [0x00000] in <68c6268fbc45467eab046a8db2d5d932>:0 
  at MonoDroid.Tuner.Linker.Process (MonoDroid.Tuner.LinkerOptions options, Mono.Linker.ILogger logger, Mono.Linker.LinkContext& context) [0x00071] in <68c6268fbc45467eab046a8db2d5d932>:0 
  at Xamarin.Android.Tasks.LinkAssemblies.Execute (Java.Interop.Tools.Cecil.DirectoryAssemblyResolver res) [0x0018f] in <68c6268fbc45467eab046a8db2d5d932>:0 
  at Xamarin.Android.Tasks.LinkAssemblies.RunTask () [0x0001b] in <68c6268fbc45467eab046a8db2d5d932>:0 
  at Microsoft.Android.Build.Tasks.AndroidTask.Execute () [0x00000] in <ef4d16f91c3a4b36914e1b20639be304>:0 

Thank you for any help and generally your work. Please tell me if you need further information.

@lucas-zimerman
Copy link
Collaborator

lucas-zimerman commented May 22, 2023

Out of curiosity, Does it also break if you remove the Sentry dependency? I noticed another project having issues with those latest packages
for reference: xamarin/Xamarin.Forms#15668

It seems like they introduced a break change with AndroidX packages and Xamarin that was fixed on MonoAndroid 13

@lucas-zimerman lucas-zimerman added the question Further information is requested label May 22, 2023
@tibuprophen
Copy link
Author

Hi
it seems more complex.
When I remove the Sentry dependency:

  • It breaks also on my given steps to reproduce. So it first seems no Sentry related bug, but...
  • I also work on an App which breaks only if I update Sentry fron 1.4.x to 1.5.x. I can't upload the full source code of this.

I'll try to upload an example very soon, where it breaks only by updating.

@tibuprophen
Copy link
Author

Hi
after upgrading and downgrading some dependencies, I found the real cause. In my app I use in another dependency the Sentry default package, with version 3.31.0. This seems not to work in combination with Sentry.Xamarin.Forms 1.5.1. But it is strange that Sentry 3.31.0 works with Sentry.Xamarin.Forms 1.4.6.

So you either need to downgrade Sentry.Xamarin.Forms to 1.4.6 to use the latest Sentry or you need to downgrade Sentry to use the latest Sentry.Xamarin.Forms.

@tibuprophen tibuprophen changed the title 1.5+ Breaks Android Linking with AndroidX 1.5+ Breaks using Sentry 3.31 or higher May 23, 2023
@michaelmairegger
Copy link

The latest working version of Sentry in combination with Sentry.Xamarin is 3.33.0.

So, the solution is to either downgrade Sentry to 3.33.0 or to downgrade Sentry.Xamarin to 1.4.6

@lucas-zimerman
Copy link
Collaborator

Version 1.5.2 was released with support to Sentry 3.33.0. Is this still happening with you?

@tibuprophen
Copy link
Author

Hello,

this Issue can be closed. Meanwhile, we've migrated our App to Maui. Since then the Issue is gone.
Thank you for your Help!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Platform: Xamarin question Further information is requested
Projects
Archived in project
Development

No branches or pull requests

3 participants