You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[BUG] Storage adapter interface doesn't expose a way to detect storage availability before use, so SSR environments throw at import time #789
Importing the SDK in a server-side-rendering context (where window/localStorage don't exist) throws at module-evaluation time because the default storage adapter unconditionally references window.localStorage.
Component
storage
Steps to Reproduce
Import the SDK's browser entrypoint in a Node.js SSR context (e.g. a Next.js getServerSideProps function).
Observe the thrown error.
Compare against expected graceful behavior for SSR contexts.
Expected Behavior
The default storage adapter should lazily check for window/localStorage availability and fall back to a no-op/in-memory adapter in SSR contexts, rather than throwing at import time.
Actual Behavior
The SDK is unusable in any SSR-rendered path without the consumer manually guarding every import, which is a common and painful gotcha for Next.js/Remix integrators.
Environment
SDK version: 0.3.x
Node version: 20.x, 22.x
OS: macOS / Linux
Network: TESTNET
Code Example
// Not applicable — reproduced via API inspection, not a standalone snippet.
Error Output
ReferenceError: window is not defined
Difficulty
🟡 Medium
Additional Context
The default storage adapter references window.localStorage at module scope rather than lazily inside each method.
Activity