{"record":{"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/1fa9837ec26533512fdcad8baebf249771bd340a/packages/browser-playwright/src/commands/trace.ts#L167-L203","documentation":"deleteTracing unlinks trace files using node:fs/promises unlink. After the isPlaywrightProvider branch, any other provider reaches the terminal throw. Unlike the other trace commands (which throw TypeError), this one throws a plain Error with a slightly different message. Means the cleanup path is unsupported for the active provider.","triggerScenarios":"deleteTracing dispatched while provider is webdriverio/preview/custom — typically because tracing was enabled then provider changed, or a non-playwright provider has trace files pending deletion.","commonSituations":"Provider mismatch; trace files left over from a previous playwright run now being cleaned under a different provider.","solutions":["Run cleanup under `provider: 'playwright'` to match how traces were created.","Disable tracing for non-playwright providers so delete commands are not emitted.","Manually delete stale `__traces__/` directories if the provider has changed."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"const provider = 'playwright'\nexport default defineConfig({\n  test: { browser: { provider } },\n})\n// cleanup of traces only happens under playwright automatically","typeGuard":"function supportsTracing(provider: { name: string }): boolean {\n  return provider.name === 'playwright'\n}","tryCatchPattern":null,"preventionTips":["Create and clean traces under the same (playwright) provider.","Disable tracing for non-playwright providers.","Manually clear stale __traces__ directories after switching providers."],"tags":["browser","tracing","provider","filesystem","internal"],"backgroundTag":null,"analyzedSha":"1fa9837ec26533512fdcad8baebf249771bd340a","analyzedAt":"2026-08-11T16:11:39.638Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}