getsentry / sentry-dotnet

Sentry SDK for .NET
https://docs.sentry.io/platforms/dotnet
MIT License
606 stars 206 forks source link

Fix MAUI CLI integration test #2809

Closed vaind closed 12 months ago

vaind commented 1 year ago

After making Sentry CLI real integration tests (those that use as nuget packages instead of local builds in-repo) in #2781, MAUI test is broken. I've tried all I could think of but just can't get it to work in CI while it works just fine locally (on all three platforms).

For now, I'm disabling the test to unblock the PR (and v4.0.0 subsequently).

See failed test run: https://github.com/getsentry/sentry-dotnet/actions/runs/6798187413/job/18482533901?pr=2781

Using package /home/runner/work/sentry-dotnet/sentry-dotnet/integration-test/../src/Sentry.Android.AssemblyReader/bin/Release/Sentry.Android.AssemblyReader.3.40.1.nupkg - 48875 bytes
Pushing Sentry.Android.AssemblyReader.3.40.1.nupkg to '/home/runner/work/sentry-dotnet/sentry-dotnet/integration-test/packages'...
Your package was pushed.
Using package /home/runner/work/sentry-dotnet/sentry-dotnet/integration-test/../src/Sentry.Bindings.Android/bin/Release/Sentry.Bindings.Android.3.40.1.nupkg - 2900783 bytes
Pushing Sentry.Bindings.Android.3.40.1.nupkg to '/home/runner/work/sentry-dotnet/sentry-dotnet/integration-test/packages'...
Your package was pushed.
Using package /home/runner/work/sentry-dotnet/sentry-dotnet/integration-test/../src/Sentry.Extensions.Logging/bin/Release/Sentry.Extensions.Logging.3.40.1.nupkg - 52917 bytes
Pushing Sentry.Extensions.Logging.3.40.1.nupkg to '/home/runner/work/sentry-dotnet/sentry-dotnet/integration-test/packages'...
Your package was pushed.
Using package /home/runner/work/sentry-dotnet/sentry-dotnet/integration-test/../src/Sentry.Maui/bin/Release/Sentry.Maui.3.40.1.nupkg - 210649 bytes
Pushing Sentry.Maui.3.40.1.nupkg to '/home/runner/work/sentry-dotnet/sentry-dotnet/integration-test/packages'...
Your package was pushed.
The template ".NET MAUI App" was created successfully.

info : Removing PackageReference for package 'Microsoft.Extensions.Logging.Debug' from project 'maui-app/maui-app.csproj'.
Installing workloads: 

Advertising manifest not updated. Manifest package for microsoft.net.sdk.aspire doesn't exist.
Skipping NuGet package signature verification.
Installing pack Microsoft.Android.Sdk.Linux version 34.0.0-rc.2.479...
Pack Microsoft.Android.Sdk.Linux version 34.0.0-rc.2.479 is already installed.
Writing workload pack installation record for Microsoft.Android.Sdk.net8 version 34.0.0-rc.2.479...
Installing pack Microsoft.Android.Sdk.Linux version 33.0.95...
Pack Microsoft.Android.Sdk.Linux version 33.0.95 is already installed.
Writing workload pack installation record for Microsoft.Android.Sdk.net7 version 33.0.95...
Installing pack Microsoft.Android.Ref.34 version 34.0.0-rc.2.479...
Pack Microsoft.Android.Ref.34 version 34.0.0-rc.2.479 is already installed.
Writing workload pack installation record for Microsoft.Android.Ref.34 version 34.0.0-rc.2.479...
Installing pack Microsoft.Android.Runtime.34.android-arm version 34.0.0-rc.2.479...
Pack Microsoft.Android.Runtime.34.android-arm version 34.0.0-rc.2.479 is already installed.
Writing workload pack installation record for Microsoft.Android.Runtime.34.android-arm version 34.0.0-rc.2.479...
Installing pack Microsoft.Android.Runtime.34.android-arm64 version 34.0.0-rc.2.479...
Pack Microsoft.Android.Runtime.34.android-arm64 version 34.0.0-rc.2.479 is already installed.
Writing workload pack installation record for Microsoft.Android.Runtime.34.android-arm64 version 34.0.0-rc.2.479...
Installing pack Microsoft.Android.Runtime.34.android-x86 version 34.0.0-rc.2.479...
Pack Microsoft.Android.Runtime.34.android-x86 version 34.0.0-rc.2.479 is already installed.
Writing workload pack installation record for Microsoft.Android.Runtime.34.android-x86 version 34.0.0-rc.2.479...
Installing pack Microsoft.Android.Runtime.34.android-x64 version 34.0.0-rc.2.479...
Pack Microsoft.Android.Runtime.34.android-x64 version 34.0.0-rc.2.479 is already installed.
Writing workload pack installation record for Microsoft.Android.Runtime.34.android-x64 version 34.0.0-rc.2.479...
Installing pack Microsoft.Android.Templates version 34.0.0-rc.2.479...
Pack Microsoft.Android.Templates version 34.0.0-rc.2.479 is already installed.
Writing workload pack installation record for Microsoft.Android.Templates version 34.0.0-rc.2.479...
Installing pack Microsoft.NETCore.App.Runtime.Mono.android-arm version 7.0.12...
Pack Microsoft.NETCore.App.Runtime.Mono.android-arm version 7.0.12 is already installed.
Writing workload pack installation record for Microsoft.NETCore.App.Runtime.Mono.net7.android-arm version 7.0.12...
Installing pack Microsoft.NETCore.App.Runtime.Mono.android-arm64 version 7.0.12...
Pack Microsoft.NETCore.App.Runtime.Mono.android-arm64 version 7.0.12 is already installed.
Writing workload pack installation record for Microsoft.NETCore.App.Runtime.Mono.net7.android-arm64 version 7.0.12...
Installing pack Microsoft.NETCore.App.Runtime.Mono.android-x64 version 7.0.12...
Pack Microsoft.NETCore.App.Runtime.Mono.android-x64 version 7.0.12 is already installed.
Writing workload pack installation record for Microsoft.NETCore.App.Runtime.Mono.net7.android-x64 version 7.0.12...
Installing pack Microsoft.NETCore.App.Runtime.Mono.android-x86 version 7.0.12...
Pack Microsoft.NETCore.App.Runtime.Mono.android-x86 version 7.0.12 is already installed.
Writing workload pack installation record for Microsoft.NETCore.App.Runtime.Mono.net7.android-x86 version 7.0.12...
Installing pack Microsoft.NET.Runtime.MonoAOTCompiler.Task version 7.0.12...
Pack Microsoft.NET.Runtime.MonoAOTCompiler.Task version 7.0.12 is already installed.
Writing workload pack installation record for Microsoft.NET.Runtime.MonoAOTCompiler.Task.net7 version 7.0.12...
Installing pack Microsoft.NET.Runtime.MonoTargets.Sdk version 7.0.12...
Pack Microsoft.NET.Runtime.MonoTargets.Sdk version 7.0.12 is already installed.
Writing workload pack installation record for Microsoft.NET.Runtime.MonoTargets.Sdk.net7 version 7.0.12...
Installing pack Microsoft.NETCore.App.Runtime.AOT.linux-x64.Cross.android-x86 version 7.0.12...
Pack Microsoft.NETCore.App.Runtime.AOT.linux-x64.Cross.android-x86 version 7.0.12 is already installed.
Writing workload pack installation record for Microsoft.NETCore.App.Runtime.AOT.Cross.net7.android-x86 version 7.0.12...
Installing pack Microsoft.NETCore.App.Runtime.AOT.linux-x64.Cross.android-x64 version 7.0.12...
Pack Microsoft.NETCore.App.Runtime.AOT.linux-x64.Cross.android-x64 version 7.0.12 is already installed.
Writing workload pack installation record for Microsoft.NETCore.App.Runtime.AOT.Cross.net7.android-x64 version 7.0.12...
Installing pack Microsoft.NETCore.App.Runtime.AOT.linux-x64.Cross.android-arm version 7.0.12...
Pack Microsoft.NETCore.App.Runtime.AOT.linux-x64.Cross.android-arm version 7.0.12 is already installed.
Writing workload pack installation record for Microsoft.NETCore.App.Runtime.AOT.Cross.net7.android-arm version 7.0.12...
Installing pack Microsoft.NETCore.App.Runtime.AOT.linux-x64.Cross.android-arm64 version 7.0.12...
Pack Microsoft.NETCore.App.Runtime.AOT.linux-x64.Cross.android-arm64 version 7.0.12 is already installed.
Writing workload pack installation record for Microsoft.NETCore.App.Runtime.AOT.Cross.net7.android-arm64 version 7.0.12...
Installing pack Microsoft.NETCore.App.Runtime.Mono.android-arm version 8.0.0-rc.2.[2347](https://github.com/getsentry/sentry-dotnet/actions/runs/6798187413/job/18482533901?pr=2781#step:6:2361)9.6...
Pack Microsoft.NETCore.App.Runtime.Mono.android-arm version 8.0.0-rc.2.23479.6 is already installed.
Writing workload pack installation record for Microsoft.NETCore.App.Runtime.Mono.android-arm version 8.0.0-rc.2.23479.6...
Installing pack Microsoft.NETCore.App.Runtime.Mono.android-arm64 version 8.0.0-rc.2.23479.6...
Pack Microsoft.NETCore.App.Runtime.Mono.android-arm64 version 8.0.0-rc.2.23479.6 is already installed.
Writing workload pack installation record for Microsoft.NETCore.App.Runtime.Mono.android-arm64 version 8.0.0-rc.2.23479.6...
Installing pack Microsoft.NETCore.App.Runtime.Mono.android-x64 version 8.0.0-rc.2.23479.6...
Pack Microsoft.NETCore.App.Runtime.Mono.android-x64 version 8.0.0-rc.2.23479.6 is already installed.
Writing workload pack installation record for Microsoft.NETCore.App.Runtime.Mono.android-x64 version 8.0.0-rc.2.23479.6...
Installing pack Microsoft.NETCore.App.Runtime.Mono.android-x86 version 8.0.0-rc.2.23479.6...
Pack Microsoft.NETCore.App.Runtime.Mono.android-x86 version 8.0.0-rc.2.23479.6 is already installed.
Writing workload pack installation record for Microsoft.NETCore.App.Runtime.Mono.android-x86 version 8.0.0-rc.2.23479.6...
Installing pack Microsoft.NET.Runtime.MonoAOTCompiler.Task version 8.0.0-rc.2.23479.6...
Pack Microsoft.NET.Runtime.MonoAOTCompiler.Task version 8.0.0-rc.2.23479.6 is already installed.
Writing workload pack installation record for Microsoft.NET.Runtime.MonoAOTCompiler.Task version 8.0.0-rc.2.23479.6...
Installing pack Microsoft.NET.Runtime.MonoTargets.Sdk version 8.0.0-rc.2.23479.6...
Pack Microsoft.NET.Runtime.MonoTargets.Sdk version 8.0.0-rc.2.23479.6 is already installed.
Writing workload pack installation record for Microsoft.NET.Runtime.MonoTargets.Sdk version 8.0.0-rc.2.23479.6...
Installing pack Microsoft.NETCore.App.Runtime.AOT.linux-x64.Cross.android-x86 version 8.0.0-rc.2.23479.6...
Pack Microsoft.NETCore.App.Runtime.AOT.linux-x64.Cross.android-x86 version 8.0.0-rc.2.23479.6 is already installed.
Writing workload pack installation record for Microsoft.NETCore.App.Runtime.AOT.Cross.android-x86 version 8.0.0-rc.2.23479.6...
Installing pack Microsoft.NETCore.App.Runtime.AOT.linux-x64.Cross.android-x64 version 8.0.0-rc.2.23479.6...
Pack Microsoft.NETCore.App.Runtime.AOT.linux-x64.Cross.android-x64 version 8.0.0-rc.2.23479.6 is already installed.
Writing workload pack installation record for Microsoft.NETCore.App.Runtime.AOT.Cross.android-x64 version 8.0.0-rc.2.23479.6...
Installing pack Microsoft.NETCore.App.Runtime.AOT.linux-x64.Cross.android-arm version 8.0.0-rc.2.23479.6...
Pack Microsoft.NETCore.App.Runtime.AOT.linux-x64.Cross.android-arm version 8.0.0-rc.2.23479.6 is already installed.
Writing workload pack installation record for Microsoft.NETCore.App.Runtime.AOT.Cross.android-arm version 8.0.0-rc.2.23479.6...
Installing pack Microsoft.NETCore.App.Runtime.AOT.linux-x64.Cross.android-arm64 version 8.0.0-rc.2.23479.6...
Pack Microsoft.NETCore.App.Runtime.AOT.linux-x64.Cross.android-arm64 version 8.0.0-rc.2.23479.6 is already installed.
Writing workload pack installation record for Microsoft.NETCore.App.Runtime.AOT.Cross.android-arm64 version 8.0.0-rc.2.23479.6...
Installing pack Microsoft.AspNetCore.Components.WebView.Maui version 8.0.0-rc.2.9530...
Pack Microsoft.AspNetCore.Components.WebView.Maui version 8.0.0-rc.2.9530 is already installed.
Writing workload pack installation record for Microsoft.AspNetCore.Components.WebView.Maui version 8.0.0-rc.2.9530...
Installing pack Microsoft.Maui.Sdk version 8.0.0-rc.2.9530...
Pack Microsoft.Maui.Sdk version 8.0.0-rc.2.9530 is already installed.
Writing workload pack installation record for Microsoft.Maui.Sdk.net8 version 8.0.0-rc.2.9530...
Installing pack Microsoft.Maui.Sdk version 7.0.101...
Pack Microsoft.Maui.Sdk version 7.0.101 is already installed.
Writing workload pack installation record for Microsoft.Maui.Sdk.net7 version 7.0.101...
Installing pack Microsoft.Maui.Graphics version 8.0.0-rc.2.9530...
Pack Microsoft.Maui.Graphics version 8.0.0-rc.2.9530 is already installed.
Writing workload pack installation record for Microsoft.Maui.Graphics version 8.0.0-rc.2.9530...
Installing pack Microsoft.Maui.Resizetizer version 8.0.0-rc.2.9530...
Pack Microsoft.Maui.Resizetizer version 8.0.0-rc.2.9530 is already installed.
Writing workload pack installation record for Microsoft.Maui.Resizetizer version 8.0.0-rc.2.9530...
Installing pack Microsoft.Maui.Resizetizer.Sdk version 7.0.101...
Pack Microsoft.Maui.Resizetizer.Sdk version 7.0.101 is already installed.
Writing workload pack installation record for Microsoft.Maui.Resizetizer.Sdk version 7.0.101...
Installing pack Microsoft.Maui.Templates.net8 version 8.0.0-rc.2.9530...
Pack Microsoft.Maui.Templates.net8 version 8.0.0-rc.2.9530 is already installed.
Writing workload pack installation record for Microsoft.Maui.Templates.net8 version 8.0.0-rc.2.9530...
Installing pack Microsoft.Maui.Templates.net7 version 7.0.101...
Pack Microsoft.Maui.Templates.net7 version 7.0.101 is already installed.
Writing workload pack installation record for Microsoft.Maui.Templates.net7 version 7.0.101...
Installing pack Microsoft.Maui.Core version 8.0.0-rc.2.9530...
Pack Microsoft.Maui.Core version 8.0.0-rc.2.9530 is already installed.
Writing workload pack installation record for Microsoft.Maui.Core version 8.0.0-rc.2.9530...
Installing pack Microsoft.Maui.Controls version 8.0.0-rc.2.9530...
Pack Microsoft.Maui.Controls version 8.0.0-rc.2.9530 is already installed.
Writing workload pack installation record for Microsoft.Maui.Controls version 8.0.0-rc.2.9530...
Installing pack Microsoft.Maui.Controls.Build.Tasks version 8.0.0-rc.2.9530...
Pack Microsoft.Maui.Controls.Build.Tasks version 8.0.0-rc.2.9530 is already installed.
Writing workload pack installation record for Microsoft.Maui.Controls.Build.Tasks version 8.0.0-rc.2.9530...
Installing pack Microsoft.Maui.Controls.Core version 8.0.0-rc.2.9530...
Pack Microsoft.Maui.Controls.Core version 8.0.0-rc.2.9530 is already installed.
Writing workload pack installation record for Microsoft.Maui.Controls.Core version 8.0.0-rc.2.9530...
Installing pack Microsoft.Maui.Controls.Xaml version 8.0.0-rc.2.9530...
Pack Microsoft.Maui.Controls.Xaml version 8.0.0-rc.2.9530 is already installed.
Writing workload pack installation record for Microsoft.Maui.Controls.Xaml version 8.0.0-rc.2.9530...
Installing pack Microsoft.Maui.Controls.Compatibility version 8.0.0-rc.2.9530...
Pack Microsoft.Maui.Controls.Compatibility version 8.0.0-rc.2.9530 is already installed.
Writing workload pack installation record for Microsoft.Maui.Controls.Compatibility version 8.0.0-rc.2.9530...
Installing pack Microsoft.Maui.Essentials version 8.0.0-rc.2.9530...
Pack Microsoft.Maui.Essentials version 8.0.0-rc.2.9530 is already installed.
Writing workload pack installation record for Microsoft.Maui.Essentials version 8.0.0-rc.2.9530...
Garbage collecting for SDK feature band(s) 6.0.400 7.0.100 7.0.200 7.0.300 7.0.400 8.0.100-rc.2...

Successfully installed workload(s) android maui-android.

  Determining projects to restore...
  Restored /home/runner/work/sentry-dotnet/sentry-dotnet/integration-test/maui-app/maui-app.csproj (in 20.19 sec).
  Determining projects to restore...
  Writing /tmp/tmpYJuu2W.tmp
info : X.509 certificate chain validation will use the fallback certificate bundle at '/usr/share/dotnet/sdk/8.0.100-rc.2.23502.2/trustedroots/codesignctl.pem'.
info : X.509 certificate chain validation will use the fallback certificate bundle at '/usr/share/dotnet/sdk/8.0.100-rc.2.23502.2/trustedroots/timestampctl.pem'.
info : Adding PackageReference for package 'Sentry.Maui' into project '/home/runner/work/sentry-dotnet/sentry-dotnet/integration-test/maui-app/maui-app.csproj'.
info : Restoring packages for /home/runner/work/sentry-dotnet/sentry-dotnet/integration-test/maui-app/maui-app.csproj...
info : Installed Sentry.Bindings.Android 3.40.1 from /home/runner/work/sentry-dotnet/sentry-dotnet/integration-test/packages with content hash sPHBrT313FpQ7KkcDaqrxBDHPWMmrXXqW9aH9JiGPWIoE85/iGy6ATSrG1xssKATLECPcjh0yVIRW+cCb5CJuA==.
info : Installed Sentry.Maui 3.40.1 from /home/runner/work/sentry-dotnet/sentry-dotnet/integration-test/packages with content hash lkq0l+yXWZsOk9MPgB/6LHKfC+ye1/FXW9ZMsalRTfB/5aTJhk2DAggwComYYnizSpmGWVB96hfn0uwLIPY5iQ==.
info : Installed Sentry.Android.AssemblyReader 3.40.1 from /home/runner/work/sentry-dotnet/sentry-dotnet/integration-test/packages with content hash 9o6JJn+MpL5t6ec8f6VGKNIYQ3JHas0ck7BRMUF5xPKGIaT0RM1UxgxMeDKHtv4tMU0fY3lpfD3KWacjV9rseQ==.
info : Installed Sentry.Extensions.Logging 3.40.1 from /home/runner/work/sentry-dotnet/sentry-dotnet/integration-test/packages with content hash Ffw9XXF3ePTGWWIjuaJPDLQaZ6yf5nmJ+ifSl5mABKpVYMZXqW6fYGqQsY4c8Hk/5RdvIXSxIiZZ3EM6WEVhGw==.
error: NU1100: Unable to resolve 'Microsoft.Extensions.Http (>= 6.0.0)' for 'net7.0-android33.0'. PackageSourceMapping is enabled, the following source(s) were not considered: integration-test.
error: NU1100: Unable to resolve 'Microsoft.Extensions.Logging.Configuration (>= 6.0.0)' for 'net7.0-android33.0'. PackageSourceMapping is enabled, the following source(s) were not considered: integration-test.
error: NU1100: Unable to resolve 'K4os.Compression.LZ4 (>= 1.3.5)' for 'net7.0-android33.0'. PackageSourceMapping is enabled, the following source(s) were not considered: integration-test.
error: NU1100: Unable to resolve 'Microsoft.Extensions.Http (>= 6.0.0)' for 'net7.0-android33.0/android-arm'. PackageSourceMapping is enabled, the following source(s) were not considered: integration-test.
error: NU1100: Unable to resolve 'Microsoft.Extensions.Logging.Configuration (>= 6.0.0)' for 'net7.0-android33.0/android-arm'. PackageSourceMapping is enabled, the following source(s) were not considered: integration-test.
error: NU1100: Unable to resolve 'K4os.Compression.LZ4 (>= 1.3.5)' for 'net7.0-android33.0/android-arm'. PackageSourceMapping is enabled, the following source(s) were not considered: integration-test.
error: NU1100: Unable to resolve 'Microsoft.Extensions.Http (>= 6.0.0)' for 'net7.0-android33.0/android-arm64'. PackageSourceMapping is enabled, the following source(s) were not considered: integration-test.
error: NU1100: Unable to resolve 'Microsoft.Extensions.Logging.Configuration (>= 6.0.0)' for 'net7.0-android33.0/android-arm64'. PackageSourceMapping is enabled, the following source(s) were not considered: integration-test.
error: NU1100: Unable to resolve 'K4os.Compression.LZ4 (>= 1.3.5)' for 'net7.0-android33.0/android-arm64'. PackageSourceMapping is enabled, the following source(s) were not considered: integration-test.
error: NU1100: Unable to resolve 'Microsoft.Extensions.Http (>= 6.0.0)' for 'net7.0-android33.0/android-x64'. PackageSourceMapping is enabled, the following source(s) were not considered: integration-test.
error: NU1100: Unable to resolve 'Microsoft.Extensions.Logging.Configuration (>= 6.0.0)' for 'net7.0-android33.0/android-x64'. PackageSourceMapping is enabled, the following source(s) were not considered: integration-test.
error: NU1100: Unable to resolve 'K4os.Compression.LZ4 (>= 1.3.5)' for 'net7.0-android33.0/android-x64'. PackageSourceMapping is enabled, the following source(s) were not considered: integration-test.
error: NU1100: Unable to resolve 'Microsoft.Extensions.Http (>= 6.0.0)' for 'net7.0-android33.0/android-x86'. PackageSourceMapping is enabled, the following source(s) were not considered: integration-test.
error: NU1100: Unable to resolve 'Microsoft.Extensions.Logging.Configuration (>= 6.0.0)' for 'net7.0-android33.0/android-x86'. PackageSourceMapping is enabled, the following source(s) were not considered: integration-test.
error: NU1100: Unable to resolve 'K4os.Compression.LZ4 (>= 1.3.5)' for 'net7.0-android33.0/android-x86'. PackageSourceMapping is enabled, the following source(s) were not considered: integration-test.
error: Package 'Sentry.Maui' is incompatible with 'all' frameworks in project '/home/runner/work/sentry-dotnet/sentry-dotnet/integration-test/maui-app/maui-app.csproj'.
jamescrosswell commented 12 months ago

Something about this looks very familiar:

error: NU1100: Unable to resolve 'Microsoft.Extensions.Http (>= 6.0.0)' for 'net7.0-android33.0'. PackageSourceMapping is enabled, the following source(s) were not considered: integration-test. error: NU1100: Unable to resolve 'Microsoft.Extensions.Logging.Configuration (>= 6.0.0)' for 'net7.0-android33.0'. PackageSourceMapping is enabled, the following source(s) were not considered: integration-test. error: NU1100: Unable to resolve 'K4os.Compression.LZ4 (>= 1.3.5)' for 'net7.0-android33.0'. PackageSourceMapping is enabled, the following source(s) were not considered: integration-test.

I think I might have run into this when leveraging source generated configuration bindings... and I think I resolved it by matching those dependencies to the target framework: https://github.com/getsentry/sentry-dotnet/blob/93b8508d76294cd8c815aa0831cd04fa7d932518/src/Sentry.Extensions.Logging/Sentry.Extensions.Logging.csproj#L18-L32

But I can't be sure... I know I've run into issues resolving those three dependencies before though.