Skip to content

Subsequent invocation of malai when .malai.id52 is present crashes #80

@siddhantk232

Description

@siddhantk232

here are some logs

/tmp/foo $ ls -al
drwxr-xr-x   - user 19 Jun 23:18  .
drwxrwxrwt   - root 19 Jun 23:18  ..
.rwxr-xr-x 25M user 19 Jun 23:16  malai_linux_x86_64

/tmp/foo $ ./malai_linux_x86_64 http 3000 --public
Malai: Sharing http://127.0.0.1:3000 at
https://fmdmb0buadpvinh6bekf79mrvrt7hr1ihpgnutgttknqvq359d70.kulfi.site
To avoid the public proxy, run your own with: malai http-bridge

Or use: malai browse kulfi://fmdmb0buadpvinh6bekf79mrvrt7hr1ihpgnutgttknqvq359d70
^C
Malai: Sharing http://127.0.0.1:3000 at
https://fmdmb0buadpvinh6bekf79mrvrt7hr1ihpgnutgttknqvq359d70.kulfi.site

Or use: malai browse kulfi://fmdmb0buadpvinh6bekf79mrvrt7hr1ihpgnutgttknqvq359d70
Press ctrl+c again to exit.
^C⏎

/tmp/foo $ ls -al
drwxr-xr-x   - user 19 Jun 23:18  .
drwxrwxrwt   - root 19 Jun 23:18  ..
.rw-r--r--  52 user 19 Jun 23:18  .malai.id52
.rwxr-xr-x 25M user 19 Jun 23:16  malai_linux_x86_64

/tmp/foo $ ./malai_linux_x86_64 http 3000 --public
failed to get identity
malai uses your system keyring for storing identities securely.
use `malai keygen` if system keyring is not available.
full error:
keyring: secret for fmdmb0buadpvinh6bekf79mrvrt7hr1ihpgnutgttknqvq359d70 has invalid length: 54

Location:
    /home/runner/work/kulfi/kulfi/kulfi-utils/src/secret.rs:71:36

/tmp/foo $

EDIT: attaching trace logs:

2025-06-19T19:26:01.087433Z  INFO malai: Exposing HTTP service on kulfi. port=3000 host="127.0.0.1" verbose=Verbosity { verbose: 0, quiet: 0, phantom: PhantomData<clap_verbosity_flag::ErrorLevel> }
2025-06-19T19:26:01.087574Z  INFO read_or_create_key: kulfi_utils::secret: No secret key found in environment or file, trying .malai.id52
2025-06-19T19:26:01.087598Z DEBUG read_or_create_key: keyring: creating entry with service kulfi, user fmdmb0buadpvinh6bekf79mrvrt7hr1ihpgnutgttknqvq359d70, and no target
2025-06-19T19:26:01.087607Z DEBUG read_or_create_key: keyring: created entry SsCredential { attributes: {"username": "fmdmb0buadpvinh6bekf79mrvrt7hr1ihpgnutgttknqvq359d70", "target": "default", "application": "rust-keyring", "service": "kulfi"}, label: "fmdmb0buadpvinh6bekf79mrvrt7hr1ihpgnutgttknqvq359d70@kulfi:default (keyring v4.0.0-rc.1)", target: Some("default") }
2025-06-19T19:26:01.087613Z DEBUG read_or_create_key: keyring: get secret from entry SsCredential { attributes: {"username": "fmdmb0buadpvinh6bekf79mrvrt7hr1ihpgnutgttknqvq359d70", "target": "default", "application": "rust-keyring", "service": "kulfi"}, label: "fmdmb0buadpvinh6bekf79mrvrt7hr1ihpgnutgttknqvq359d70@kulfi:default (keyring v4.0.0-rc.1)", target: Some("default") }
failed to get identity
malai uses your system keyring for storing identities securely.
use `malai keygen` if system keyring is not available.
full error:
keyring: secret for fmdmb0buadpvinh6bekf79mrvrt7hr1ihpgnutgttknqvq359d70 has invalid length: 54

Location:
    /home/runner/work/kulfi/kulfi/kulfi-utils/src/secret.rs:71:36

Originally posted by @overflowz in #29

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions