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
Since #3345 merged on 2026-05-15, codec server requests fail to reach the configured endpoint when the endpoint URL has path segments and no trailing slash.
…relies on URL resolution, which treats the last path segment of endpoint as a "filename" and discards it. The previous code (endpoint + `/${type}` ) did not have this behavior. v2.47.0 (last tagged) is fine; the regression only affects deployments tracking main, including cloud.temporal.io.
Result: a configured endpoint of https://example.com/v1/api/codec is requested as https://example.com/v1/api/decode, returning 404 (no CORS headers), surfaced in the UI as "Codec Server could not connect."
Verified in the production cloud.temporal.io bundle today — the chunk containing preserveStorageRefs uses the new URL(...) form. Same browser, four URL-resolution variants:
endpoint
new URL('decode', endpoint)
https://example.com/v1/api/codec
https://example.com/v1/api/decode ❌
https://example.com/v1/api/codec/
https://example.com/v1/api/codec/decode ✅
https://example.com/v1/api/codec/x
https://example.com/v1/api/codec/decode ✅
(old) endpoint + '/' + 'decode'
https://example.com/v1/api/codec/decode ✅
To Reproduce
Run a codec server with /decode and /encode mounted under a non-root path, e.g. https://example.com/v1/api/codec/decode.
In Temporal Cloud → Settings → Codec Server, set the endpoint to https://example.com/v1/api/codec (no trailing slash). The settings page strips any trailing slash you add, so this is the only saveable form.
Open any encrypted workflow.
Expected behavior
The UI requests https://example.com/v1/api/codec/decode and decodes payloads (behavior in v2.47.0 and earlier).
Actual behavior
The UI requests https://example.com/v1/api/decode → 404 → CORS preflight failure → "Codec Server could not connect" banner.
Workaround for users today: configure the endpoint with a meaningless trailing segment, e.g. https://example.com/v1/api/codec/x. new URL('decode', '…/codec/x') resolves to …/codec/decode correctly. This isn't discoverable and is a temporary hack.
Suggested fix — either preserve the previous semantics with string concat:
The first form is closer to the docs' mental model ("endpoint + /decode") and to the v2.47.0 behavior. Either fix should also be applied to wherever the namespace-settings page (and the per-browser codec popover) strips trailing slashes on save — if those didn't strip the slash, the bug would have a self-service workaround.
Describe the bug
Since #3345 merged on 2026-05-15, codec server requests fail to reach the configured endpoint when the endpoint URL has path segments and no trailing slash.
The new code in
src/lib/services/data-encoder.ts:…relies on URL resolution, which treats the last path segment of
endpointas a "filename" and discards it. The previous code (endpoint + `/${type}`) did not have this behavior. v2.47.0 (last tagged) is fine; the regression only affects deployments trackingmain, includingcloud.temporal.io.Result: a configured endpoint of
https://example.com/v1/api/codecis requested ashttps://example.com/v1/api/decode, returning 404 (no CORS headers), surfaced in the UI as "Codec Server could not connect."Verified in the production
cloud.temporal.iobundle today — the chunk containingpreserveStorageRefsuses thenew URL(...)form. Same browser, four URL-resolution variants:new URL('decode', endpoint)https://example.com/v1/api/codechttps://example.com/v1/api/decode❌https://example.com/v1/api/codec/https://example.com/v1/api/codec/decode✅https://example.com/v1/api/codec/xhttps://example.com/v1/api/codec/decode✅endpoint + '/' + 'decode'https://example.com/v1/api/codec/decode✅To Reproduce
/decodeand/encodemounted under a non-root path, e.g.https://example.com/v1/api/codec/decode.https://example.com/v1/api/codec(no trailing slash). The settings page strips any trailing slash you add, so this is the only saveable form.Expected behavior
The UI requests
https://example.com/v1/api/codec/decodeand decodes payloads (behavior in v2.47.0 and earlier).Actual behavior
The UI requests
https://example.com/v1/api/decode→ 404 → CORS preflight failure → "Codec Server could not connect" banner.Desktop
cloud.temporal.io, build post-2.47.0 (bundle containspreserveStorageRefsfrom DT-3751 - download external payloads #3345).Additional context
Workaround for users today: configure the endpoint with a meaningless trailing segment, e.g.
https://example.com/v1/api/codec/x.new URL('decode', '…/codec/x')resolves to…/codec/decodecorrectly. This isn't discoverable and is a temporary hack.Suggested fix — either preserve the previous semantics with string concat:
…or normalize to a trailing slash before resolving:
The first form is closer to the docs' mental model ("endpoint + /decode") and to the v2.47.0 behavior. Either fix should also be applied to wherever the namespace-settings page (and the per-browser codec popover) strips trailing slashes on save — if those didn't strip the slash, the bug would have a self-service workaround.
cc @rossedfort (author of #3345).