Troubleshooting
Common issues and solutions when working with Traces.
Collection Issues
Collection Stuck in "Pending"
Symptoms: Collection status remains "pending" and never starts.
Possible Causes:
- Worker is not running
- Database (pg-boss queue) connection issue
- Credential validation failed silently
Solutions:
# Run the worker and watch its logs
pnpm --filter @traces/worker dev
# Inspect the queue / collection status in the database
pnpm --filter @traces/database db:studio
The job queue is pg-boss, stored in the
pgbossschema of the same Postgres database — there is no Redis queue to ping. If jobs are stuck, confirm the worker shares the sameDATABASE_URLas the web app.
Collection Fails with 401 Error
Symptoms: Collection fails with "Unauthorized" or 401 status code.
Possible Causes:
- Credential expired
- Credential revoked by user
- Wrong credential type configured
Solutions:
- Verify credential is still valid with the platform
- Ask customer to provide new credentials
- Check auth configuration in connector matches platform requirements
Collection Fails with 429 Error
Symptoms: Collection fails with "Too Many Requests" or 429 status code.
Possible Causes:
- Rate limit exceeded
- Connector rate limit too aggressive
- Multiple collections running simultaneously
Solutions:
- Update connector rate limit configuration
- Reduce page size in pagination config
- Queue collections instead of running in parallel
Pagination Never Stops
Symptoms: Collection runs indefinitely, fetching the same data repeatedly.
Possible Causes:
- Stop condition not configured
- Wrong cursor path
- API returns same cursor repeatedly
Solutions:
- Verify stop condition is configured
- Check cursor path matches actual API response
- Test pagination manually with API client
Connector Issues
Automated Generation Fails
Symptoms: Connector generation fails during parsing or analysis.
Possible Causes:
- Invalid or inaccessible documentation URL
- Unsupported documentation format
- Anthropic API quota exceeded
Solutions:
- Verify URL is accessible
- Try different documentation URL (OpenAPI, Swagger, Postman)
- Check
ANTHROPIC_API_KEYand quota
Dependency Mapping Not Working
Symptoms: Dependent endpoints don't receive values from source endpoints.
Possible Causes:
- Wrong JSON path configured
- Source endpoint returns empty data
- Parameter location mismatch
Solutions:
- Test source endpoint and verify JSON path
- Check source endpoint actually returns data
- Verify parameter location (path, query, body)
Test Endpoint Returns Unexpected Results
Symptoms: Testing endpoint returns different data than expected.
Possible Causes:
- Test credentials have limited scope
- Endpoint requires specific parameters
- Platform API changed
Solutions:
- Verify credential has required scopes
- Check if endpoint needs query parameters
- Review platform API changelog
Authentication Issues
Clerk Sign-in Not Working
Symptoms: Users cannot sign in, redirect loops, or blank pages.
Possible Causes:
- Incorrect Clerk keys
- Missing Clerk middleware
- Domain not configured in Clerk
Solutions:
- Verify NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY and CLERK_SECRET_KEY
- Check middleware.ts is properly configured
- Add domain to Clerk dashboard
Webhook Verification Failing
Symptoms: Clerk webhooks return 401 or signature mismatch.
Possible Causes:
- Wrong webhook secret
- Request body modified before verification
- Replay attack protection triggered
Solutions:
- Verify CLERK_WEBHOOK_SECRET matches Clerk dashboard
- Ensure raw body is used for verification
- Check server time is synchronized
Database Issues
Migration Failures
Symptoms: pnpm --filter @traces/database db:migrate:dev fails with errors.
Possible Causes:
- Database connection issue
- Schema conflict
- Missing permissions
Solutions:
# Reset database (development only!)
pnpm --filter @traces/database db:migrate:reset
# Generate / apply a new migration
pnpm --filter @traces/database db:migrate:dev
# Check migration status
pnpm --filter @traces/database db:migrate:status
Migrations run against
DIRECT_URL(the direct Supabase connection), not the pooledDATABASE_URL. ATenant or user not found/ pooler error usually meansDIRECT_URLis missing or wrong.
Prisma Client Out of Sync
Symptoms: TypeScript errors about missing fields or types.
Solutions:
# Regenerate Prisma client
pnpm --filter @traces/database db:generate
# If still failing, clear cache
rm -rf node_modules/.prisma
pnpm install
The generated Prisma client lives at
packages/database/generated/prismaand is imported as@traces/database.
Worker Issues
Jobs Not Processing
Symptoms: Jobs added to queue but never processed.
Possible Causes:
- Worker not running
- Worker crashed
- Database connection lost (queue lives in Postgres)
Solutions:
# Start the worker and watch its logs
pnpm --filter @traces/worker dev
Inspect or clear stuck jobs directly in Postgres (the pg-boss tables live in the
pgboss schema), e.g. via Prisma Studio or psql:
-- See queued/active jobs
SELECT name, state, count(*) FROM pgboss.job GROUP BY name, state;