# Onlykey-cli refuse to work after restoring to a different key

**URL:** <https://onlykey.discourse.group/t/onlykey-cli-refuse-to-work-after-restoring-to-a-different-key/1440>\
**Category:** Backup and Restore\
**Created:** [March 28, 2025, 7:13am UTC](https://onlykey.discourse.group/t/onlykey-cli-refuse-to-work-after-restoring-to-a-different-key/1440 "2025-03-28T07:13:08Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![goumao](https://avatars.discourse-cdn.com/v4/letter/g/43a26b/32.png) [@goumao](https://onlykey.discourse.group/u/goumao)\
**Post date:** [March 28, 2025, 7:13am UTC](https://onlykey.discourse.group/t/onlykey-cli-refuse-to-work-after-restoring-to-a-different-key/1440/1 "2025-03-28T07:13:08Z")

</div>

step to reproduce the issue:

- on macos, plugin key A,
- create backup, then unplug A
- plugin key B, then restore from the backup
- run `onlykey-cli credential ls`, then got error below.
- unplug key B, plug key A, run `onlykey-cli credential ls`, then also got error below.

```auto
Traceback (most recent call last):
  File "/Users/me/.local/bin/onlykey-cli", line 8, in <module>
    sys.exit(main())
             ~~~~ ^^
  File "/Users/me/.local/pipx/venvs/onlykey/lib/python3.13/site-packages/onlykey/cli.py", line 1196, in main
    cli()
    ~~~^^
  File "/Users/me/.local/pipx/venvs/onlykey/lib/python3.13/site-packages/onlykey/cli.py", line 520, in cli
    solo.cli.key()
    ~~~~~~~~~~~~ ^^
  File "/Users/me/.local/pipx/venvs/onlykey/lib/python3.13/site-packages/click/core.py", line 1161, in __call__
    return self.main(*args, **kwargs)
           ~~~~~~~~~ ^^^^^^^^^^^^^^^^^
  File "/Users/me/.local/pipx/venvs/onlykey/lib/python3.13/site-packages/click/core.py", line 1082, in main
    rv = self.invoke(ctx)
  File "/Users/me/.local/pipx/venvs/onlykey/lib/python3.13/site-packages/click/core.py", line 1697, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
                           ~~~~~~~~~~~~~~~~~~~~~~ ^^^^^^^^^
  File "/Users/me/.local/pipx/venvs/onlykey/lib/python3.13/site-packages/click/core.py", line 1697, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
                           ~~~~~~~~~~~~~~~~~~~~~~ ^^^^^^^^^
  File "/Users/me/.local/pipx/venvs/onlykey/lib/python3.13/site-packages/click/core.py", line 1443, in invoke
    return ctx.invoke(self.callback, **ctx.params)
           ~~~~~~~~~~ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/me/.local/pipx/venvs/onlykey/lib/python3.13/site-packages/click/core.py", line 788, in invoke
    return __callback(*args, **kwargs)
  File "/Users/me/.local/pipx/venvs/onlykey/lib/python3.13/site-packages/solo/cli/key.py", line 552, in cred_ls
    client = solo.client.find(serial, udp=udp)
  File "/Users/me/.local/pipx/venvs/onlykey/lib/python3.13/site-packages/solo/client.py", line 32, in find
    p.find_device(dev=raw_device, solo_serial=solo_serial)
    ~~~~~~~~~~~~~ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/me/.local/pipx/venvs/onlykey/lib/python3.13/site-packages/solo/devices/solo_v1.py", line 63, in find_device
    raise solo.exceptions.NonUniqueDeviceError
solo.exceptions.NonUniqueDeviceError

```

everything else works without problem with key B.  
I can use it to ssh/fido2 login etc..

---

<div class="post-metadata">

**Author:** ![t11](https://avatars.discourse-cdn.com/v4/letter/t/8e7dd6/32.png) [@t11](https://onlykey.discourse.group/u/t11)\
**Post date:** [March 31, 2025, 1:18pm UTC](https://onlykey.discourse.group/t/onlykey-cli-refuse-to-work-after-restoring-to-a-different-key/1440/2 "2025-03-31T13:18:27Z")

</div>

Are both keys running the latest firmware before backup/restore?

> **[Release OnlyKey 3.0.4 Firmware · trustcrypto/OnlyKey-Firmware](https://github.com/trustcrypto/OnlyKey-Firmware/releases/tag/v3.0.4-prod)**
>
> We are pleased to announce that the new production OnlyKey firmware is now available! For more information on upgrading OnlyKey firmware read guide here. This release includes:
> 
> Support for Authlit...

---

<div class="post-metadata">

**Author:** ![goumao](https://avatars.discourse-cdn.com/v4/letter/g/43a26b/32.png) [@goumao](https://onlykey.discourse.group/u/goumao)\
**Post date:** [March 31, 2025, 1:30pm UTC](https://onlykey.discourse.group/t/onlykey-cli-refuse-to-work-after-restoring-to-a-different-key/1440/3 "2025-03-31T13:30:34Z")

</div>

absolutely. I just bought it recently. I have checked the firmware.

---

<div class="post-metadata">

**Author:** ![goumao](https://avatars.discourse-cdn.com/v4/letter/g/43a26b/32.png) [@goumao](https://onlykey.discourse.group/u/goumao)\
**Post date:** [May 14, 2025, 3:53pm UTC](https://onlykey.discourse.group/t/onlykey-cli-refuse-to-work-after-restoring-to-a-different-key/1440/4 "2025-05-14T15:53:59Z")

</div>

any progress? 2 months passed.
