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

package io.sentry.FullDisplayedReporter does not exist preventing .NET MAUI to publish Android app #2414

Closed
imsam67 opened this issue Jun 6, 2023 · 4 comments
Assignees
Labels
Android Bug Something isn't working MAUI

Comments

@imsam67
Copy link

imsam67 commented Jun 6, 2023

Environment

self-hosted (https://develop.sentry.dev/self-hosted/)

Steps to Reproduce

Not sure why but now I'm unable to publish my .NET MAUI app for Android. I simply issue the following command and the process starts as usual:

dotnet publish -f:net7.0-android -c:Release /p:AndroidSigningKeyPass=MY_PASSWORD /p:AndroidSigningStorePass=MY_STORE_PASSWORD

Initially, the process seems to work fine but at the end I get the following error. My app is targeting .NET 7 and the version of Sentry is

<PackageReference Include="Sentry.Maui" Version="3.33.0" />

I published this app with very minor differences in my code using Sentry.Maui 3.29.1. I tried that as well but got the same error.

obj\Release\net7.0-android\android\src\mono\io\sentry\FullDisplayedReporter_FullDisplayedReporterListenerImplementor.ja
va(8,34): javac.exe error JAVAC0000: error: package io.sentry.FullDisplayedReporter does not exist [C:\Users\sam\sourc
e\repos\MyApp\my-app\MyApp.csproj::TargetFramework=net7.0-android]
obj\Release\net7.0-android\android\src\mono\io\sentry\FullDisplayedReporter_FullDisplayedReporterListenerImplementor.ja
va(8,34): javac.exe error JAVAC0000: io.sentry.FullDisplayedReporter.FullDisplayedReporterListener [C:\Users\sam\sourc
e\repos\MyApp\my-app\MyApp.csproj::TargetFramework=net7.0-and
roid]
obj\Release\net7.0-android\android\src\mono\io\sentry\FullDisplayedReporter_FullDisplayedReporterListenerImplementor.ja
va(8,34): javac.exe error JAVAC0000: [C:\Users\sam\sourc
e\repos\MyApp\my-app\MyApp.csproj::TargetFramework=net7.0-android]

Expected Result

The app should simply publish.

Actual Result

obj\Release\net7.0-android\android\src\mono\io\sentry\FullDisplayedReporter_FullDisplayedReporterListenerImplementor.ja
va(8,34): javac.exe error JAVAC0000: error: package io.sentry.FullDisplayedReporter does not exist [C:\Users\sam\sourc
e\repos\MyApp\my-app\MyApp.csproj::TargetFramework=net7.0-android]
obj\Release\net7.0-android\android\src\mono\io\sentry\FullDisplayedReporter_FullDisplayedReporterListenerImplementor.ja
va(8,34): javac.exe error JAVAC0000: io.sentry.FullDisplayedReporter.FullDisplayedReporterListener [C:\Users\sam\sourc
e\repos\MyApp\my-app\MyApp.csproj::TargetFramework=net7.0-and
roid]
obj\Release\net7.0-android\android\src\mono\io\sentry\FullDisplayedReporter_FullDisplayedReporterListenerImplementor.ja
va(8,34): javac.exe error JAVAC0000: [C:\Users\sam\sourc
e\repos\MyApp\my-app\MyApp.csproj::TargetFramework=net7.0-android]

Product Area

Issues

Link

No response

DSN

No response

Version

3.33.0

@getsantry
Copy link

getsantry bot commented Jun 6, 2023

Assigning to @getsentry/support for routing, due by Wednesday, June 7th at 4:12 pm (sfo). ⏲️

@mattjohnsonpint
Copy link
Contributor

Hi Sam.

That is a Java class that was renamed from Full to Fully in getsentry/sentry-java#2585 - which we took into .NET with version 3.30.0. Generally you shouldn't have to worry about the underlying native Java/Android SDKs unless you need specific features from there.

Likely what's happening here is that .NET has cached copies of older files sitting in the obj folder from a previous build. I've experienced that with MAUI development in many cases, both for .java files and for .g.cs files.

I suggest a manual clean build. Close any IDEs, delete the obj and bin folder(s) in your working directory, then try to build and publish again. If it continues to happen on a clean build, then I'll need a small repro because I tried and cannot reproduce it with a starter app.

Thanks, and good luck!

@mattjohnsonpint
Copy link
Contributor

Please let me know if that resolves the issue or not. I'll leave this open for now. Thanks.

@mattjohnsonpint mattjohnsonpint self-assigned this Jun 7, 2023
@imsam67
Copy link
Author

imsam67 commented Jun 7, 2023

Thanks Matt! Removing bin and obj folders and rebuilding the app fixed the issue. Thanks again for the super-fast help!

@imsam67 imsam67 closed this as completed Jun 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Android Bug Something isn't working MAUI
Projects
Archived in project
Archived in project
Development

No branches or pull requests

2 participants