Converting from Avast Password Manager [mrc-converter-suite] [Solved]

Options
gidsiner
gidsiner
Community Member
edited June 2023 in Windows

Hello,
I'm getting an error when trying to convert my Avast passwords (program version 23.4.6062 (build 23.4.8118.783)) into 1Password. I'm using Windows 11. I followed the directions in the mc converter readme.html file. When I run:
perl convert.pl avastpasswords -v C:\Tools\avast.json

I get the following errors:
Uncaught exception from user code:
Error parsing time at C:/Strawberry/perl/lib/Time/Piece.pm line 598.
Time::Piece::strptime("Time::Piece", "2027-04--1", "%Y-%m-%d") called at C:/Tools/mrc-converter-suite/./Converters/Avastpasswords.pm line 211
Converters::Avastpasswords::parse_date_string(HASH(0x44549a0)) called at C:/Tools/mrc-converter-suite/./Converters/Avastpasswords.pm line 219
Converters::Avastpasswords::date2monthYear(HASH(0x44549a0)) called at C:/Tools/mrc-converter-suite/./Converters/Avastpasswords.pm line 85
Converters::Avastpasswords::ANON(HASH(0x44549a0), "expiry") called at C:/Tools/mrc-converter-suite/./MCS/Core.pm line 151
MCS::Core::normalize_records(MCS::Core=HASH(0x394f3c0), MCS::Generators::PUX=HASH(0x429bd58), "creditcard", ARRAY(0x394e9a0), HASH(0x394e988)) called at C:/Tools/mrc-converter-suite/./Converters/Avastpasswords.pm line 124
Converters::Avastpasswords::do_common(Converters::Avastpasswords=HASH(0x26b5438), HASH(0x39460a8), ARRAY(0x394e9a0), HASH(0x394e988), undef, "creditcard") called at C:/Tools/mrc-converter-suite/./Converters/Avastpasswords.pm line 178
Converters::Avastpasswords::process_json(Converters::Avastpasswords=HASH(0x26b5438), SCALAR(0x39460c0), HASH(0x39460a8), undef) called at C:/Tools/mrc-converter-suite/./Converters/Avastpasswords.pm line 111
Converters::Avastpasswords::import(Converters::Avastpasswords=HASH(0x26b5438), "C:\Tools\avast.json", undef) called at convert.pl line 200

Any ideas on what may be wrong? Thanks!

  • Gideon

1Password Version: N/A
Extension Version: N/A
OS Version: Windows 11 22H2
Browser:_ N/A

Comments

  • MrC
    MrC
    Volunteer Moderator
    Options

    @gidsiner ,

    Thanks for the report. I see the error:

    Time::Piece::strptime("Time::Piece", "2027-04--1", "%Y-%m-%d") called at C:/Tools/mrc-converter-suite/./Converters/Avastpasswords.pm line 211

    The data being passed is quite unexpected. Avast dates in the Credit Card entries in the export look like:

          "expirationDate" : {
            "day" : 1,
            "month" : 12,
            "year" : 2023
          },
    

    The converter just reassembles those day, month, year components into a Y-m-d format. It seems your day value is "-1". Can you find that entry in your JSON?

  • gidsiner
    gidsiner
    Community Member
    Options

    I'm sure I can. I can also just delete the credit cards from avast and then export there's only like 3 of them. Would that resolve the issue?

    Also, I just found a workaround like 5 minutes ago. For anyone else having issues. in Avast you can export to Chrome, so I just exported\imported to Chrome, then after it was done importing I exported from chrome and used that file to import into 1password. Probably worked since the avast chrome export strips the CC's out.

  • MrC
    MrC
    Volunteer Moderator
    Options

    @gidsiner

    If you would not mind confirming my suspicion, I can update the converter to handle that error condition. It's a simple fix, but don't want to update the code w/out confirmation that I've analyzed the data correctly.

  • gidsiner
    gidsiner
    Community Member
    Options

    sure no worries, you were absolutely correct. I did find the day = -1 in the json and changed it to day = 1. There were actually multiple CC entries with that in there. I ran the converter again and it worked with no errors this time. Not sure why Avast was giving a -1 as the day, but that's a them issue I supposed :)

  • MrC
    MrC
    Volunteer Moderator
    Options

    Ok, great, thanks @gidsiner .

    Perhaps the -1 is supposed to mean that no day component was present. Since the conversion is going into a 1Password Month/Year field, I'll update the converter to assume that -1 means no Day, perform the conversion, and there is will be no harm.

  • gidsiner
    gidsiner
    Community Member
    Options

    Sounds like a plan. You are awesome! Hopefully anyone else coming from avast won't have that same issue.

  • MrC
    MrC
    Volunteer Moderator
    Options

    @gidsiner

    I've posted the update to resolve the issue. Thanks again for your report, and thank you for your kind words.

    Enjoy 1Password!

This discussion has been closed.