OSIS custom RPC methods not dispatching — blocks WASM login #113

Closed
opened 2026-04-12 16:07:58 +00:00 by mik-tf · 1 comment
Owner

Problem

All OSIS custom RPC methods return "Unknown method: Custom method 'X' not supported". This blocks the WASM login form which uses authservice.get_challenge and authservice.login via OSIS RPC.

Impact

  • WASM login page shows "Connection error. Please try again." — users cannot log in through the browser
  • hero_auth REST endpoint works fine (POST /hero_auth/ui/login), but the WASM app uses OSIS RPC instead
  • All OSIS custom methods are affected (AuthService, UserService, etc.)

Reproduction

# All methods fail — both via UI socket and socat bridge:
curl -s -X POST --unix-socket /root/hero/var/sockets/hero_osis/ui.sock \
  -H "Content-Type: application/json" \
  -d '{ "jsonrpc":"2.0", "method":"AuthService.get_challenge", "params":{"public_key":"admin"}, "id":1 }' \
  http://localhost/osis-rpc/root
# Returns: {"error":{"code":-32603,"message":"Unknown method: Custom method 'get_challenge' not supported"}}

# But hero_auth REST works:
curl -s -X POST --unix-socket /root/hero/var/sockets/hero_auth/rpc.sock \
  http://localhost/login -d "email=admin@hero.local&password=admin123"
# Returns: {"access_token": "..."}

Root Cause

OsisAppWrapper::handle_custom in hero_osis does not dispatch identity/auth domain methods. The rpc.discover lists all methods (AuthService, UserService, etc.) but the runtime handler rejects them.

Workaround Options

  1. Short-term: Change WASM login to use hero_auth REST (/hero_auth/ui/login) instead of OSIS RPC
  2. Long-term: Fix handle_custom in hero_osis to dispatch all registered domain methods
  • #111 (OSIS routing through proxy)
  • prompt.md noted "OSIS auth dispatch fix" in sessions 17-18, but the fix is not working

Signed-off-by: mik-tf

## Problem All OSIS custom RPC methods return "Unknown method: Custom method 'X' not supported". This blocks the WASM login form which uses `authservice.get_challenge` and `authservice.login` via OSIS RPC. ## Impact - **WASM login page shows "Connection error. Please try again."** — users cannot log in through the browser - hero_auth REST endpoint works fine (`POST /hero_auth/ui/login`), but the WASM app uses OSIS RPC instead - All OSIS custom methods are affected (AuthService, UserService, etc.) ## Reproduction ```bash # All methods fail — both via UI socket and socat bridge: curl -s -X POST --unix-socket /root/hero/var/sockets/hero_osis/ui.sock \ -H "Content-Type: application/json" \ -d '{ "jsonrpc":"2.0", "method":"AuthService.get_challenge", "params":{"public_key":"admin"}, "id":1 }' \ http://localhost/osis-rpc/root # Returns: {"error":{"code":-32603,"message":"Unknown method: Custom method 'get_challenge' not supported"}} # But hero_auth REST works: curl -s -X POST --unix-socket /root/hero/var/sockets/hero_auth/rpc.sock \ http://localhost/login -d "email=admin@hero.local&password=admin123" # Returns: {"access_token": "..."} ``` ## Root Cause `OsisAppWrapper::handle_custom` in hero_osis does not dispatch identity/auth domain methods. The `rpc.discover` lists all methods (AuthService, UserService, etc.) but the runtime handler rejects them. ## Workaround Options 1. **Short-term**: Change WASM login to use hero_auth REST (`/hero_auth/ui/login`) instead of OSIS RPC 2. **Long-term**: Fix `handle_custom` in hero_osis to dispatch all registered domain methods ## Related - https://forge.ourworld.tf/lhumina_code/home/issues/111 (OSIS routing through proxy) - prompt.md noted "OSIS auth dispatch fix" in sessions 17-18, but the fix is not working Signed-off-by: mik-tf
Author
Owner

Reopening — the WASM login was worked around by switching to hero_auth REST (no longer uses OSIS RPC for login). But the underlying OSIS custom method dispatch is still broken.

This still affects:

  • AI Assistant conversation history — agent cannot persist conversations via OSIS
  • Any WASM island calling OSIS custom RPC methods

Root cause: hero_osis_server service-level dispatch does not route AuthService.get_challenge etc. to the identity domain handler. The handle_custom fix in hero_rpc (1cc7d8a) adds the override to OsisAppWrapper, but the OSIS UI proxies raw JSON-RPC to per-context sockets where the top-level dispatcher fails.

Signed-off-by: mik-tf

**Reopening** — the WASM login was worked around by switching to hero_auth REST (no longer uses OSIS RPC for login). But the underlying OSIS custom method dispatch is still broken. This still affects: - **AI Assistant conversation history** — agent cannot persist conversations via OSIS - **Any WASM island calling OSIS custom RPC methods** Root cause: `hero_osis_server` service-level dispatch does not route `AuthService.get_challenge` etc. to the identity domain handler. The `handle_custom` fix in hero_rpc (`1cc7d8a`) adds the override to `OsisAppWrapper`, but the OSIS UI proxies raw JSON-RPC to per-context sockets where the top-level dispatcher fails. Signed-off-by: mik-tf
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
lhumina_code/home#113
No description provided.