Can't autofill sudo commands

Orangutan
Orangutan
Community Member
edited June 2022 in Mac

I have went through the docs and am unable to autofill my password when using sudo commands.

I have a Mac login item, which also shows in Quick Access when Terminal or iTerm2 is focused.
Using the Universal Autofill shortcut prompts me to unlock.
1Password has the Automation permission for both Terminal.app and iTerm.app and the Accessibility permission.

When I use either the Universal Autofill shortcut or the autofill option in Quick Access at a sudo prompt in either Terminal or iTerm2, nothing happens, and when I hit enter after using the shortcut, I get "Sorry, try again.". I used sudo echo as a test command.


1Password Version: 8.8.0-119
OS Version: macOS 12.4

Comments

  • 1Lando
    1Lando
    Community Member

    I'm seeing a similar issue. It works in Terminal.app for me but it doesn't work in iTerm.app. I have also setup a Mac login item. However, 1Password never requests automation access to iTerm. So, under Security & Privacy > Privacy (Tab) > Automation > 1Password I only see a checkbox for Terminal and not iTerm. Following instructions in the same referenced docs I cannot get 1Password to request this automation access for iTerm.

  • 1Lando
    1Lando
    Community Member
    edited June 2022

    Maybe this will help. Looks like some sort of a silent rust error showing up in my logs when I try and autofill in iTerm2:

    ERROR 2022-06-07T01:43:56.302 tokio-runtime-worker(ThreadId(7)) [1P:op-desktop-autofill/src/macos.rs:114] active application did not have expected signature, aborting fill: DoesNotMatchTeam
    ERROR 2022-06-07T01:43:56.302 tokio-runtime-worker(ThreadId(7)) [1P:op-app/src/app/backend.rs:209] AppError at op-app/src/app/backend/autofill.rs:356:25
    AutoTypeError(GatheringActiveAppInfoFailed)
    
    Stack backtrace:
       0: backtrace::backtrace::trace
       1: anyhow::backtrace::capture::Backtrace::capture
       2: anyhow::error::<impl anyhow::Error>::new
       3: <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll
       4: <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll
       5: tokio::runtime::task::harness::poll_future
       6: tokio::runtime::task::harness::Harness<T,S>::poll
       7: std::thread::local::LocalKey<T>::with
       8: tokio::runtime::thread_pool::worker::Context::run_task
       9: tokio::runtime::thread_pool::worker::Context::run
      10: tokio::macros::scoped_tls::ScopedKey<T>::set
      11: tokio::runtime::thread_pool::worker::run
      12: <tokio::runtime::blocking::task::BlockingTask<T> as core::future::future::Future>::poll
      13: tokio::runtime::task::harness::Harness<T,S>::poll
      14: tokio::runtime::blocking::pool::Inner::run
      15: std::sys_common::backtrace::__rust_begin_short_backtrace
      16: core::ops::function::FnOnce::call_once{{vtable.shim}}
      17: std::sys::unix::thread::Thread::new::thread_start
      18: __pthread_deallocate
    
  • Orangutan
    Orangutan
    Community Member

    This sounds like iTerm isn't signed as expected which is a different issue to what I was experiencing since I can't get it to work in Terminal.app either and the Automation prompt showed for both. Might be worth making another thread for your issue to avoid it getting lost? Unless it's a 1Password verification bug, I think reinstalling iTerm might help.

  • 1Lando
    1Lando
    Community Member

    Yeah, definitely tried reinstalling iTerm. After that, I also tried installing it again using brew, just to see if it would make a difference. Curious if your logs say anything. Based on 1Password documentation if you're running on mac you can find them at: ~/Library/Group Containers/2BUA8C4S2C.com.1password/Library/Application Support/1Password/Data/logs

  • Orangutan
    Orangutan
    Community Member

    Thanks, looks like I have the same error when using iTerm, but not with Terminal.app, which gives a different set of logs:

    INFO tokio-runtime-worker(ThreadId(52)) [swift] Brain.swift:447 :: collectPageDetails(fastCollection:prettyPrint:) | @Autofill: Collecting from pid(22848)
    INFO tokio-runtime-worker(ThreadId(52)) [swift] Brain.swift:344 :: collectTerminalElement(app:) | @Autofill: Collecting a terminal app
    INFO tokio-runtime-worker(ThreadId(52)) [swift] Brain.swift:371 :: collectTerminalElement(app:) | @Autofill: Terminal in echo mode, filling disabled
    INFO tokio-runtime-worker(ThreadId(3)) [1P:op-desktop-autofill/src/macos.rs:160] Nothing to be filled
    INFO tokio-runtime-worker(ThreadId(3)) [1P:op-desktop-autofill/src/macos.rs:168] Active app is a terminal; not trying to fill more than once
    INFO tokio-runtime-worker(ThreadId(3)) [1P:op-desktop-autofill/src/macos.rs:177] Done filling
    

    I don't really have a guess for what "echo mode" could be referring to.

  • 1Lando
    1Lando
    Community Member

    Probably means that if it were to autofill the password, it would be immediately visible (like maybe it isn't on a hidden password field or something). That would be my guess. Good to know that our iTerm issue is the same however.

  • Orangutan
    Orangutan
    Community Member

    Probably means that if it were to autofill the password, it would be immediately visible (like maybe it isn't on a hidden password field or something)

    Entering the password manually hides it as expected and Secure Keyboard Entry is enabled, although maybe it could be incorrectly checking these.

  • 1Lando
    1Lando
    Community Member

    They closed the thread I opened about this and are going to handle it over email. I will update this post here after resolution in case it is helpful to you too: https://1password.community/discussion/130658/1password-8-silent-rust-error-when-trying-to-autofill-in-iterm2

  • Thank you @1Lando. Our specialists look forward to resolving this for you.

  • Orangutan
    Orangutan
    Community Member

    @PeterG_1P Do you know what I can do to debug the issue affecting Terminal.app (logs)?

  • Alvin.L_1P
    edited June 2022

    Hey @Orangutan:

    I apologize for the trouble you've experienced with filling in Terminal and iTerm. Can you send us a diagnostics report from your Mac?

    Attach the diagnostics to an email message addressed to support+forum@1password.com . With your email please include:

    You should receive an automated reply from our BitBot assistant with a Support ID number. Please post that number here. Thanks very much!

    Alvin

  • Orangutan
    Orangutan
    Community Member

    @Alvin.L_1P My support ID is #FDF-37188-266.

  • Thanks so much @Orangutan ! I've located the ticket - one of my colleagues will be in contact with you as soon as possible.

    ref: FDF-37188-266

  • jberglinds
    jberglinds
    Community Member

    Would just like to chime in and say that I have the same problem with autofill not working with sudo or in system dialogs.
    Security & Privacy pane does not contain 1password at all for me under Automation. I found the same error with the signature in my logs.

  • 1Lando
    1Lando
    Community Member
    edited June 2022

    I received a reply in my email thread regarding the rust error that I was getting that they don't have a fix yet and to keep an eye out in future releases. Just wanted to provide the update for the rest of the folks here that may be experiencing the same issue in case they are wondering.

    Hopefully they will get this resolved soon as this is documented as a working feature for 1Password 8. Sounds like there may be a decent amount of other users who are experiencing the same issue.

  • 1Lando
    1Lando
    Community Member

    Just updated to the latest beta that was released today. Looks like the rust error I was seeing has now been resolved. Good deal!

  • Thank you for letting us know, @1Lando. Most gratifying! 🙌

  • caterpillar791
    caterpillar791
    Community Member

    Hi, I had no issues (Terminal in echo mode) when I first updated to 1Password 8, but a few days later, iTerm and Terminal no longer autofilled my password. I updated to the beta, 8.8.0, 80800165 and it started working again like described above.

    Well, today, it stopped working WITH the Beta. I tried reinstalling everything all over again, and I still get the same error. (Terminal in echo mode)

    Any ideas? Why would it start working and then stop? Thank you.

    INFO  2022-07-06T07:12:19.287 tokio-runtime-worker(ThreadId(111)) [swift] Brain.swift:449 :: collectPageDetails(fastCollection:prettyPrint:) | @Autofill: Collecting from pid(950)
    INFO  2022-07-06T07:12:19.294 tokio-runtime-worker(ThreadId(111)) [swift] Brain.swift:346 :: collectTerminalElement(app:) | @Autofill: Collecting a terminal app
    INFO  2022-07-06T07:12:19.309 tokio-runtime-worker(ThreadId(111)) [swift] Brain.swift:373 :: collectTerminalElement(app:) | @Autofill: Terminal in echo mode, filling disabled
    INFO  2022-07-06T07:12:19.309 tokio-runtime-worker(ThreadId(8)) [1P:op-desktop-autofill/src/macos.rs:153] Nothing to be filled
    INFO  2022-07-06T07:12:19.309 tokio-runtime-worker(ThreadId(8)) [1P:op-desktop-autofill/src/macos.rs:161] Active app is a terminal; not trying to fill more than once
    INFO  2022-07-06T07:12:19.309 tokio-runtime-worker(ThreadId(8)) [1P:op-desktop-autofill/src/macos.rs:170] Done filling
    
This discussion has been closed.