Dokploy/dokploy · warning · Error
No Application Selected: Make Sure to select an application
Error message
No Application Selected: Make Sure to select an application to monitor.
What it means
A plain Error (not a TRPCError) thrown by Dokploy's monitoring data-points query when input.appName is empty/falsy. The query forwards the app name to an external monitoring endpoint, so it refuses to run without a target. Because it lacks a TRPC code, the client receives it as an internal/unhandled error shape.
Source
Thrown at apps/dokploy/server/api/routers/user.ts:537
with: {
organization: true,
},
});
}),
getContainerMetrics: withPermission("monitoring", "read")
.input(
z.object({
url: z.string(),
token: z.string(),
appName: z.string(),
dataPoints: z.string(),
}),
)
.query(async ({ input }) => {
try {
if (!input.appName) {
throw new Error(
[
"No Application Selected:",
"",
"Make Sure to select an application to monitor.",
].join("\n"),
);
}
const url = new URL(`${input.url}/metrics/containers`);
url.searchParams.append("limit", input.dataPoints);
url.searchParams.append("appName", input.appName);
const response = await fetch(url.toString(), {
headers: {
Authorization: `Bearer ${input.token}`,
},
});
if (!response.ok) {
throw new Error(
`Error ${response.status}: ${response.statusText}. Please verify that the application "${input.appName}" is running and this service is included in the monitoring configuration.`,View on GitHub (pinned to 546686ea35)
Solutions
- Guard the caller: skip the query when appName is empty (enabled: !!appName in react-query)
- Set a non-empty default app selection before rendering the monitoring panel
- Make the input schema stricter (z.string().min(1)) so it fails validation with a clear BAD_REQUEST instead
Example fix
// before
const { data } = trpc.user.readMonitoringDataPoints.useQuery({ appName, token, ... });
// after
const { data } = trpc.user.readMonitoringDataPoints.useQuery(
{ appName, token, ... },
{ enabled: Boolean(appName) },
); Defensive patterns
Strategy: validation
Validate before calling
const { data } = trpc.user.readMonitoringDataPoints.useQuery(
{ appName, token, dataPoints },
{ enabled: Boolean(appName) },
); Type guard
const hasAppName = (i: { appName?: string }): i is { appName: string } =>
typeof i.appName === 'string' && i.appName.length > 0; Prevention
- Disable fetch/query until an app is selected
- Default the select to the first available app
- Tighten the zod input to z.string().min(1) so validation fails first
When it happens
Trigger: Invoking the readMonitoringDataPoints (or similarly named) query with appName: '' or undefined, e.g. a dashboard chart rendering before the user selects an application.
Common situations: UI race where the monitoring panel mounts before app selection state hydrates; dropdown defaulting to an empty string; programmatic callers looping over projects with missing app names.
Understand the failure class
Background: Missing required parameter errors: what 'X is required' and 'the required X param is missing' mean, and how to fix them — this error's family across 27 libraries.
Related errors
AI-assisted analysis of Dokploy/dokploy@546686ea35 (2026-08-27).
Data as JSON: /api/errors/2ff1947516783ac8.
Report an issue: GitHub.