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

"KeyStoreException: BKS not found" during log in #1143

Open
robovoice1 opened this issue Nov 28, 2024 · 18 comments
Open

"KeyStoreException: BKS not found" during log in #1143

robovoice1 opened this issue Nov 28, 2024 · 18 comments

Comments

@robovoice1
Copy link

robovoice1 commented Nov 28, 2024

Describe the bug
A clear and concise description of what the bug is.
After the update login is not possible any more

To Reproduce
Steps to reproduce the behavior:

  1. Start the parchli app
  2. Get the error screen (please see screenshot)

Expected behavior
A clear and concise description of what you expected to happen.

Login possible with updated Pachli app

Screenshots or video
If applicable, please add screenshots or video to help explain your problem.
IMG_20241128_182426

Versions
Please include the version of Pachli and Android you are using, and the software version your server is using. Find this on the Pachli "About" screen.
latest 2.9.0 Pachli (github release)

Google Pixel 6 pro
Android15
GrapheneOs 2024112700

Additional context
Add any other context about the problem here.

type: logcat
osVersion: google/raven/raven:15/AP3A.241105.007/2024112700:user/release-keys
package: app.pachli:24, targetSdk 34
buffers: main,system,crash,events,kernel
level: error

--------- beginning of crash
11-28 17:01:14.627  4694  4694 E AndroidRuntime: FATAL EXCEPTION: main
11-28 17:01:14.627  4694  4694 E AndroidRuntime: Process: app.pachli, PID: 4694
11-28 17:01:14.627  4694  4694 E AndroidRuntime: java.lang.IndexOutOfBoundsException: Empty list doesn't contain element at index 0.
11-28 17:01:14.627  4694  4694 E AndroidRuntime: 	at kotlin.collections.EmptyList.get(SourceFile:22)
11-28 17:01:14.627  4694  4694 E AndroidRuntime: 	at app.pachli.MainActivity.u(SourceFile:44)
11-28 17:01:14.627  4694  4694 E AndroidRuntime: 	at androidx.activity.ComponentActivity.onMenuItemSelected(SourceFile:32)
11-28 17:01:14.627  4694  4694 E AndroidRuntime: 	at androidx.fragment.app.FragmentActivity.onMenuItemSelected(SourceFile:1)
11-28 17:01:14.627  4694  4694 E AndroidRuntime: 	at androidx.appcompat.app.AppCompatActivity.onMenuItemSelected(SourceFile:1)
11-28 17:01:14.627  4694  4694 E AndroidRuntime: 	at androidx.appcompat.view.WindowCallbackWrapper.onMenuItemSelected(SourceFile:3)
11-28 17:01:14.627  4694  4694 E AndroidRuntime: 	at androidx.appcompat.app.ToolbarActionBar$2.onMenuItemClick(SourceFile:6)
11-28 17:01:14.627  4694  4694 E AndroidRuntime: 	at androidx.appcompat.widget.ActionMenuView$MenuBuilderCallback.a(SourceFile:50)
11-28 17:01:14.627  4694  4694 E AndroidRuntime: 	at androidx.appcompat.view.menu.MenuBuilder.e(SourceFile:5)
11-28 17:01:14.627  4694  4694 E AndroidRuntime: 	at androidx.appcompat.view.menu.MenuBuilder.q(SourceFile:29)
11-28 17:01:14.627  4694  4694 E AndroidRuntime: 	at androidx.appcompat.view.menu.MenuPopup.onItemClick(SourceFile:39)
11-28 17:01:14.627  4694  4694 E AndroidRuntime: 	at android.widget.AdapterView.performItemClick(AdapterView.java:330)
11-28 17:01:14.627  4694  4694 E AndroidRuntime: 	at android.widget.AbsListView.performItemClick(AbsListView.java:1273)
11-28 17:01:14.627  4694  4694 E AndroidRuntime: 	at android.widget.AbsListView$PerformClick.run(AbsListView.java:3286)
11-28 17:01:14.627  4694  4694 E AndroidRuntime: 	at android.widget.AbsListView$3.run(AbsListView.java:4252)
11-28 17:01:14.627  4694  4694 E AndroidRuntime: 	at android.os.Handler.handleCallback(Handler.java:959)
11-28 17:01:14.627  4694  4694 E AndroidRuntime: 	at android.os.Handler.dispatchMessage(Handler.java:100)
11-28 17:01:14.627  4694  4694 E AndroidRuntime: 	at android.os.Looper.loopOnce(Looper.java:232)
11-28 17:01:14.627  4694  4694 E AndroidRuntime: 	at android.os.Looper.loop(Looper.java:317)
11-28 17:01:14.627  4694  4694 E AndroidRuntime: 	at android.app.ActivityThread.main(ActivityThread.java:8744)
11-28 17:01:14.627  4694  4694 E AndroidRuntime: 	at java.lang.reflect.Method.invoke(Native Method)
11-28 17:01:14.627  4694  4694 E AndroidRuntime: 	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:580)
11-28 17:01:14.627  4694  4694 E AndroidRuntime: 	at com.android.internal.os.ExecInit.main(ExecInit.java:50)
11-28 17:01:14.627  4694  4694 E AndroidRuntime: 	at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method)
11-28 17:01:14.627  4694  4694 E AndroidRuntime: 	at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:369)
--------- beginning of main
11-28 17:28:39.293  8338  8338 E app.pachli: Not starting debugger since process cannot load the jdwp agent.
11-28 17:28:39.363  8338  8338 E cutils-trace: Error opening trace file: No such file or directory (2)
11-28 17:28:39.453  8338  8338 E app.pachli: Unable to find pattern file or unable to map it for am
11-28 17:28:39.684  8338  8361 E cutils-trace: Error opening trace file: No such file or directory (2)

Affirmation
I have checked other issues for this project (open and closed) and I cannot find one that matches the problem I am reporting.
Yes

@robovoice1
Copy link
Author

All of a sudden this works now as expected.
Closing 😃

@github-project-automation github-project-automation bot moved this from Todo to Done in Pachli roadmap Nov 28, 2024
@robovoice1
Copy link
Author

closed

@turtlegarden
Copy link

I am experiencing the same issue, unsure if this issue should be reopened or not. I will wait for 3 days and see if the issue resolves itself with various tests, and if it does not I will ask for reopening / create a new issue.

@turtlegarden
Copy link

turtlegarden commented Dec 10, 2024

This issue persists. Because the app requires an account to load in the user interface, I cannot access any information further than version 2.9.0. I am running on a Pixel 6a, Android 15, November security update, November Google Play system update.

@turtlegarden
Copy link

Can we please re-open this issue?

@robovoice1 robovoice1 reopened this Dec 10, 2024
@github-project-automation github-project-automation bot moved this from Done to In Progress in Pachli roadmap Dec 10, 2024
@robovoice1
Copy link
Author

robovoice1 commented Dec 10, 2024

reopened
and thanks for feedback @turtlegarden

I am using Parchli app 2.9.0 as expected.
Google Pixel 6pro (raven)
Android 15 - GrapheneOS 2024120900
full 2024-12-05 security patch level based on Android15 QPR1
Google Play Store and G Services from latest alpha channel release
Screenshot_20241210-173035

@nikclayton
Copy link
Contributor

Please can you both let me know which servers you're using. I'll create test accounts to try and reproduce the issue.

@robovoice1
Copy link
Author

social.tchncs.de

@turtlegarden
Copy link

gts.turtle.garden (GoToSocial 0.17.1)

@ralencode
Copy link

samsung galaxy note 10 (d1) /e/os 2.5 android 13. default microg, pachli installed from fdroid and i believe should not depend on g**gle
currently logged in server was mastodon.ml. also have social.linux.pizza account in the app
tusky 26 worked tho, few minutes later pachli started working by itself

@nikclayton nikclayton changed the title Pachli 2.9.0 Login not possible "KeyStoreException: BKS not found" during log in Dec 12, 2024
@robovoice1
Copy link
Author

Since today i cannot login with Pachli (again) Tusky works.
Only Remove Tab or Manage Tabs are selectable, but gives me this crash log

type: crash
osVersion: google/raven/raven:15/AP4A.241205.013/2024120900:user/release-keys
package: app.pachli:24, targetSdk 34
process: app.pachli
processUptime: 3623 + 202 ms
installer: dev.imranr.obtainium

java.lang.IndexOutOfBoundsException: Empty list doesn't contain element at index 0.
	at kotlin.collections.EmptyList.get(SourceFile:22)
	at app.pachli.MainActivity.u(SourceFile:44)
	at androidx.activity.ComponentActivity.onMenuItemSelected(SourceFile:32)
	at androidx.fragment.app.FragmentActivity.onMenuItemSelected(SourceFile:1)
	at androidx.appcompat.app.AppCompatActivity.onMenuItemSelected(SourceFile:1)
	at androidx.appcompat.view.WindowCallbackWrapper.onMenuItemSelected(SourceFile:3)
	at androidx.appcompat.app.ToolbarActionBar$2.onMenuItemClick(SourceFile:6)
	at androidx.appcompat.widget.ActionMenuView$MenuBuilderCallback.a(SourceFile:50)
	at androidx.appcompat.view.menu.MenuBuilder.e(SourceFile:5)
	at androidx.appcompat.view.menu.MenuBuilder.q(SourceFile:29)
	at androidx.appcompat.view.menu.MenuPopup.onItemClick(SourceFile:39)
	at android.widget.AdapterView.performItemClick(AdapterView.java:330)
	at android.widget.AbsListView.performItemClick(AbsListView.java:1274)
	at android.widget.AbsListView$PerformClick.run(AbsListView.java:3287)
	at android.widget.AbsListView$3.run(AbsListView.java:4266)
	at android.os.Handler.handleCallback(Handler.java:991)
	at android.os.Handler.dispatchMessage(Handler.java:102)
	at android.os.Looper.loopOnce(Looper.java:232)
	at android.os.Looper.loop(Looper.java:317)
	at android.app.ActivityThread.main(ActivityThread.java:8826)
	at java.lang.reflect.Method.invoke(Native Method)
	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:591)
	at com.android.internal.os.ExecInit.main(ExecInit.java:50)
	at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method)
	at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:369)

@nikclayton
Copy link
Contributor

Thanks for the info. I thought maybe this might be specific to devices running Android forks, but @ralencode's device seems to be stock. It's very odd that this problem has started happening.

I've seen some suggestions online that this might be due to overaggressive stripping of the binary by Proguard, so I'm adjusting the rules to try and mitigate that. I'll have a Pachli Current version out later today with this change.

@nikclayton
Copy link
Contributor

OK, it's not that. Because after making that change and deploying it I saw my first instance of the issue in an emulator connecting to mastodon.social. Hmm...

@nikclayton
Copy link
Contributor

@robovoice1 Separately, #1179 is the fix for the crashes you've reported in this issue.

@nikclayton
Copy link
Contributor

nikclayton commented Dec 13, 2024

Folks, a few followup questions.

  1. When you see this error, what happens if you tap the "Retry" button? In particular, does the second (or third...) attempt work, or does it stay stuck? If subsequent attempts work that suggests a race condition somewhere, which I'm not looking forward to tracking down...
  2. When you see this error, what happens if you bring up the list of recent apps, swipe Pachli away, and then relaunch Pachli. Does the error happen again, or is it resolved?
  3. @turtlegarden -- If you can reliably reproduce this on your server, can I get an account on it to test? Thanks

@robovoice1
Copy link
Author

robovoice1 commented Dec 13, 2024

@nikclayton

  1. stays stuck after tapping 10 times Retry and 10 times Cancel.
  2. Error happen again (Screenshot1 message) BKS not found.
    Also after Force Stop and restarting the app.

@robovoice1
Copy link
Author

After clearing cache and storage of pachli app i can login again 😃

@turtlegarden
Copy link

  1. When you see this error, what happens if you tap the "Retry" button? In particular, does the second (or third...) attempt work, or does it stay stuck? If subsequent attempts work that suggests a race condition somewhere, which I'm not looking forward to tracking down...

It unfortunately repeats, whether I press Cancel or Retry.

  1. When you see this error, what happens if you bring up the list of recent apps, swipe Pachli away, and then relaunch Pachli. Does the error happen again, or is it resolved?

The error happens again. It is possible to log in to Pachli, but the key seems to not be able to be loaded in again after relaunch.

  1. (me) If you can reliably reproduce this on your server, can I get an account on it to test? Thanks

I will see if I can test it on a new test account first, as well as other servers, to see if this continues. Then, if I can confirm this, I'll reach out with further test account details.

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

No branches or pull requests

4 participants