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

Gradle obfuscation crashes the tinder-scarlet in startup #7405

Open
MohammadFakhraee opened this issue May 5, 2024 · 0 comments
Open

Gradle obfuscation crashes the tinder-scarlet in startup #7405

MohammadFakhraee opened this issue May 5, 2024 · 0 comments

Comments

@MohammadFakhraee
Copy link

I know this might be an irrelevant issue. But as Tinder Scarlet library is not being updated and you are using this library, so you might face the issue which I couldn't solve.

With gradle version above 8, there is a weird issue with obfuscation. I am trying to run the scarlet demo app when enabling obfuscation with minifyEnabled true but it crashes with the following message:

java.lang.IllegalArgumentException: Receive method must return ParameterizedType: public abstract kotlinx.coroutines.flow.Flow com.tinder.app.echo.api.EchoService.observeBitmap()
          at com.tinder.scarlet.internal.servicemethod.ServiceMethod$Receive$Factory.create(ServiceMethod.kt:100)
          at com.tinder.scarlet.internal.servicemethod.ServiceMethod$Receive$Factory.create(ServiceMethod.kt:66)
          at com.tinder.scarlet.internal.servicemethod.ServiceMethodExecutor$Factory.toServiceMethod(ServiceMethodExecutor.kt:47)
          at com.tinder.scarlet.internal.servicemethod.ServiceMethodExecutor$Factory.findServiceMethods(ServiceMethodExecutor.kt:38)
          at com.tinder.scarlet.internal.servicemethod.ServiceMethodExecutor$Factory.create(ServiceMethodExecutor.kt:32)
          at com.tinder.scarlet.internal.Service$Factory.create(Service.kt:28)
          at com.tinder.scarlet.Scarlet.implementService(Scarlet.kt:108)
          at com.tinder.scarlet.Scarlet.create(Scarlet.kt:100)
          at com.tinder.app.echo.inject.EchoBotComponent$EchoBotModule.provideEchoService(EchoBotComponent.kt:105)

The problem is when the demo is not minifying, the methods of scarlet service interfaces has a genericReturnType of ParameterizedTypeImpl type. But when switching minifyingEnabled on, the genericReturnType will become a type of java.lang.Class.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant