ValvePython / steamctl

🤸 Take control of Steam from your terminal
https://pypi.org/project/steamctl/
MIT License
307 stars 16 forks source link

Error running steamctl authenticator add #13

Closed DaVoodoo closed 4 years ago

DaVoodoo commented 4 years ago

I am running Windows 10.

I installed Python 3.8 and Cygwin and steam in python and steamctl in python.

Ultimately I want to create a qrcode to add to my Aegis Autenticator. I have steamguard setup on my phone. I therefore assume that I must add another one using steamctl authenticator add?

Can you please assist? I get the following error when I run the steamctl authenticator add command:

    :\Python38\Scripts>steamctl authenticator add --force voodoo_zn
    To add an authenticator, first we need to login to Steam
    Account name: xxxxxxx
    Enter password for 'xxxxxxx':
    Enter 2FA code: PJPDM
    Login successful. Checking pre-conditions...
    Traceback (most recent call last):
      File "c:\python38\lib\runpy.py", line 193, in _run_module_as_main
        return _run_code(code, main_globals, None,
      File "c:\python38\lib\runpy.py", line 86, in _run_code
        exec(code, run_globals)
      File "C:\Python38\Scripts\steamctl.exe\__main__.py", line 7, in <module>
      File "c:\python38\lib\site-packages\steamctl\__main__.py", line 53, in main
        rcode = cmd_func(args=args)
      File "c:\python38\lib\site-packages\steamctl\commands\authenticator\cmds.py", line 121, in cmd_authenticator_add
        sa.add()
      File "c:\python38\lib\site-packages\steam\guard.py", line 180, in add
        raise SteamAuthenticatorError("Failed to add authenticator. Error: %s" % repr(EResult(resp['status'])))
    steam.guard.SteamAuthenticatorError: Failed to add authenticator. Error: <EResult.DuplicateRequest: 29>

`

rossengeorgiev commented 4 years ago

Hi, there can only be one authenticator configured on a steam account. My guess is the response means there is already an authenticator configured. I'll test that out later.

You will need to remove your current steam guard, which will impose some restrictions on steam account, and run the add command. There will be prompt for whether you want to configure the app in parallel. It should let you have the same guard secrets in steamctl and the phone app.

DaVoodoo commented 4 years ago

Yes! I removed my current Steam Guard and ran the command again. This time it worked 100.

Thank you. much appreciated.

If possible, you can consider changing your code, so that when someone already has Steam Guard on his/her phone it would prompt you to remove it on the phone and not give an error.

rossengeorgiev commented 4 years ago

Did you set up with steamctl and steam app together? Just curious if it worked.

Great suggestion, a message for that situation is needed

DaVoodoo commented 4 years ago

Yes, I did run the setup with steamctl and steam together without a problem.

When you have included the enhancement I will also test for you. ;-)