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

[Bug]: Password Autofill Provider shows on termux #3909

Closed
mio-19 opened this issue Apr 6, 2024 · 26 comments · Fixed by #4125
Closed

[Bug]: Password Autofill Provider shows on termux #3909

mio-19 opened this issue Apr 6, 2024 · 26 comments · Fixed by #4125

Comments

@mio-19
Copy link

mio-19 commented Apr 6, 2024

Problem description

Password Autofill Service shows on termux terminal, which can disturb with the workflow.

Screenshot_20240407_020702_Termux

Steps to reproduce the behavior.

  1. Install Bitwarden and set it as the auto-fill provider.
  2. Open Termux

What is the expected behavior?

No Autofill

System information

  • Termux application version: 0.118.0
  • Android OS version: 14
  • Device model: Samsung S23 Ultra
@fwrs
Copy link

fwrs commented Apr 8, 2024

Also experiencing this with 1Password where it is a little more obtrusive. I don't think this is 1Password's fault though, I've not had it show up on non-password text fields in any other app. It's likely that there's an existing reason why Termux does it this way, so I'd appreciate it if this were to be a configurable setting.

@yubrajbhoi
Copy link

yubrajbhoi commented Apr 13, 2024

Yeah, I also got this bug after a Gboard update. I don't use any password manager either. I just disabled the suggestion strip entirely after that. Here is how it looks like on my Google Pixel 6a:

Screenshot_20240413-183536

@juvannx
Copy link

juvannx commented Apr 15, 2024

from bitwarden or Android settings.

Autofill is managed by Android so apps can't decide if they must show or no, in Android there is no settings for disable autofill for apps.
So termux should change components which accept input with android:autofillHints and disable it.

@juvannx
Copy link

juvannx commented Apr 15, 2024

I just disabled the suggestion strip entirely after that.

This is a workaround and not a solution.
Termux should update with new version of android.

@termux termux deleted a comment from hamee4594 Apr 17, 2024
@dausruddin
Copy link

I cannot access my clipboard because of this bug. Hate switching to another keyboard when using termux and change back when not using it.

@tutacat
Copy link

tutacat commented Jun 5, 2024

This happens after updating to Android 14

To offer smoother integration with password managers, the Credential Manager API was replaced the Autofill framework. This may not work as well with older apps that may not provide the context in the way that it expects.

This is likely happening because the text field is direct-input. Since Termux has the autofill option in more options, and termux only uses one text input and can't definitively discern password input, this could cause the popup.

Workarounds:

  • Depending on your keyboard, you can close the autofill popup with an X button on the keyboard.
  • Additionally if your autofill has floating popup, you can tap/select on the terminal console to hide the popup.
  • All my keyboards that won't hide the inline suggestion bubble, still have full functionality.
  • You can select some options like clipboard from the text context menu (long press), and other options from the termux "more..." menu (from text menu More button, or right-click).

@psyburr
Copy link

psyburr commented Jun 10, 2024

Since this was reported using bitwarden, I'd like to offer a solution to those with the same problem also using the bitwarden application. In the following Settings—>Autofill menu, at the very bottom there is an option to Block AutoFill. Selecting this will open a menu with a button labeled New blocked URI, selecting that will open a dialog where you can enter the following to prevent bitwarden from suggesting any auto-fill whenever using Termux. Screenshots from my device attached for visual reference. Hope this helps!

androidapp://com.termux

1
2

@indrastorms
Copy link

Since this was reported using bitwarden, I'd like to offer a solution to those with the same problem also using the bitwarden application. In the following Settings—>Autofill menu, at the very bottom there is an option to Block AutoFill. Selecting this will open a menu with a button labeled New blocked URI, selecting that will open a dialog where you can enter the following to prevent bitwarden from suggesting any auto-fill whenever using Termux. Screenshots from my device attached for visual reference. Hope this helps!

androidapp://com.termux

Now you can't autofill when you wanted to.

@psyburr
Copy link

psyburr commented Jul 12, 2024

We never wanted to. Please see the initial report and expected behavior.

@indrastorms
Copy link

We never wanted to. Please see the initial report and expected behavior.

So what do you think about the option "autofill password" existed for?

@yubrajbhoi
Copy link

@psyburr That is a pretty good workaround. Do you know if that is possible on stock Android (with no password manager)?

@yubrajbhoi
Copy link

yubrajbhoi commented Aug 18, 2024

All right, I found a workaround. Go to Settings and "Passwords, passkeys and autofill". Select the preferred service, for me on Pixel 6a, it is Google. That will take you to "Use Autofill with Google". Disable that and it should be fixed.

If you are actually using Google password manager you will have to find a different solution.

@escape0707
Copy link

@yubrajbhoi I've set it to Bitwarden since day one I bought my Pixel 6a. I don't know if switching it back to Google then again to Bitwarden will do anything... I'm using the "disable autofill for termux" workaround now.

@yubrajbhoi
Copy link

@escape0707 Yeah, it won't do anything. You have to disable the app you save set as preferred service. In my case I use pass in Termux as my password manager, so I don't need Google.

@Dhyfer1
Copy link

Dhyfer1 commented Aug 26, 2024

Screenshot_20240826-093310.jpg

Please, anyone with any solution for Gboard and Google password manager on Android 14? It's annoying to see this every time I open termux 😤

agnostic-apollo added a commit that referenced this issue Aug 26, 2024
…for usernames

- The AutoFill type and hints are no longer hardcoded in `TerminalView` class and `TermuxActivity` layout xml. They are dynamically set to required values before making a manual AutoFill request and reverted back afterwards to default values. The hardcoded value `AUTOFILL_TYPE_TEXT` returned by `getAutofillType()` was causing the AutoFill UI to show on Activity starts, this will return `getAutofillType` by default now so that AutoFill UI isn't shown automatically.
- The AutoFill importance is no longer hardcoded in `TermuxActivity` layout xml and is returned by `TerminalView` class itself by `getImportantForAutofill()`.
- The AutoFill function in `TermuxActivity` for making a manual AutoFill request is moved to `TerminalView` class. This and moving of hardcoded values to `TerminalView` class mentioned above is done as complete logic of AutoFill should be handled by `TerminalView` class itself and not scattered in various places.
- The Terminal context menu now supports AutoFilling a username. Note that GBoard/Google Password Manager seems to have a bug where it will still show `Pick a saved password` instead of username, even though `AUTOFILL_HINT_USERNAME` is being requested, however it will still AutoFill a username of selected entry correctly.
- Pressing the back button to close the keyboard will also cancel the current manually requested AutoFill request and UI will not show when keyboard is opened again.

Closes #3909
agnostic-apollo added a commit that referenced this issue Aug 26, 2024
…for usernames

- The AutoFill type and hints are no longer hardcoded in `TerminalView` class and `TermuxActivity` layout xml. They are dynamically set to required values before making a manual AutoFill request and reverted back afterwards to default values. The hardcoded value `AUTOFILL_TYPE_TEXT` returned by `getAutofillType()` was causing the AutoFill UI to show on Activity starts, this will return `AUTOFILL_TYPE_NONE` by default now so that AutoFill UI isn't shown automatically.
- The AutoFill importance is no longer hardcoded in `TermuxActivity` layout xml and is returned by `TerminalView` class itself by `getImportantForAutofill()`.
- The AutoFill function in `TermuxActivity` for making a manual AutoFill request is moved to `TerminalView` class. This and moving of hardcoded values to `TerminalView` class mentioned above is done as complete logic of AutoFill should be handled by `TerminalView` class itself and not scattered in various places.
- The Terminal context menu now supports AutoFilling a username. Note that GBoard/Google Password Manager seems to have a bug where it will still show `Pick a saved password` instead of username, even though `AUTOFILL_HINT_USERNAME` is being requested, however it will still AutoFill a username of selected entry correctly.
- Pressing the back button to close the keyboard will also cancel the current manually requested AutoFill request and UI will not show when keyboard is opened again.

Closes #3909
@agnostic-apollo
Copy link
Member

Check #4125. Users using GitHub action builds should test and report so that it can be merged.

@Dhyfer1
Copy link

Dhyfer1 commented Aug 27, 2024

Check #4125. Users using GitHub action builds should test and report so that it can be merged.

Thanks. In the last build action the annoying password button no longer appears above the keyboard. I hope the fix will come to the latest stable and beta version soon.

@agnostic-apollo
Copy link
Member

Welcome. Should be available in next beta at least.

@indrastorms
Copy link

Welcome. Should be available in next beta at least.

In that case the base branch of the pr should be 119.beta. right?

@agnostic-apollo
Copy link
Member

Master branch is where everything gets pushed for final release, beta branches pick and patch commits from master branch before release.

@indrastorms
Copy link

Master branch is where everything gets pushed for final release, beta branches pick and patch commits from master branch before release.

Why its opposite? Commits should be merge on beta branch first to test all are working with other commits which isn't pushed to master.

@agnostic-apollo
Copy link
Member

All the development is done on master branch, anything I push there is thoroughly tested, beta in the termux app's context means that features are not final and not ready for release and may change, not that they are unstable. Beta branches were never used before, it was only used for last release with specific commits picked from master branch and certain features disabled with patch commits that were not ready for release.

@indrastorms
Copy link

All the development is done on master branch, anything I push there is thoroughly tested, beta in the termux app's context means that features are not final and not ready for release and may change, not that they are unstable. Beta branches were never used before, it was only used for last release with specific commits picked from master branch and certain features disabled with patch commits that were not ready for release.

Oh.. then it's more like a feat branch. But I'm using 119 so can't install 118 on top of it. 😞

@agnostic-apollo
Copy link
Member

You can install github debuggable apks with pm install -r -d to downgrade.

@indrastorms
Copy link

Thanks for the info.

iHe1u0 added a commit to iHe1u0/termux-app that referenced this issue Aug 28, 2024
…for usernames

- The AutoFill type and hints are no longer hardcoded in `TerminalView` class and `TermuxActivity` layout xml. They are dynamically set to required values before making a manual AutoFill request and reverted back afterwards to default values. The hardcoded value `AUTOFILL_TYPE_TEXT` returned by `getAutofillType()` was causing the AutoFill UI to show on Activity starts, this will return `AUTOFILL_TYPE_NONE` by default now so that AutoFill UI isn't shown automatically.
- The AutoFill importance is no longer hardcoded in `TermuxActivity` layout xml and is returned by `TerminalView` class itself by `getImportantForAutofill()`.
- The AutoFill function in `TermuxActivity` for making a manual AutoFill request is moved to `TerminalView` class. This and moving of hardcoded values to `TerminalView` class mentioned above is done as complete logic of AutoFill should be handled by `TerminalView` class itself and not scattered in various places.
- The Terminal context menu now supports AutoFilling a username. Note that GBoard/Google Password Manager seems to have a bug where it will still show `Pick a saved password` instead of username, even though `AUTOFILL_HINT_USERNAME` is being requested, however it will still AutoFill a username of selected entry correctly.
- Pressing the back button to close the keyboard will also cancel the current manually requested AutoFill request and UI will not show when keyboard is opened again.

Closes termux#3909
@h0tk3y
Copy link

h0tk3y commented Jan 22, 2025

As I use 1Password, I cannot filter the apps in the password manager, and I did not have the option to exclude Termux.

The "Open 1Password" popup was very annoying to me.

I managed to find another workaround: with Tasker, I disable (deselect) the autofill service in the system settings when Termux is focused and enable it back once another app becomes active.

The commands for ADB action in Tasker are:

settings delete secure autofill_service
settings put secure autofill_service com.onepassword.android/com.onepassword.android.autofill.services.AutofillService

This works but requires Tasker to have access to ADB over TCP.

I hope the fix for this issue is included in a release soon so I can ditch my workaround.

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

Successfully merging a pull request may close this issue.