Hero OS login fails — auth methods not registered in hero_osis_openrpc #39

Open
opened 2026-02-26 23:36:28 +00:00 by mik-tf · 0 comments
Owner

Problem

In the production container, Hero OS login fails with:

Failed to get challenge: HTTP 405

Investigation

Socket path is NOT the issue

The socket path nesting (~/hero/var/sockets/root/hero_osis_openrpc.sock) is by design — both hero_osis_openrpc and hero_osis_http use the same {context}/ subdirectory convention. The full proxy chain works:

hero_os_http (8804) → hero_osis_http (8801) → unix socket → hero_osis_openrpc

All return proper JSON-RPC responses.

Real cause: AuthService methods not registered

rpc.discover reports 449 methods including AuthService.get_challenge, AuthService.login, etc. But calling them returns Method not found:

# Inside container:
curl -s -X POST http://127.0.0.1:8801/rpc/root \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","method":"AuthService.get_challenge","params":{"username":"admin"},"id":1}'
# → {"error":{"code":-32601,"message":"Method not found"}}

The AuthService methods exist in the OpenRPC schema/discovery spec but their handlers are not actually registered in hero_osis_openrpc. This means the auth domain needs to be connected to actual implementations.

Frontend also uses wrong method name

The hero_os_ui auth island calls identity.getChallenge but the schema defines it as AuthService.get_challenge. Even once the backend registers the handlers, the frontend method name needs to match.

Impact

No login possible in the production container. All other RPC methods work correctly through the proxy chain.

  • hero_services PR #34 (production container)
  • hero_services PR #38 (WASM frontend, merged)
## Problem In the production container, Hero OS login fails with: > Failed to get challenge: HTTP 405 ## Investigation ### Socket path is NOT the issue The socket path nesting (`~/hero/var/sockets/root/hero_osis_openrpc.sock`) is **by design** — both `hero_osis_openrpc` and `hero_osis_http` use the same `{context}/` subdirectory convention. The full proxy chain works: ``` hero_os_http (8804) → hero_osis_http (8801) → unix socket → hero_osis_openrpc ``` All return proper JSON-RPC responses. ### Real cause: AuthService methods not registered `rpc.discover` reports 449 methods including `AuthService.get_challenge`, `AuthService.login`, etc. But calling them returns `Method not found`: ```bash # Inside container: curl -s -X POST http://127.0.0.1:8801/rpc/root \ -H "Content-Type: application/json" \ -d '{"jsonrpc":"2.0","method":"AuthService.get_challenge","params":{"username":"admin"},"id":1}' # → {"error":{"code":-32601,"message":"Method not found"}} ``` The AuthService methods exist in the OpenRPC schema/discovery spec but their handlers are not actually registered in hero_osis_openrpc. This means the auth domain needs to be connected to actual implementations. ### Frontend also uses wrong method name The hero_os_ui auth island calls `identity.getChallenge` but the schema defines it as `AuthService.get_challenge`. Even once the backend registers the handlers, the frontend method name needs to match. ## Impact No login possible in the production container. All other RPC methods work correctly through the proxy chain. ## Related - hero_services PR #34 (production container) - hero_services PR #38 (WASM frontend, merged)
mik-tf changed title from Hero OS login fails — osis socket path nesting prevents RPC proxy to Hero OS login fails — auth methods not registered in hero_osis_openrpc 2026-02-26 23:50:20 +00:00
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/hero_services#39
No description provided.