chia-blockchain: Optional[Credential] = keyring.get_credential(keychain_service, current_user) -> AttributeError: 'NoneType' object has no attribute 'get_credential'

OS: Freebsd 13.1(TrueNAS), using a jail

I currently have 1.5.0 working in this jail and wanted to update to the latest, so I created a new directory and cloned the latest release and did the following build steps. When I try to start the services and enter my passphrase I get this traceback. In the previous 1.5.0 install the passphrase seems to work correctly and I do not get this traceback. I’m not sure if I’m missing a step because it’s freebsd or if this is a bug, kinda seems like a bug to me?

Build steps:

  1. git clone https://github.com/Chia-Network/chia-blockchain.git -b latest
  2. cd chia-blockchain
  3. python3 -m venv venv
  4. source venv/bin/activate
  5. pip install --upgrade pip
  6. pip install clvm-tools-rs maturin (also tried clvm-tools-rs==0.1.19)
  7. bash ./install.sh
  8. chia init

CMD: chia start farmer

Traceback (most recent call last):
  File "/root/chia-1.5.1v2/chia-blockchain/venv/bin/chia", line 8, in <module>
    sys.exit(main())
  File "/root/chia-1.5.1v2/chia-blockchain/chia/cmds/chia.py", line 147, in main
    cli()  # pylint: disable=no-value-for-parameter
  File "/root/chia-1.5.1v2/chia-blockchain/venv/lib/python3.9/site-packages/click/core.py", line 829, in __call__
    return self.main(*args, **kwargs)
  File "/root/chia-1.5.1v2/chia-blockchain/venv/lib/python3.9/site-packages/click/core.py", line 782, in main
    rv = self.invoke(ctx)
  File "/root/chia-1.5.1v2/chia-blockchain/venv/lib/python3.9/site-packages/click/core.py", line 1259, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/root/chia-1.5.1v2/chia-blockchain/venv/lib/python3.9/site-packages/click/core.py", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/root/chia-1.5.1v2/chia-blockchain/venv/lib/python3.9/site-packages/click/core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "/root/chia-1.5.1v2/chia-blockchain/venv/lib/python3.9/site-packages/click/decorators.py", line 21, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/root/chia-1.5.1v2/chia-blockchain/chia/cmds/start.py", line 17, in start_cmd
    asyncio.run(async_start(root_path, config, group, restart, ctx.obj["force_legacy_keyring_migration"]))
  File "/usr/local/lib/python3.9/asyncio/runners.py", line 44, in run
    return loop.run_until_complete(main)
  File "/usr/local/lib/python3.9/asyncio/base_events.py", line 647, in run_until_complete
    return future.result()
  File "/root/chia-1.5.1v2/chia-blockchain/chia/cmds/start_funcs.py", line 68, in async_start
    if not await migrate_keys(root_path, True):
  File "/root/chia-1.5.1v2/chia-blockchain/chia/cmds/keys_funcs.py", line 221, in migrate_keys
    legacy_keyring = Keychain(force_legacy=True)
  File "/root/chia-1.5.1v2/chia-blockchain/chia/util/keychain.py", line 219, in __init__
    KeyringWrapper.get_legacy_instance() if force_legacy else KeyringWrapper.get_shared_instance()
  File "/root/chia-1.5.1v2/chia-blockchain/chia/util/keyring_wrapper.py", line 187, in get_legacy_instance
    return KeyringWrapper(force_legacy=True)
  File "/root/chia-1.5.1v2/chia-blockchain/chia/util/keyring_wrapper.py", line 115, in __init__
    if check_legacy_keyring_keys_present(legacy_keyring):
  File "/root/chia-1.5.1v2/chia-blockchain/chia/util/keyring_wrapper.py", line 58, in check_legacy_keyring_keys_present
    credential: Optional[Credential] = keyring.get_credential(keychain_service, current_user)
AttributeError: 'NoneType' object has no attribute 'get_credential'
Unclosed client session
client_session: <aiohttp.client.ClientSession object at 0x8047cdd00>
Unclosed client session
client_session: <aiohttp.client.ClientSession object at 0x8047cc0d0>

Some more info from the build if it helps?

Successfully built chia-blockchain aiohttp blspy chia-rs chiabip158 chiapos chiavdf cryptography PyYAML setproctitle zstd frozenlist
 multidict yarl pycryptodome argon2-cffi-bindings      Installing collected packages: zstd, sortedcontainers, dnslib, chia-rs, bitstring,
 zipp, watchdog, typing-extensions, setproctitle, PyYAML, pyparsing, pycryptodome, pycparser, portalocker, multidict, idna, frozenlist,
 filelock, dnspython, colorlog, colorama, click, chiavdf, chiapos, chiabip158, charset-normalizer, blspy, attrs, async-timeout, aiofiles,
 yarl, packaging, importlib-metadata, concurrent-log-handler, clvm, cffi, aiosqlite, aiosignal, keyring, cryptography, clvm-tools,
 argon2-cffi-bindings, aiohttp, argon2-cffi, keyrings.cryptfile, chia-blockchain

Successfully installed PyYAML-6.0 aiofiles-0.7.0 aiohttp-3.8.1 aiosignal-1.2.0 aiosqlite-0.17.0 argon2-cffi-21.3.0 
argon2-cffi-bindings-21.2.0 async-timeout-4.0.2 attrs-22.1.0 bitstring-3.1.9 blspy-1.0.13 cffi-1.15.1 charset-normalizer-2.1.1 
chia-blockchain-1.5.1 chia-rs-0.1.5 chiabip158-1.1 chiapos-1.0.10 chiavdf-1.0.6 click-7.1.2 clvm-0.9.7 clvm-tools-0.4.5 
colorama-0.4.5 colorlog-6.6.0 concurrent-log-handler-0.9.19 cryptography-36.0.2 dnslib-0.9.17 dnspython-2.2.0 
filelock-3.7.1 frozenlist-1.3.1 idna-3.3 importlib-metadata-4.12.0 keyring-23.6.0 keyrings.cryptfile-1.3.4 multidict-6.0.2 
packaging-21.3 portalocker-2.5.1 pycparser-2.21 pycryptodome-3.15.0 pyparsing-3.0.9 setproctitle-1.2.3 
sortedcontainers-2.4.0 typing-extensions-4.3.0 watchdog-2.1.9 yarl-1.8.1 zipp-3.8.1 zstd-1.5.0.4

Chia blockchain install.sh complete.
For assistance join us on Keybase in the #support chat channel:
https://keybase.io/team/chia_network.public

Try the Quick Start Guide to running chia-blockchain:
https://github.com/Chia-Network/chia-blockchain/wiki/Quick-Start-Guide

To install the GUI type 'sh install-gui.sh' after '. ./activate'.

Type '. ./activate' and then 'chia init' to begin.

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 15 (13 by maintainers)

Commits related to this issue

Most upvoted comments

Hi, quickfix linked.

I don’t know if this is breaking anything else but it works on Freebsd