{"id":"63eee6deaf416a5b","repo":"vitest-dev/vitest","slug":"provider-context-provider-name-is-not-supported","errorCode":null,"errorMessage":"provider ${context.provider.name} is not supported","messagePattern":"provider (.+?) is not supported","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/browser-playwright/src/commands/trace.ts","lineNumber":185,"sourceCode":"  }\n  if (isPlaywrightProvider(context.provider)) {\n    for (const trace of traces) {\n      assertBrowserApiWrite(context.project, trace)\n      assertBrowserFileAccess(context.project, trace)\n    }\n    return Promise.all(\n      traces.map(trace => unlink(trace).catch((err) => {\n        if (err.code === 'ENOENT') {\n        // Ignore the error if the file doesn't exist\n          return\n        }\n        // Re-throw other errors\n        throw err\n      })),\n    )\n  }\n\n  throw new Error(`provider ${context.provider.name} is not supported`)\n}\n\nexport const annotateTraces: BrowserCommand<[{ traces: string[]; testId: string }]> = async (\n  { project },\n  { testId, traces },\n) => {\n  const vitest = project.vitest\n  await Promise.all(traces.map((trace) => {\n    assertBrowserApiWrite(project, trace)\n    assertBrowserFileAccess(project, trace)\n    const entity = vitest.state.getReportedEntityById(testId)\n    const location = entity?.location\n      ? {\n          file: entity.module.moduleId,\n          line: entity.location.line,\n          column: entity.location.column,\n        }\n      : undefined","sourceCodeStart":167,"sourceCodeEnd":203,"githubUrl":"https://github.com/vitest-dev/vitest/blob/d568f8ce3739b532d5bf2c1ee1e45e8a8a473d09/packages/browser-playwright/src/commands/trace.ts#L167-L203","documentation":"Thrown as a generic Error (note: lowercase 'provider' and Error, not TypeError, unlike the other trace guards) by deleteTracing when the provider is not Playwright. deleteTracing only knows how to unlink Playwright-produced trace artifacts for the session; for other providers there is no trace set to delete.","triggerScenarios":"The runner dispatches deleteTracing under webdriverio or preview because trace config was enabled for a non-playwright provider, hitting the fall-through throw.","commonSituations":"Trace enabled on a non-playwright provider; cleanup hook that unconditionally calls deleteTracing across a provider matrix.","solutions":["Use provider 'playwright' when tracing is enabled.","Disable browser.trace for webdriverio/preview so deleteTracing is not dispatched.","Guard any custom deleteTracing call on provider name === 'playwright'."],"exampleFix":"// before\ntest: { browser: { provider: 'webdriverio', trace: { enabled: true } } }\n\n// after\ntest: { browser: { provider: 'playwright', trace: { enabled: true } } }","handlingStrategy":"validation","validationCode":"if (context.provider.name !== 'playwright') {\n  throw new Error(`deleteTracing needs playwright, got ${context.provider.name}`)\n}\nawait deleteTracing(context, { traces })","typeGuard":"function isPlaywright(p: BrowserProvider): p is PlaywrightBrowserProvider {\n  return p.name === 'playwright'\n}","tryCatchPattern":null,"preventionTips":["Disable browser.trace for non-playwright providers so deleteTracing is not dispatched.","Guard custom deleteTracing calls on provider name === 'playwright'.","Use per-provider config in CI matrices."],"tags":["browser","tracing","provider","cleanup","vitest"],"analyzedSha":"d568f8ce3739b532d5bf2c1ee1e45e8a8a473d09","analyzedAt":"2026-08-03T20:23:56.861Z","schemaVersion":2}