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] /api/speed returns 400 "Serializer for class 'SpeedModeState' is not found" on v0.10.5 server (speed modes unusable over REST) #685
On the Docker/server build of Ketch v0.10.5 (ghcr.io/linroid/ketch, linux/arm64), GET /api/speed fails with HTTP 400:
{"error":"bad_request","message":"Serializer for class 'SpeedModeState' is not found.\nPlease ensure that class is marked as '@Serializable' and that the serialization compiler plugin is applied.\n","revision":null}
PUT /api/speed fails the same way (the response serializes the same state). So speed-mode control via REST is unusable against the server — which is what docs/api.md describes as the supported path: "Over REST: GET /api/speed and PUT /api/speed".
What makes this surprising (checked against the v0.10.5 tag)
SpeedModeState in library/api/.../SpeedModes.ktis@Serializable (line 49), and library/api/api/jvm/api.api shows the generated companion — so the plugin clearly ran for the defining module.
StreamSerializers registers subclass(Interest.SpeedMode::class), so the polymorphic interest type is known.
On the same native server binary, other call.respond(...) endpoints serialize fine — e.g. GET /api/status returns the full status JSON from the very same instance.
speedRoutes responds with modes.state() via call.respond(...) (Ktor content negotiation, runtime KClass serializer lookup). The lookup fails specifically for this type at runtime, which suggests the serializer is not reachable in the native-image configuration for this reflection-based path (or the state returned by SpeedModes.state() is an instance of a class other than the annotated one at runtime).
Related test exists: library/server/src/test/kotlin/com/linroid/ketch/server/RemoteSpeedModesTest.kt (JVM) — so this may pass tests but fail in the native binary.
Not sure whether amd64 native builds hit this too; happy to test on more environments if useful.
Activity