Delegation failed: invalid delegatee
Delegation failed: invalid delegatee
Symptom: Creating a delegation fails with the error “Delegation failed: invalid delegatee” or similar validation error.Cause: You are using the session key DID (See DID Formats for a detailed explanation of the primary vs session DID behavior.
tc.sessionDid) instead of the primary DID (tc.did after signIn()) when specifying the delegatee. The server expects the delegatee to be the primary DID (e.g., did:pkh:eip155:{chainId}:{address} for Ethereum wallets), not session key format (did:key:z6Mk...).Solution: Use tc.did for user-to-user delegations. After signIn(), this returns the primary DID:Space does not exist
Space does not exist
Symptom: Operations fail with “space does not exist” or “space not found” errors after authentication.Cause: The space has not been created yet. This happens when If you have
autoCreateSpace is disabled, or when an extension hook (like TinyCloudStorage.afterSignIn) runs before the space creation step completes.Solution: Ensure the space exists before performing operations:autoCreateSpace disabled and need manual control, call ensureSpaceExists() explicitly before any data operations.Session expired
Session expired
Symptom: Operations that previously worked now fail with authentication or session errors. You may see
SESSION_EXPIRED or UNAUTHORIZED error codes.Cause: The session TTL has been exceeded. TinyCloud sessions have a limited lifetime for security.Solution: Detect expiry and re-authenticate:WASM module not found
WASM module not found
Symptom: Import errors or runtime errors about missing WASM modules when using the SDK. Common messages include The required build order is:
Cannot find module '@tinycloud/sdk-rs' or WebAssembly module not found.Cause: The WASM package (@tinycloud/sdk-rs) was not built before the TypeScript wrappers. The build order matters because the TypeScript packages depend on WASM artifacts that must exist first.Solution: Rebuild in the correct order:@tinycloud/sdk-rs— produces WASM artifacts@tinycloud/node-sdk-wasm— TypeScript wrapper (depends on step 1)@tinycloud/web-sdk-wasm— TypeScript wrapper (depends on step 1)
Cannot signIn() in session-only mode
Cannot signIn() in session-only mode
Symptom: Calling For the Web SDK, ensure the user has connected their wallet before calling
signIn() throws an error indicating that sign-in is not available, or that a private key is required.Cause: The TinyCloud instance was initialized without a privateKey (or without a connected wallet in the Web SDK). In session-only mode, there is no wallet available to sign the SIWE message that signIn() requires.Solution: Provide a private key when initializing the Node SDK:signIn().Share link has expired
Share link has expired
Sub-delegation rejected: path not within parent
Sub-delegation rejected: path not within parent
Symptom: Creating a sub-delegation fails with a path constraint error.Cause: The path specified in the child delegation is not within the parent’s path scope. The server enforces that sub-delegations can only narrow access, never widen it.Solution: Ensure the child path is a sub-path of the parent:See Capabilities for the full constraint rules.
Sub-delegation rejected: expiry exceeds parent
Sub-delegation rejected: expiry exceeds parent
Symptom: Creating a sub-delegation fails with an expiry constraint error.Cause: The child delegation’s expiry time is later than the parent’s expiry. Sub-delegations cannot outlive the capability they derive from.Solution: Set the child expiry to be equal to or earlier than the parent:
When specifying expiry, ensure the absolute timestamp is before the parent’s expiry. If the parent expires in 3 days, setting an expiry 7 days from now will fail.
Still Having Issues?
If your issue is not covered here:- Check the Capabilities and DID Formats concept pages for detailed explanations
- Verify your SDK version is up to date
- Review the server logs for more detailed error messages
- Ensure your wallet is connected to the expected network
- Join the TinyCloud Discord for community support