-
Notifications
You must be signed in to change notification settings - Fork 0
Troubleshooting
Start with the visible error and its X-Request-Id. Avoid changing credentials, tenant mappings, or database state until you have traced the actual request path.
-
GET /healthand recordenv,database, andacarsProvider. - Check browser network response status, error code, and
X-Request-Id. - Confirm the URL slug and active Clerk organization slug.
- Confirm
/meand/tenantreturn the same tenant. - Confirm membership status and role.
- Check the specific API/service logs by request ID.
- Reproduce with synthetic data in the lowest safe environment.
In Clerk Waitlist mode, public sign-up is intentionally invitation-only. New
users without a valid direct invitation must open /:slug/waitlist and submit
their email there. Confirm that the tenant ClerkProvider points waitlistUrl
to that route and that Clerk email delivery is enabled. After a global Clerk
administrator invites the entry, the
Dashboard approval email opens Clerk's Account Portal sign-up page by default;
configure the Account Portal sign-up fallback redirect to /:slug/join for the
separate pilot/dispatcher membership application. /:slug/sign-up is used only
when an invitation flow explicitly redirects into the tenant application.
- Confirm the Clerk publishable and secret keys belong to the same instance.
- Confirm tenant auth routes are inside
/:slug. - Confirm session cookies are not blocked.
- Confirm
API_INTERNAL_URLorAPI_ORIGINreaches the API. - Check
/mefor 401 and its request ID.
The active Clerk organization slug differs from the URL. Select the vSAS organization for /vsas; do not bypass this by weakening the slug check.
- Verify the Clerk organization ID, not only its name or slug.
- Verify
VSAS_CLERK_ORG_IDin the API. - Inspect the
tenants.clerk_org_idmapping. - Sign in through the exact trusted vSAS organization to allow repair; the production seed endpoint deliberately returns not found.
The local membership is invited or disabled. Check /vsas/join for a
pending application. An administrator must approve it or restore/remove the
member through the authorized tenant workflow. Clerk directory presence alone
never reactivates local access.
Confirm the invitation role is org:pilot or org:dispatcher, its organization
slug matches the tenant URL, and the user selected that active organization. If
the user already has a disabled/invited local record, review it in VA Dispatch;
do not delete application history or bypass local status. A failed removal can
also leave a safe disabled record plus a stale Clerk membership—repeat Remove
from organization to finish provider synchronization.
- Record the visible status, message, and request ID. A provider rejection can
indicate a missing
org:pilot/org:dispatcherrole or an invalid invitation redirect configuration. Verify Production's explicitAPP_ORIGIN; Preview requires Vercel system environment URLs and Clerk allowlisting for the tested branch or deployment URL. - In local auth-bypass mode, live Clerk invitations are intentionally disabled
and directory sync is a no-op. Set
AUTH_DEV_BYPASS=falseonly in a safe environment configured with matching Clerk keys when testing this flow. - Pending invitations cannot be synchronized. The recipient must accept a tenant organization invitation before first tenant access or Sync Clerk directory can create the local row.
- An application-wide user invitation from Clerk Dashboard is not a tenant
invitation. After account creation, send the user to
/:slug/joinand approve their pilot/dispatcher request in VA Dispatch. - Treat a sync result with skipped entries as incomplete; Clerk did not return the stable user ID needed for a tenant-scoped membership row, or an existing pending/disabled local member requires explicit administrator review.
Runtime authorization uses the local membership. Run the paged Clerk directory synchronization or update the membership as an Admin, then verify the conservative mapping. First provisioning is audited as pilot or dispatcher. The sole authentication-time exception promotes a verified Clerk organization Admin when the tenant has no active application Admin; it does not keep syncing Clerk claims on later requests.
If the API runtime log reports ERR_MODULE_NOT_FOUND for hono from
/var/task/app.js, the Hono service was emitted without its pnpm workspace
dependencies. The API service keeps vercel-entry.ts checked in because
Vercel validates the path before its service build, then replaces that file in
the isolated build checkout with a dependency-complete bundle. Run
pnpm run build:vercel locally; the command writes to dist/ and imports the
result from an isolated temporary directory before accepting the build.
Do not add one missing package at a time to the function because the next bare
runtime import will fail in the same way.
The health endpoint can still respond without a database. Configure
DATABASE_URL, apply canonical schema.ts to a new empty database with
pnpm db:push, and authenticate through the trusted Clerk organization.
The API returned success JSON that did not match the web Zod schema. Compare:
- route serializer;
- OpenAPI schema;
-
apps/web/src/lib/api/schemas.ts; and - the actual response captured with its request ID.
Do not cast around the parser.
The requested status change is not allowed from the current status. Reload the record and use the state diagrams in Flights and State Machines or Scheduling and Dispatch.
Send nextCursor back unchanged. A malformed or decoded/re-encoded cursor returns 400 BAD_REQUEST.
Direct curl, scripts, or clients without browser challenge proof are expected to fail on protected mutations. Test through the deployed web UI and inspect BotID events. Do not disable BotID to make an undocumented machine client work.
Check pilotMembershipId. Pilots see only assigned flights, and the API rejects
an offered flight without a valid active pilot assignment. Also check whether a
later reassignment created a new assignment revision that still needs pilot
confirmation.
Cancellation now requires an explicit linked-flight policy. Reload the request,
then choose either keep or cancel_predeparture; only eligible linked flights
are cancelled, and active or terminal flights are preserved.
Reload the request and check its remaining count and version. Appending is
allowed only while partially_fulfilled, requires the current request version,
and must use a fresh Idempotency-Key for the intended batch.
Accepted and briefed rows are shown from 24 hours overdue through seven days ahead. Active flights are always included, while completed KPIs use the current UTC month. Older accepted or briefed rows belong in history rather than on the live board; correct stale lifecycle data only after verifying the operation.
Reload the dashboard and confirm the flight is still assigned to the current pilot. Active flights have their own group; a reassignment, tenant mismatch, or stale browser response can make the former pilot's row disappear.
Production has no mock fallback. An admin must test and save the tenant station and Hoppie logon. Confirm TENANT_SECRETS_KEY is valid and stable.
Usually the tenant ground station is not configured or required configuration input is missing. Open organization settings as an administrator.
A normal send attempt returns a stored accepted, rejected, or ambiguous
outcome, including provider rejection and timeout. A 502 therefore usually
means configuration/provider setup failed before the durable send path, or a
configuration test failed. Inspect the inbox before retrying; an ambiguous
outcome may already have reached the aircraft and is never retried
automatically.
Ensure only one poller owns the station. Stop the other client and wait about two minutes before a manual retry.
Verify the Vercel cron runs every minute and hoppiePollingEnabled is true. The web adds up to about 10 seconds after storage. Slower cron plans create correspondingly slower inbound delivery.
Hoppie acceptance is not delivery. Confirm:
- recipient callsign;
- simulator client is online and configured;
- personal and tenant accounts share network affiliation; and
- the aircraft client has initiated any flow required to appear online.
Do not resend rapidly; avoid duplicates and rate limits.
Hoppie position/progress messages remain ACARS text and do not feed the MSFS telemetry track. Check the pilot's simulator device, current lease, sequence, and ingest responses separately. The dispatcher currently receives live presence and coordinates, but there is no map rendering to update.
Check every required LEGAL_* value. Addresses must contain a non-empty line, emails must be valid, the supervisory URL must be absolute HTTPS, and paired register/editorial fields must be complete.
Inspect the versioned local-storage preference and browser blocking. The current notice version must match, analyticsAllowed must be true, and every event is rechecked. Consent in another tab should propagate through the storage event.
Expected when LEGAL_NOTICE_VERSION changed. A new notice version invalidates the old preference so the user can make an informed choice again.
Read apps/web/AGENTS.md and the matching installed guide under apps/web/node_modules/next/dist/docs/. This project uses Next.js 16.3, React 19.2, and TypeScript 7 for web checks.
Playwright defaults to 3100 and does not reuse an existing server:
E2E_PORT=3200 pnpm --filter @va-dispatch/web test:e2epnpm --filter @va-dispatch/web exec playwright install chromiumSupply DATABASE_URL in the command environment or ensure the approved
development environment is loaded. This pre-production Shiftbloom project
expects a new empty database for db:push; never use a database containing data
that must be preserved.
Include:
- component and commit;
- environment type, not credentials;
- expected and actual behavior;
- request ID and redacted status/error envelope;
- minimal synthetic reproduction; and
- relevant test/log excerpt with personal and operational data removed.
Use the support or bug issue form. Report vulnerabilities privately through SECURITY.md.
VA Dispatch repository · OpenAPI source · Security policy · AGPL-3.0-or-later · Simulation use only
VA Dispatch
Using the application
Building and operating
- Architecture
- Authentication and Multi-Tenancy
- Data Model
- API Guide
- Local Development
- Configuration Reference
- Deployment and Operations
- Testing and Quality
- Security and Privacy
Maintaining the project