Help transferring items from iCloud Keychain

JDail
JDail
Community Member

Hi,
I’m trying to transfer everything from iCloud keychain, to 1password. I’m not having very good luck. I’m using 1password 7.7, beta 10, macOS Catalina, and The tools offered by MRC converter sweet.
When I attempt to run the script to get Safari 12 passwords, I get an error. The text of the error varies.
Can anyone assist me?

«1

Comments

  • MrC
    MrC
    Volunteer Moderator

    @JDail

    Be sure to 1) let the script start Safari by itself, and 2) allow the script to finish before you interact with your system.

  • JDail
    JDail
    Community Member

    ok, as a VoiceOver user, how will I know when the script has finished running? what does it mean, when my list of passwords is displayed?

  • MrC
    MrC
    Volunteer Moderator
    edited October 2020

    @JDail

    I'm sorry, I don't know much about VoiceOver, nor its capabilities / requirements.

    Can you explain what you mean by "my list of passwords is displayed" - not sure I know where you're at.

  • JDail
    JDail
    Community Member

    Basically, The process goes something like this: step one: I open the script, and tell it to run, by pressing command plus the letter R on my keyboard
    Step two: Safari opens, as does system preferences, showing my list of passwords.
    Step three: I am prompted to enter my admin password for the computer, and do so. The script Typically fails at this point.

  • MrC
    MrC
    Volunteer Moderator

    @JDail

    Can you give me more detail on the last part your describe as "The script Typically fails at this point.". I need exact error messages.

    Many people have used the script, so I know it works. That's not to say there aren't cases where it could fail - we just need to learn what those are, and I need your help to help you.

  • JDail
    JDail
    Community Member

    Hi,
    I just tried to export from keychiain, using my new m1 mac, & guess what?
    I got an error.

    The error was:

    System Events got an error: Can’t get scroll area 1 of group 1 of group 1 of window "Passwords" of application process "Safari". Invalid index.

    What does that mean?

  • MrC
    MrC
    Volunteer Moderator
    edited February 2021

    @JDail

    The script is trying to access the list of passwords - it (AppleScript) does this by referencing the "stuff" you see in the passwords dialog. That stuff, technically, is a list of nested "objects", and the script has to reference one inside another, inside another, etc.

    This can fail for two reasons:

    1. You are using your system or Safari while the script is running (don't do this - let the script run to completion as soon as you enter the password to allow it to access the list

    2. Your macOS' language is non-English. One person reported this, and the solution was to change macOS' settings to use English. I have not tested or worked out the issues for non-English language systems (the script references English-named dialog titles, settings areas, etc.).

    I just tested the script with VoiceOver enabled, and it worked fine. Annoyingly chatty, but fine.

    I know of no other reason why the script should fail with the error message you report.

    Watch the video of how it works (VoiceOver is disabled).

  • JDail
    JDail
    Community Member

    The screen prior to being asked to open the password list, has a continue button. As soon as I click that, the script fails. My MacOS version is set to English, and I’m not using Safari while the script is running.

  • JDail
    JDail
    Community Member

    Also, the video does not have any sound, which is not good for me, since I am visually impaired. Can you try to re-record the video, either by explaining what you’re doing, or using voiceover?

  • MrC
    MrC
    Volunteer Moderator
    edited February 2021

    @JDail

    You must enter your password before pressing the Continue button. Did you enter your password, and then press Continue, or the other way around?

    I'm not sure when I'd be able to re-create the video with non-visual explanations. I will be updating my documentation at some point to add instructions for this, but I've been a bit busy recently.

  • JDail
    JDail
    Community Member

    The dialogue with the continue button comes up first, I’m not sure how to reverse the process, or if there’s even a way to do it.

  • JDail
    JDail
    Community Member

    I just tried again, and got this error this time.

    Safari got an error: Connection is invalid.

  • MrC
    MrC
    Volunteer Moderator

    @JDail

    That's just the way it has to work. The AppleScript is the frontmost app, but it's controlling Safari beneath it. But you have to enter your password into Safari, and if the dialog was behind Safari's preferences, you'd never see it!

    It does ask you to unlock your passwords and press Continue when unlocked. I could better word that dialog.

  • MrC
    MrC
    Volunteer Moderator

    @JDail

    With VoiceOver enabled, I got that a few times too if I tried to re-run the script. Stop the script, Quit Safari, and then run the script. VoiceOver seems to be interfering.

  • JDail
    JDail
    Community Member

    OK, let me try some thing, there’s a way to access other dialog box is with voiceover. I’m going to try it right now, and will post back with the results

  • MrC
    MrC
    Volunteer Moderator

    You can use VoiceOver - just don't try to re-run the script once things get messed up. Quit Safari, wait for VoiceOver to calm down, and then you can run the script.

    @JDail

  • JDail
    JDail
    Community Member

    It took awhile, but here’s the new error that I just got.

    System Events got an error: AppleEvent timed out.

    I was able to enter my password, before hitting the continue button.

  • MrC
    MrC
    Volunteer Moderator
    edited February 2021

    How many password entries are in your Safari Passwords?

    VoiceOver does slow the script down quite a bit, and I'm wondering if that is causing the timeout.

    I don't believe I can control this timeout.

    @JDail

  • MrC
    MrC
    Volunteer Moderator

    Actually, @JDail , I may be able to increase the timeout, but I'll have to try that tomorrow.

  • JDail
    JDail
    Community Member

    It tried to tell me that it timed out, but it finally succeeded!

    So, it gave me an error about timing out, but it did actually work. See below.

    System Events got an error: AppleEvent timed out.

  • JDail
    JDail
    Community Member

    I have a little bit of vision, and the screen flashed, as it went down the list, and voiceover kept repeating the words password and dialogue really really fast, as the it moved down the list.

  • JDail
    JDail
    Community Member

    If you wanna test it with voiceover, once you change the length of time, enable voiceover, run the script, then when the dialogue with the word continue comes up, press VO f1 f1.
    Depending on how your keyboard is configured, you may need to include the function key, which is at the bottom left.
    So, press that command, then go to where it tells you to unlock passwords, do that, press the voiceover commands to display the dialogue list again, go back to the dialogue with the word continue, and press return to activate it, since it’s the default button.

  • MrC
    MrC
    Volunteer Moderator
    edited February 2021

    @JDail

    That sounds good! Just check that you have the first and last password entries in the newly created CSV file on your desktop. If you have those, then it got through the list.

    I've just updated my working copy of the script - the dialog will now say "Please move this dialog aside, unlock Safari's passwords, and press Continue only after they are unlocked. Once you press Continue, leave your Mac alone until the script completes."

    I'll test out increasing the timeout later.

  • JDail
    JDail
    Community Member

    Hello,
    On Tuesday of this week, Apple is going to assist me in changing my apple ID, by creating a new one.

    As a result, I need to get my 400+ items out of Keychain, & into 1password.
    The last time I tried to do this, some items were skipped. It's absolutely critical. That every item be transferred.
    Is there a way to ensure this transition occurs as smoothly as possible?

  • MrC
    MrC
    Volunteer Moderator
    edited May 2021

    Hi @JDail,

    Short of copying and pasting each item via Keychain Access, the best method I'm aware of is the Get_Safari12_Passwords converter script that you've used previously.

    I don't recall the details of the issues you had, nor what final results you obtained. I'll look through your threads to come back up to speed.

    Edit: I reviewed your posts, I recall now the issues. It was VoiceOver that was getting in the way, causing the script to take longer than the default AppleScript auto-timeout mechanism. I invested a little time trying a few options out, and those didn't pan out, and I had to get back to other things. I'll investigate more today.

  • JDail
    JDail
    Community Member

    Hi,
    Ok, thank you so much for taking the time to assist me with this issue.
    I greatly appreciate it!

  • Hi @MrC & @JDail,

    JDail had emailed us asking for help, we eventually figured out we should message you. JDail then sent me the link to this thread to add what I have seen. During my testing trying to navigate using VoiceOver I ran into the same the time out warning occurring and things falling apart with the importer after that.

    I would be happy to test anything or provide any help I can. If there was a way to give the process more time and prevent the time out that may resolve the issue.

  • MrC
    MrC
    Volunteer Moderator

    @JDail @Joshua_ag

    Working on this now...

  • MrC
    MrC
    Volunteer Moderator
    edited May 2021

    @JDail @Joshua_ag

    At the converter suite location, in the Custom folder, I've uploaded a test version of some new code for Get_Safar12_Passwords. Would you be willing to try it? Just download it, and replace current version.

    Some notes:

    1. I've eliminated the dialog that asks you to click Continue after entering your password - the script will now detect when you've entered it, by testing the contents of the dialog's UI elements. There are new prompts which should make this obvious.

    2. At the top of the script, you'll see a statement:

      set extractionTimeout to 30 * 60 -- 30 minutes
      

      This is the timeout that should be used to control how long Safari can run (if I've coded this correctly). You can change the 30 to something larger. Joshua_ag mentioned that his 400 entries took about 84 minutes when VoiceOver was enabled, so maybe use this as a gauge. I have no idea how else to advise here, as my extraction runs full speed w/VoiceOver enabled. The voice messages are just cut abruptly for each entry, and there's no noticeable delay.

    3. Even with the above timeout set to a very small value, I'm still unable to reproduce an environment where I can get the script to fail using VoiceOver (since I don't have a large keychain), and all of my attempts at adding delays, or slowing down the script, have been fruitless in triggering the abort.

    4. You won't see an error anymore when the script times out on that final dialog that informs you the process is complete. The script will just silently terminate, and the dialog remains open until you close it.

    Hopefully this solves the issue for you.

  • MrC
    MrC
    Volunteer Moderator

    I've updated the Custom script. The update adds:

    1. a 2 second delay after Safari passwords are unlocked. Hopefully this is long enough for Safari to fill the table of passwords. I'll likely have to revisit this again
    2. logging to a file on your Desktop. See the top of the script to enable logging. No passwords will be output (only URLs and username values). The purpose of this is to present time stamps (in seconds since the start of script) indicating how long it takes to process Safari password row data.
This discussion has been closed.