Summary
On Windows PowerShell, the command generated by the SpacetimeDB website for linking a browser identity to a logged-in CLI identity fails with argument parsing errors.
This appears to be either:
- a Windows PowerShell quoting issue,
- a CLI parsing issue for
Identity reducer arguments,
- or a mismatch between the website-generated command and the current CLI behavior.
Environment
- OS: Windows
- Shell: Windows PowerShell
- Server: Maincloud
- Auth: logged in with
spacetime login
What I was trying to do
The SpacetimeDB website showed:
Web identity
c2000de7bf5eeb20c27b5f117e829af4b9edf7a628d844b8f665f960fb61aaec
It told me to run:
spacetime call scrabblebot connect_id '["0xc2000de7bf5eeb20c27b5f117e829af4b9edf7a628d844b8f665f960fb61aaec"]'
Then refresh the page.
Expected behavior
The website-generated command should successfully link the browser identity to the logged-in CLI identity.
Actual behavior
The command fails on Windows PowerShell.
Reproduction attempts
Attempt 1: website-generated command
spacetime call scrabblebot connect_id '["0xc2000de7bf5eeb20c27b5f117e829af4b9edf7a628d844b8f665f960fb61aaec"]'
This was first run inside a repo directory, which caused config interference.
Attempt 2: retried outside the repo with config disabled and explicit server
spacetime call --no-config --server maincloud scrabblebot connect_id '["0xc2000de7bf5eeb20c27b5f117e829af4b9edf7a628d844b8f665f960fb61aaec"]'
Attempt 3: tuple form with raw hex identity
spacetime call --no-config --server maincloud scrabblebot connect_id '[0xc2000de7bf5eeb20c27b5f117e829af4b9edf7a628d844b8f665f960fb61aaec]'
Attempt 4: tuple form with string identity
spacetime call --no-config --server maincloud scrabblebot connect_id '["c2000de7bf5eeb20c27b5f117e829af4b9edf7a628d844b8f665f960fb61aaec"]'
Errors
Error from running inside a repo with spacetime.json
PS C:\Users\nithi\OneDrive\Documents\Spacetimedb\spacetimedb-hack> spacetime call scrabblebot connect_id '["0xc2000de7bf5eeb20c27b5f117e829af4b9edf7a628d844b8f665f960fb61aaec"]'
WARNING: This command is UNSTABLE and subject to breaking changes.
Error: No such reducer OR procedure `scrabblebot` for database `bodega-blitz` resolving to identity `c200889899a001a3ec285a3e71b0fd47ee22c8609ecd8e9d3dced0fdb9ba740a`.
Here are some existing reducers:
- set_value
The database has no procedures.
Error from tuple/raw-hex attempt
PS C:\WINDOWS\system32> spacetime call --no-config --server maincloud scrabblebot connect_id '[0xc2000de7bf5eeb20c27b5f117e829af4b9edf7a628d844b8f665f960fb61aaec]'
WARNING: This command is UNSTABLE and subject to breaking changes.
Error: Invalid arguments provided for reducer `connect_id` for database `scrabblebot` resolving to identity `c20059ea92f3dd5003584374b76bf2c9910421c217314b7b260b6e7a63b6c511`.
The reducer has the following signature:
connect_id(web_identity: Identity)
Caused by:
0: Response text: invalid arguments for reducer connect_id: [0][0]: invalid arguments for function connect_id: [0][0]: [0][0]: invalid type: integer `0`, expected a formatted 256-bit integer at line 1 column 3
1: HTTP status client error (400 Bad Request) for url (https://maincloud.spacetimedb.com/v1/database/c20059ea92f3dd5003584374b76bf2c9910421c217314b7b260b6e7a63b6c511/call/connect_id)
Error from tuple/string attempt
PS C:\WINDOWS\system32> spacetime call --no-config --server maincloud scrabblebot connect_id '["c2000de7bf5eeb20c27b5f117e829af4b9edf7a628d844b8f665f960fb61aaec"]'
WARNING: This command is UNSTABLE and subject to breaking changes.
Error: Invalid arguments provided for reducer `connect_id` for database `scrabblebot` resolving to identity `c20059ea92f3dd5003584374b76bf2c9910421c217314b7b260b6e7a63b6c511`.
The reducer has the following signature:
connect_id(web_identity: Identity)
Caused by:
0: Response text: invalid arguments for reducer connect_id: [0][0]: invalid arguments for function connect_id: [0][0]: [0][0]: expected value at line 1 column 3
1: HTTP status client error (400 Bad Request)
Notes
- The browser page displayed the identity as:
c2000de7bf5eeb20c27b5f117e829af4b9edf7a628d844b8f665f960fb61aaec
- The page-generated command used:
["0xc2000de7bf5eeb20c27b5f117e829af4b9edf7a628d844b8f665f960fb61aaec"]
That mismatch may be relevant.
Suggestion
It would help if the website generated shell-specific commands, especially for Windows PowerShell, or documented the correct Identity argument format for spacetime call.
Summary
On Windows PowerShell, the command generated by the SpacetimeDB website for linking a browser identity to a logged-in CLI identity fails with argument parsing errors.
This appears to be either:
Identityreducer arguments,Environment
spacetime loginWhat I was trying to do
The SpacetimeDB website showed:
Web identity
c2000de7bf5eeb20c27b5f117e829af4b9edf7a628d844b8f665f960fb61aaecIt told me to run:
spacetime call scrabblebot connect_id '["0xc2000de7bf5eeb20c27b5f117e829af4b9edf7a628d844b8f665f960fb61aaec"]'Then refresh the page.
Expected behavior
The website-generated command should successfully link the browser identity to the logged-in CLI identity.
Actual behavior
The command fails on Windows PowerShell.
Reproduction attempts
Attempt 1: website-generated command
spacetime call scrabblebot connect_id '["0xc2000de7bf5eeb20c27b5f117e829af4b9edf7a628d844b8f665f960fb61aaec"]'This was first run inside a repo directory, which caused config interference.
Attempt 2: retried outside the repo with config disabled and explicit server
Attempt 3: tuple form with raw hex identity
Attempt 4: tuple form with string identity
Errors
Error from running inside a repo with
spacetime.jsonError from tuple/raw-hex attempt
Error from tuple/string attempt
Notes
That mismatch may be relevant.
Suggestion
It would help if the website generated shell-specific commands, especially for Windows PowerShell, or documented the correct
Identityargument format forspacetime call.