Skip to content

fix(ui): add fallback for crypto.randomUUID in non-secure contexts#132

Closed
ratulsarna wants to merge 1 commit intoopenclaw:mainfrom
ratulsarna:fix/crypto-uuid-http-fallback
Closed

fix(ui): add fallback for crypto.randomUUID in non-secure contexts#132
ratulsarna wants to merge 1 commit intoopenclaw:mainfrom
ratulsarna:fix/crypto-uuid-http-fallback

Conversation

@ratulsarna
Copy link
Contributor

Summary

  • Adds fallback UUID generator for HTTP contexts where crypto.randomUUID() is unavailable
  • Uses crypto.getRandomValues() which works in all contexts

Fixes #131

Test plan

  • Tested on http://100.x.x.x:18789 (Tailscale IP) - connects successfully
  • Verified UUID generation produces valid v4 UUIDs

🤖 Generated with Claude Code

@steipete
Copy link
Contributor

steipete commented Jan 3, 2026

Hi ratulsarna! Thanks for the PR! Where is this needed?

@steipete steipete added the question Further information is requested label Jan 3, 2026
@ratulsarna
Copy link
Contributor Author

Hi ratulsarna! Thanks for the PR! Where is this needed?

Accessing the web UI via Tailscale IP over HTTP (e.g., http://100.x.x.x:18789).

crypto.randomUUID() requires a secure context (HTTPS/localhost), so the UI fails to connect when accessed this way. The fallback uses crypto.getRandomValues() which works everywhere.

Happy to close if HTTPS is the expected setup for remote access.

crypto.randomUUID() requires HTTPS/localhost. When accessing the web UI
via HTTP (e.g., Tailscale or LAN IP), the browser throws an error.

Uses crypto.getRandomValues() as a fallback, which works in all contexts.

Fixes #131

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@ratulsarna ratulsarna force-pushed the fix/crypto-uuid-http-fallback branch from 4d1f595 to 3630652 Compare January 3, 2026 13:19
@ratulsarna
Copy link
Contributor Author

Closing this for now, shouldn't have relied on Opus. It missed a few things.

@ratulsarna ratulsarna closed this Jan 3, 2026
dgarson referenced this pull request in dgarson/clawdbot Feb 7, 2026
* feat: comprehensive refactoring and primitives proposals for later evaluation

* Evaluate design proposals and add md

* push readme

* feat: gemini pro assessment
slathrop referenced this pull request in slathrop/openclaw-js Feb 11, 2026
- Extract resolveRawHomeDir and gate resolveEffectiveHomeDir through path.resolve()
- Update resolveRequiredHomeDir to resolve process.cwd() fallback
- Fix shortenMeta: remove colon split that conflicts with Windows drive letters
- Update test assertions to use path.resolve() for expected values

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
slathrop referenced this pull request in slathrop/openclaw-js Feb 11, 2026
Tasks completed: 2/2
- Task 1: ChatType unification dm -> direct (#126)
- Task 2: Windows paths + cross-platform tests (#127, #132, #133)

Phase 13 complete (11/11 plans).

SUMMARY: .planning/phases/13-paths-config-refactoring/13-11-SUMMARY.md
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

question Further information is requested

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Web UI fails to connect over HTTP (non-HTTPS)

2 participants