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

Use Proguard rules for Thunderbird release builds #8019

Open
cketti opened this issue Jul 22, 2024 · 0 comments
Open

Use Proguard rules for Thunderbird release builds #8019

cketti opened this issue Jul 22, 2024 · 0 comments

Comments

@cketti
Copy link
Member

cketti commented Jul 22, 2024

Currently the release build of :app-thunderbird doesn't include the proguard-rules.pro file. This leads to R8 stripping too much code and the app crashing when setting up an IMAP account.

Steps to reproduce:

  1. ./gradlew :app-thunderbird:assembleRelease (make sure a keystore is available so a signed APK is created)
  2. adb install app-thunderbird/build/outputs/apk/release/app-thunderbird-release.apk
  3. Set up an IMAP account

Stack trace:

java.lang.AssertionError: Missing field in com.fsck.k9.mail.Flag
    at com.squareup.moshi.StandardJsonAdapters$EnumJsonAdapter.<init>(SourceFile:92)
    at com.squareup.moshi.MapJsonAdapter$1.create(SourceFile:514)
    at com.squareup.moshi.Moshi.adapter(SourceFile:29)
    at com.squareup.moshi.MapJsonAdapter$1.create(SourceFile:1069)
    at com.squareup.moshi.Moshi.adapter(SourceFile:29)
    at com.fsck.k9.controller.PendingCommandSerializer.<init>(SourceFile:102)
    at com.fsck.k9.controller.PendingCommandSerializer.<clinit>(SourceFile:3)
    at com.fsck.k9.mailstore.LocalStore.<init>(SourceFile:6)
    at com.fsck.k9.mailstore.LocalStoreProvider.getInstance(SourceFile:48)
    at com.fsck.k9.mailstore.SpecialLocalFoldersCreator.createSpecialLocalFolders(SourceFile:13)
    at com.fsck.k9.account.AccountCreator$createAccount$2.invokeSuspend(SourceFile:485)
    at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(SourceFile:9)
    at kotlinx.coroutines.DispatchedTask.run(SourceFile:113)
    at androidx.work.Worker$2.run(SourceFile:13)
    at kotlinx.coroutines.scheduling.TaskImpl.run(SourceFile:3)
    at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(SourceFile:96)
    Suppressed: kotlinx.coroutines.internal.DiagnosticCoroutineContextException: [StandaloneCoroutine{Cancelling}@bfda7dd, Dispatchers.Main.immediate]
Caused by: java.lang.NoSuchFieldException: RECENT
    at java.lang.Class.getField(Class.java:2337)
    at com.squareup.moshi.StandardJsonAdapters$EnumJsonAdapter.<init>(SourceFile:33)
    ... 15 more
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