fix(webchat): include operator.read and operator.write in connect scopes#17127
fix(webchat): include operator.read and operator.write in connect scopes#17127brandonwise wants to merge 3 commits into
Conversation
bfc1ccb to
f92900f
Compare
|
Friendly bump 👋 — this fixes a regression in 2026.2.14 where the webchat UI shows 'missing scope: operator.read' errors. All CI checks are passing. Happy to address any feedback! |
|
It is great that you found the solution, thank you! |
1d72593 to
7eecadf
Compare
|
Thanks for the kind words, @zolag63! 🙏 The file is at The good news: You don't need to find or edit any files! Once this PR is merged into OpenClaw, you'll get the fix automatically with your next If you need the fix immediately before merge, you can either:
Hope that helps! 🦞 |
|
Just checking in — CI is green and this fixes the webchat scope regression from 2026.2.14. @zolag63 and others have confirmed it resolves their issue. Let me know if there's anything else needed for this to land! 🙌 |
confirmed this fixed it.. Thank You so much for this fix.. will close 16820 |
The webchat client was only requesting operator.admin, operator.approvals, and operator.pairing scopes. While operator.admin should semantically grant full access, the scope validation in server-methods.ts explicitly checks for operator.read/operator.write for READ_METHODS and WRITE_METHODS. This caused 'missing scope: operator.read' errors for webchat clients accessing the gateway, especially when accessing via LAN IP instead of localhost. Fixes openclaw#16820 Fixes openclaw#16862
7eecadf to
fa28b9d
Compare
|
Any update on having this PR merged? |
|
Hope this can be fixed soon! |
|
Any update on this? I've been hesitant to upgrade from .13 because this is still an open bug. |
|
Closing — will resubmit if needed. |
Problem
After the 2026.2.14 update, webchat clients accessing the gateway via LAN IP (not localhost) receive
missing scope: operator.readerrors for all RPC calls. This makes the web UI completely unusable.Reported in #16820 and #16862 with many affected users.
Root Cause
The webchat client was only requesting these scopes during connect:
operator.adminoperator.approvalsoperator.pairingWhile
operator.adminsemantically implies full access, the scope validation inserver-methods.tsexplicitly checks foroperator.readoroperator.writefor READ_METHODS and WRITE_METHODS sets:The admin scope check happens first and should return early, but there may be edge cases in the device pairing flow where scopes aren't properly propagated.
Fix
Explicitly include
operator.readandoperator.writein the webchat connect scopes. This ensures the client has the required scopes regardless of how they're stored/validated during the pairing flow.Testing
operator.admin)Fixes #16820
Fixes #16862
Greptile Summary
Added
operator.readandoperator.writeto webchat connect scopes to fix "missing scope: operator.read" errors when accessing gateway via LAN IP.cfd11295(2026-02-09), automaticoperator.admingrants were removed for security hardeningmessage-handler.ts:431for securityoperator.adminsemantically implies full access and has an early-return check atserver-methods.ts:117-119, the scope clearing in the pairing flow prevents it from being availableoperator.readandoperator.writeso they're present even if admin scope gets cleared during pairingConfidence Score: 5/5
cfd11295by explicitly requesting the necessary scopes. The change is minimal (adds 2 scope strings to an array), defensive (adds scopes that should be implied by operator.admin), and backward compatible (doesn't remove any existing scopes). No logic changes or architectural modifications.Last reviewed commit: 7eecadf