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 DID (See DID Formats for a detailed explanation.
.did) instead of the PKH DID (.pkhDid) when specifying the delegatee.Solution: Always use .pkhDid for user-to-user delegations:Space does not exist
Space does not exist
Symptom: Operations fail with “space does not exist” or “space not found” errors.Cause: The space has not been created, or
autoCreateSpace is not enabled.Solution: Either enable auto-creation or explicitly create the space:Session expired
Session expired
Symptom: Operations that previously worked now fail with authentication or session errors.Cause: The session TTL has been exceeded. TinyCloud sessions have a limited lifetime for security.Solution: Re-authenticate to obtain a new session:Consider implementing session refresh logic in your application to handle this gracefully.
WASM module not found
WASM module not found
Symptom: Import errors or runtime errors about missing WASM modules when using the SDK.Cause: The WASM package (The build order must be:
@tinycloudlabs/sdk-rs) was not built before the TypeScript wrappers.Solution: Rebuild in the correct order:@tinycloudlabs/sdk-rs(WASM artifacts)@tinycloudlabs/node-sdk-wasm/@tinycloudlabs/web-sdk-wasm(TypeScript wrappers)
Invalid private key
Invalid private key
Symptom: Session creation fails with “invalid private key” or key parsing errors.Cause: The private key is not in the expected format. It must be exactly 32 bytes (64 hexadecimal characters).Solution: Ensure the key is properly formatted:If generating a key programmatically, ensure you are using a cryptographically secure random source and outputting exactly 32 bytes.
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.Solution: Ensure the child path is a sub-path of the parent:
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.Solution: Set the child expiry to be equal to or earlier than the parent:
Sign request timed out
Sign request timed out
Symptom: Using the event-emitter signing strategy results in timeout errors.Cause: The sign request was emitted but no handler responded with a signature.Solution: Ensure you have a listener that handles sign requests:Common mistakes:
- Forgetting to call
request.respond() - Not awaiting the signature before responding
- Listener not registered before session creation
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