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

Keyguard locks every time #226

Open
yurividal opened this issue Mar 27, 2024 · 11 comments
Open

Keyguard locks every time #226

yurividal opened this issue Mar 27, 2024 · 11 comments

Comments

@yurividal
Copy link

Hi. I started to notice a weird behavior that I'm not sure if is a new bug or if it always happened.
I have keyguard set to lock after 5 minutes, and to lock when screen turns off.
But it seems to always lock immediately.
If I go to a website, like wix.com, which has 2 separate "screens" for email, then password, I have to unlock keyguard twice.

Example:

  • go to wix.com
  • click login
  • select the email input box
  • keyboard shows inline autofill "Unlock Keyguard"
  • click unlock keyguard, put fingerprint
  • select wix account
  • email is filled in
  • click next
  • click the password field
  • keyboard shows inline autofill "Unlock Keyguard"
    I have to unlock again and click the item again.

For some reason keyguard is not remaining unlocked.

@yurividal
Copy link
Author

Ok, I've done some more investigation, and I think what is happening is that keyguard is crashing in the background, every time I do an autofill.
It fills the field then it silently crashes.
I'm gonna try to collect some adb logs later today

@yurividal
Copy link
Author

Did some more investigation. I think it has something to do with the workaround I am doing un order to get keyguard to work on Samsung browser.

For some reason, the keygyard app, when it has the package name changed (I am changing mine to 1password's package name), it crashes after every successful autofill.

I tried the official un-renamed version, on chrome browser and it works fine.

Any ideas why a package name change would cause the app to crash when auto-filling?

@AChep
Copy link
Owner

AChep commented Mar 27, 2024

It might be that the package name changer you use looses the new foreground service type attribute. I can try to specify the type in the code, maybe that will fix the issue for you.

@yurividal
Copy link
Author

Cool, thanks. That will be very helpful. I still can't believe samsung is still blacklisting your app on their browser. Just tested again, and without renaming the package, autofill works on Chrome, brave, but not samsung browser.

@yurividal
Copy link
Author

Hi @AChep
Is there a compiled version with this change, so that i can test?

@AChep
Copy link
Owner

AChep commented Mar 28, 2024

Hi @AChep Is there a compiled version with this change, so that i can test?

It should appear here in ~10m or so https://github.com/AChep/keyguard-app/actions/runs/8466788545

@yurividal
Copy link
Author

Thanks. I just tried it. It still crashes upon filling the first item.

@yurividal
Copy link
Author

Here is my filtered adb logs:

filtered.txt

@yurividal
Copy link
Author

@AChep just wanted to let you know that this still happens on the latest version you published today.
I know it's probably an edge case, that you most likely don't plan to support, but thought I'd let you know anyway.

Thanks again for the awesome work.

@yurividal
Copy link
Author

@AChep did some more tests, it seems the crash is because it can't find "com.artemchep.keyguard.android.clipboard.KeyguardClipboardService" which seems to be refferenced directly.

--------- beginning of crash
03-31 14:08:13.587 29635 29635 E AndroidRuntime: FATAL EXCEPTION: main
03-31 14:08:13.587 29635 29635 E AndroidRuntime: Process: com.agilebits.onepassword, PID: 29635
03-31 14:08:13.587 29635 29635 E AndroidRuntime: java.lang.IllegalArgumentException: foregroundServiceType 0x40000000 is not a subset of foregroundServiceType attribute 0x00000000 in service element of manifest file
03-31 14:08:13.587 29635 29635 E AndroidRuntime:        at android.os.Parcel.createExceptionOrNull(Parcel.java:3073)
03-31 14:08:13.587 29635 29635 E AndroidRuntime:        at android.os.Parcel.createException(Parcel.java:3053)
03-31 14:08:13.587 29635 29635 E AndroidRuntime:        at android.os.Parcel.readException(Parcel.java:3036)
03-31 14:08:13.587 29635 29635 E AndroidRuntime:        at android.os.Parcel.readException(Parcel.java:2978)
03-31 14:08:13.587 29635 29635 E AndroidRuntime:        at android.app.IActivityManager$Stub$Proxy.setServiceForeground(IActivityManager.java:7234)
03-31 14:08:13.587 29635 29635 E AndroidRuntime:        at android.app.Service.startForeground(Service.java:862)
03-31 14:08:13.587 29635 29635 E AndroidRuntime:        at F1.T.a(Unknown Source:10)
03-31 14:08:13.587 29635 29635 E AndroidRuntime:        at com.artemchep.keyguard.android.clipboard.KeyguardClipboardService.c(Unknown Source:170)
03-31 14:08:13.587 29635 29635 E AndroidRuntime:        at J3.n.j(Unknown Source:59)
03-31 14:08:13.587 29635 29635 E AndroidRuntime:        at J3.n.invoke(Unknown Source:12)
03-31 14:08:13.587 29635 29635 E AndroidRuntime:        at t7.d0.j(Unknown Source:52)
03-31 14:08:13.587 29635 29635 E AndroidRuntime:        at t7.d0.invoke(Unknown Source:23)
03-31 14:08:13.587 29635 29635 E AndroidRuntime:        at Eg.k.j(Unknown Source:34)
03-31 14:08:13.587 29635 29635 E AndroidRuntime:        at Eg.k.invoke(Unknown Source:12)
03-31 14:08:13.587 29635 29635 E AndroidRuntime:        at Ag.a.I0(Unknown Source:36)
03-31 14:08:13.587 29635 29635 E AndroidRuntime:        at Y6.s2.n(Unknown Source:23)
03-31 14:08:13.587 29635 29635 E AndroidRuntime:        at Y6.s2.o(Unknown Source:12)
03-31 14:08:13.587 29635 29635 E AndroidRuntime:        at Eg.m.h(Unknown Source:105)
03-31 14:08:13.587 29635 29635 E AndroidRuntime:        at Y6.K4.l(Unknown Source:124)
03-31 14:08:13.587 29635 29635 E AndroidRuntime:        at Dg.m.j(Unknown Source:11)
03-31 14:08:13.587 29635 29635 E AndroidRuntime:        at Ve.a.t(Unknown Source:8)
03-31 14:08:13.587 29635 29635 E AndroidRuntime:        at Ag.P.run(Unknown Source:112)
03-31 14:08:13.587 29635 29635 E AndroidRuntime:        at android.os.Handler.handleCallback(Handler.java:958)
03-31 14:08:13.587 29635 29635 E AndroidRuntime:        at android.os.Handler.dispatchMessage(Handler.java:99)
03-31 14:08:13.587 29635 29635 E AndroidRuntime:        at android.os.Looper.loopOnce(Looper.java:230)
03-31 14:08:13.587 29635 29635 E AndroidRuntime:        at android.os.Looper.loop(Looper.java:319)
03-31 14:08:13.587 29635 29635 E AndroidRuntime:        at android.app.ActivityThread.main(ActivityThread.java:8919)
03-31 14:08:13.587 29635 29635 E AndroidRuntime:        at java.lang.reflect.Method.invoke(Native Method)
03-31 14:08:13.587 29635 29635 E AndroidRuntime:        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:578)
03-31 14:08:13.587 29635 29635 E AndroidRuntime:        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1103)
03-31 14:08:13.587 29635 29635 E AndroidRuntime:        Suppressed: Fg.h: [D0{Cancelling}@97299bd, Dispatchers.Main]
03-31 14:08:13.587 29635 29635 E AndroidRuntime: Caused by: android.os.RemoteException: Remote stack trace:
03-31 14:08:13.587 29635 29635 E AndroidRuntime:        at com.android.server.am.ActiveServices.setServiceForegroundInnerLocked(ActiveServices.java:2183)
03-31 14:08:13.587 29635 29635 E AndroidRuntime:        at com.android.server.am.ActiveServices.setServiceForegroundLocked(ActiveServices.java:1797)
03-31 14:08:13.587 29635 29635 E AndroidRuntime:        at com.android.server.am.ActivityManagerService.setServiceForeground(ActivityManagerService.java:15948)
03-31 14:08:13.587 29635 29635 E AndroidRuntime:        at android.app.IActivityManager$Stub.onTransact$setServiceForeground$(IActivityManager.java:11974)
03-31 14:08:13.587 29635 29635 E AndroidRuntime:        at android.app.IActivityManager$Stub.onTransact(IActivityManager.java:3518)
03-31 14:08:13.587 29635 29635 E AndroidRuntime:
03-31 14:08:13.589 32553 32553 D SurfaceView@40bae12: 67874322 updateSurface: has no frame

@AChep
Copy link
Owner

AChep commented Mar 31, 2024

@AChep did some more tests, it seems the crash is because it can't find "com.artemchep.keyguard.android.clipboard.KeyguardClipboardService" which seems to be refferenced directly.

--------- beginning of crash
03-31 14:08:13.587 29635 29635 E AndroidRuntime: FATAL EXCEPTION: main
03-31 14:08:13.587 29635 29635 E AndroidRuntime: Process: com.agilebits.onepassword, PID: 29635
03-31 14:08:13.587 29635 29635 E AndroidRuntime: java.lang.IllegalArgumentException: foregroundServiceType 0x40000000 is not a subset of foregroundServiceType attribute 0x00000000 in service element of manifest file
03-31 14:08:13.587 29635 29635 E AndroidRuntime:        at android.os.Parcel.createExceptionOrNull(Parcel.java:3073)
03-31 14:08:13.587 29635 29635 E AndroidRuntime:        at android.os.Parcel.createException(Parcel.java:3053)
03-31 14:08:13.587 29635 29635 E AndroidRuntime:        at android.os.Parcel.readException(Parcel.java:3036)
03-31 14:08:13.587 29635 29635 E AndroidRuntime:        at android.os.Parcel.readException(Parcel.java:2978)
03-31 14:08:13.587 29635 29635 E AndroidRuntime:        at android.app.IActivityManager$Stub$Proxy.setServiceForeground(IActivityManager.java:7234)
03-31 14:08:13.587 29635 29635 E AndroidRuntime:        at android.app.Service.startForeground(Service.java:862)
03-31 14:08:13.587 29635 29635 E AndroidRuntime:        at F1.T.a(Unknown Source:10)
03-31 14:08:13.587 29635 29635 E AndroidRuntime:        at com.artemchep.keyguard.android.clipboard.KeyguardClipboardService.c(Unknown Source:170)
03-31 14:08:13.587 29635 29635 E AndroidRuntime:        at J3.n.j(Unknown Source:59)
03-31 14:08:13.587 29635 29635 E AndroidRuntime:        at J3.n.invoke(Unknown Source:12)
03-31 14:08:13.587 29635 29635 E AndroidRuntime:        at t7.d0.j(Unknown Source:52)
03-31 14:08:13.587 29635 29635 E AndroidRuntime:        at t7.d0.invoke(Unknown Source:23)
03-31 14:08:13.587 29635 29635 E AndroidRuntime:        at Eg.k.j(Unknown Source:34)
03-31 14:08:13.587 29635 29635 E AndroidRuntime:        at Eg.k.invoke(Unknown Source:12)
03-31 14:08:13.587 29635 29635 E AndroidRuntime:        at Ag.a.I0(Unknown Source:36)
03-31 14:08:13.587 29635 29635 E AndroidRuntime:        at Y6.s2.n(Unknown Source:23)
03-31 14:08:13.587 29635 29635 E AndroidRuntime:        at Y6.s2.o(Unknown Source:12)
03-31 14:08:13.587 29635 29635 E AndroidRuntime:        at Eg.m.h(Unknown Source:105)
03-31 14:08:13.587 29635 29635 E AndroidRuntime:        at Y6.K4.l(Unknown Source:124)
03-31 14:08:13.587 29635 29635 E AndroidRuntime:        at Dg.m.j(Unknown Source:11)
03-31 14:08:13.587 29635 29635 E AndroidRuntime:        at Ve.a.t(Unknown Source:8)
03-31 14:08:13.587 29635 29635 E AndroidRuntime:        at Ag.P.run(Unknown Source:112)
03-31 14:08:13.587 29635 29635 E AndroidRuntime:        at android.os.Handler.handleCallback(Handler.java:958)
03-31 14:08:13.587 29635 29635 E AndroidRuntime:        at android.os.Handler.dispatchMessage(Handler.java:99)
03-31 14:08:13.587 29635 29635 E AndroidRuntime:        at android.os.Looper.loopOnce(Looper.java:230)
03-31 14:08:13.587 29635 29635 E AndroidRuntime:        at android.os.Looper.loop(Looper.java:319)
03-31 14:08:13.587 29635 29635 E AndroidRuntime:        at android.app.ActivityThread.main(ActivityThread.java:8919)
03-31 14:08:13.587 29635 29635 E AndroidRuntime:        at java.lang.reflect.Method.invoke(Native Method)
03-31 14:08:13.587 29635 29635 E AndroidRuntime:        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:578)
03-31 14:08:13.587 29635 29635 E AndroidRuntime:        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1103)
03-31 14:08:13.587 29635 29635 E AndroidRuntime:        Suppressed: Fg.h: [D0{Cancelling}@97299bd, Dispatchers.Main]
03-31 14:08:13.587 29635 29635 E AndroidRuntime: Caused by: android.os.RemoteException: Remote stack trace:
03-31 14:08:13.587 29635 29635 E AndroidRuntime:        at com.android.server.am.ActiveServices.setServiceForegroundInnerLocked(ActiveServices.java:2183)
03-31 14:08:13.587 29635 29635 E AndroidRuntime:        at com.android.server.am.ActiveServices.setServiceForegroundLocked(ActiveServices.java:1797)
03-31 14:08:13.587 29635 29635 E AndroidRuntime:        at com.android.server.am.ActivityManagerService.setServiceForeground(ActivityManagerService.java:15948)
03-31 14:08:13.587 29635 29635 E AndroidRuntime:        at android.app.IActivityManager$Stub.onTransact$setServiceForeground$(IActivityManager.java:11974)
03-31 14:08:13.587 29635 29635 E AndroidRuntime:        at android.app.IActivityManager$Stub.onTransact(IActivityManager.java:3518)
03-31 14:08:13.587 29635 29635 E AndroidRuntime:
03-31 14:08:13.589 32553 32553 D SurfaceView@40bae12: 67874322 updateSurface: has no frame

No, to me it looks like the tool that you've used accidentally wipes the foregroundServiceType from the service's declaration.

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

2 participants