anyproto / anyproto/anytype-cli

Cannot join a space with invite link via CLI; Cannot re-login

Open
#36 3 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Go
Stars
134
Forks
23
PR merge metrics
No merged PRs in 30d

Description

Have you read a contributing guide?
  • I have read CONTRIBUTING.md
  • I have searched the existing issues and didn't find any that were similar
  • I have considered creating a pull request with fixes instead of a bug report and want to proceed
Current Behavior
Cannot join any space with invite links:
✗ Failed to view invite: failed to view space invite: rpc error: code = DeadlineExceeded desc = context deadline exceeded
Cannot re-login:
⚠ Event stream error: rpc error: code = Internal desc = transport: SendHeader called multiple times
✗ Failed to log in: error waiting for account Id: timeout waiting for account Id: context deadline exceeded
Expected Behavior

Join the Anytype space per documentation

Steps To Reproduce
  1. Install anytype-cli (I tried both with the curl installer and make in the repo)
  2. Run the following commands in the terminal:
any auth status  
anytype
  ✗ Not logged in (credentials stored in keychain)
  - Active session: true
  - Session Token: eyJhbGci****
➜  ~ any service stop
\✓ anytype service stopped
➜  ~ any service start
✓ anytype service started
➜  ~ any auth status  
Not authenticated. Run 'anytype auth login' to authenticate or 'anytype auth create' to create a new account.
➜  ~ any auth create
✗ cannot create account: name argument required
➜  ~ any auth create vadymecum-bot
✓ Bot account created successfully!
⚠ IMPORTANT: Save your account key in a secure location. This is the ONLY way to authenticate your bot account.

╔═════════════════╗
║     BOT ACCOUNT KEY     ║
╠═════════════════╣
║  5Jwq9Q1m****Z0Zjg==  ║
╚═════════════════╝

📋 Bot Account Details:
   Name: vadymecum-bot
   Account Id: A8gbnzQH***ikh3hfE

✓ You are now logged in to your new bot account.
✓ Account key saved to keychain.
➜  ~ any space list
SPACE ID                                                                    NAME                           STATUS
────────                                                                    ────                           ──────
bafyreic***egey.173***0wes                                  Active
➜  ~ any service status
✓ anytype service is running
➜  ~ any space join https://invite.any.coop/bafybeib27o***pxpuxaq\#6WRQTx***NgcMS9f
✗ Failed to view invite: failed to view space invite: rpc error: code = DeadlineExceeded desc = context deadline exceeded
any auth status                                                                                                                                 
anytype
  ✓ Logged in to account A8gbnzQH***hfE (keychain)
  - Active session: true
  - Account Key: 5Jwq9Q1m****
  - Session Token: eyJhbGci****
➜  ~ any auth logout
⚠ Could not notify server: failed to get stored token: credentials not found
✓ Successfully logged out. Stored credentials removed.
➜  ~ any auth status
Not authenticated. Run 'anytype auth login' to authenticate or 'anytype auth create' to create a new account.
➜  ~ any auth login 
Enter account key: 
5Jwq9Q1****0Zjg==
⚠ Event stream error: rpc error: code = Internal desc = transport: SendHeader called multiple times

✗ Failed to log in: error waiting for account Id: timeout waiting for account Id: context deadline exceeded
Environment
- OS: macOS Tahoe 26.3.1 (25D2128)
- Version:
Anything else?

[!IMPORTANT]
Other observations:

1. Keychain entries contain password placeholders:

The anytype-cli uses github.com/zalando/go-keyring. When this library:

  1. Cannot find a native secrets provider (Keychain on macOS).
  2. Is compiled without CGO (which is required for the Security Framework bindings).
  3. Lacks the necessary entitlements/signing to access the Keychain.

it defaults to a mock implementation that simply prefixes the keys with "go-keyring-" and stores them as plain text or fails to write the actual secret value.

2. The executable is not properly signed

The codesign output (Signature=adhoc) shows that the executable was not signed with the developer certificate:

codesign -dvv /Users/milichev/.local/bin/anytype
Executable=/Users/milichev/.local/bin/anytype
Identifier=a.out
Format=Mach-O thin (arm64)
CodeDirectory v=20400 size=836734 flags=0x20002(adhoc,linker-signed) hashes=26145+0 location=embedded
Signature=adhoc
Info.plist=not bound
TeamIdentifier=not set
Sealed Resources=none
Internal requirements=none

Not sure, but this can be related.

Screenshots

Image Image

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the documented any space join and any auth login flows on macOS, including the any service lifecycle commands. Trace the CLI entry points for invite viewing and account authentication, then verify that joining succeeds and re-login completes without deadline, event-stream, or account-ID timeout errors.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
cli
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.