bug: dataplane client ignores SERVER_BASEPATH, so create/delete topic miss the subpath
Maintainers usually reply within 2 days
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 76/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- react, typescript
- Domain
- backend-api-design
Research direction
Start in frontend/src/app.tsx at the dataplane transport setup, then read getGrpcBasePath in frontend/src/config.ts and compare it with the working console.v1alpha1 client. Check how SERVER_BASEPATH affects the standalone UI's dataplane request URLs. Done means Create Topic, Delete Topic, and other dataplane RPCs include the configured prefix; verify with a request under /kafka.
Written by the indexing model from the issue text.
Description
Summary
When Console is served under a URL prefix (SERVER_BASEPATH=/kafka), the topics list works, but Create Topic and Delete Topic call the dataplane API at the site root. The browser requests POST /redpanda.api.dataplane.v1.TopicService/CreateTopic instead of POST /kafka/redpanda.api.dataplane.v1.TopicService/CreateTopic.
Anything else mounted at / receives that request. The UI then shows ConnectError [unknown].
The same code is in v3.5.1 and is unchanged on v3.13.1 / current master.
Setup
Console behind a reverse proxy that forwards only /kafka/* to the process.
SERVER_BASEPATH=/kafka
SERVER_STRIPPREFIX=true
SERVER_SETBASEPATHFROMXFORWARDEDPREFIX=true
The served page sets window.BASE_URL = '/kafka/'. Listing topics and the console.v1alpha1 calls go to /kafka/... and succeed.
What happens
- Open
/kafka/topics. - Create Topic, fill in a name, submit.
- The browser sends:
POST /redpanda.api.dataplane.v1.TopicService/CreateTopic
That path has no /kafka prefix, so the proxy does not send it to Console. The Connect client reports ConnectError [unknown]. Delete Topic uses the same client.
The same request with the prefix reaches Console and returns a normal API response. For example, an empty body returns 400 invalid_argument (topic is required), which shows the handler itself is fine.
Cause
The standalone app builds the dataplane transport with an explicit empty base URL:
// frontend/src/app.tsx
const dataplaneTransport = createConnectTransport({
baseUrl: getGrpcBasePath(''), // Embedded mode handles the path separately.
getGrpcBasePath only falls back to window.BASE_URL when the override is nullish:
// frontend/src/config.ts
export const getGrpcBasePath = (overrideUrl?: string) => overrideUrl ?? getBasePath();
'' is not nullish, so the fallback never runs and baseUrl stays empty. The comment says embedded mode handles the path, but this transport is the one the standalone UI uses. Create Topic, Delete Topic, and the other redpanda.api.dataplane.v1 calls share it. The older console.v1alpha1 client still uses getBasePath() and is fine.
Expected
With SERVER_BASEPATH=/kafka, dataplane calls should be POST /kafka/redpanda.api.dataplane.v1.TopicService/CreateTopic (and the same prefix for Delete Topic and the other dataplane RPCs).
Workaround
Also route /redpanda.api.dataplane.v1.* to Console at the proxy, or serve Console at / on its own host. No Console config option changes the empty base URL.
- Dominant language
- TypeScript
- Stars
- 4.3k
- Forks
- 431
- Avg merge
- 3d 7h
- Merged PRs (30d)
- 22
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from redpanda-data/console
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
redpanda-data/console#2487 ·
Maintainers usually reply within 2 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
redpanda-data/console#2459 ·
Maintainers usually reply within 2 days
-
Difficulty 4/5 3-5 days Newbie friendliness 47/100
redpanda-data/console#2692 ·
Maintainers usually reply within 2 days
-
Difficulty 3/5 1-2 days Newbie friendliness 65/100
redpanda-data/console#2673 ·
Maintainers usually reply within 2 days
-
dependencies lang/ts security snyk team/ux
Difficulty 4/5 3-5 days Newbie friendliness 48/100
redpanda-data/console#2583 ·
Maintainers usually reply within 2 days
All issues in redpanda-data/console
Similar issues
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
awslabs/visual-asset-management-system#804 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
restatedev/sdk-typescript#813 ·
-
bug desktop P1 session XS
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
Merit-Systems/x402scan#1312 ·
-
type:bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Azure/apiops-cli#331 ·
Maintainers usually reply within 3 days