{"record":{"id":"99093428f7e597d2","repo":"vitest-dev/vitest","slug":"the-context-provider-name-provider-does-not-sup","errorCode":null,"errorMessage":"The ${context.provider.name} provider does not support tracing.","messagePattern":"The (.+?) provider does not support tracing\\.","errorType":"exception","errorClass":"TypeError","httpStatus":null,"severity":"error","filePath":"packages/browser-playwright/src/commands/trace.ts","lineNumber":62,"sourceCode":"    await context.tracing.startChunk({ name, title })\n    return\n  }\n  throw new TypeError(`The ${provider.name} provider does not support tracing.`)\n}\n\nexport const stopChunkTrace: BrowserCommand<[{ name: string }]> = async (\n  context,\n  { name },\n) => {\n  if (isPlaywrightProvider(context.provider)) {\n    const path = resolveTracesPath(context, name)\n    assertBrowserApiWrite(context.project, path)\n    assertBrowserFileAccess(context.project, path)\n    context.provider.pendingTraces.delete(path)\n    await context.context.tracing.stopChunk({ path })\n    return { tracePath: path }\n  }\n  throw new TypeError(`The ${context.provider.name} provider does not support tracing.`)\n}\n\nexport const markTrace: BrowserCommand<[payload: { name: string; element?: SerializedLocator; stack?: string }]> = async (\n  context,\n  payload,\n) => {\n  if (isPlaywrightProvider(context.provider)) {\n    // skip if tracing is not active\n    // this is only safe guard and this isn't expected to happen since\n    // runner already checks if tracing is active before sending this command\n    if (!context.provider.tracingContexts.has(context.sessionId)) {\n      return\n    }\n    const { name, element, stack } = payload\n    const location = parseLocation(context, stack)\n    // mark trace via group/groupEnd with dummy calls to force snapshot.\n    // https://github.com/microsoft/playwright/issues/39308\n    await context.context.tracing.group(name, { location })","sourceCodeStart":44,"sourceCodeEnd":80,"githubUrl":"https://github.com/vitest-dev/vitest/blob/1fa9837ec26533512fdcad8baebf249771bd340a/packages/browser-playwright/src/commands/trace.ts#L44-L80","documentation":"stopChunkTrace finalizes a named trace chunk by calling `context.context.tracing.stopChunk({ path })` and writing the zip. This is Playwright-specific; for any non-playwright provider the function falls through and throws a TypeError. The path resolution and pendingTraces bookkeeping also depend on Playwright provider internals.","triggerScenarios":"Provider is webdriverio/preview/custom and the runner tries to stop a trace chunk it never started, or a chunk command was queued before the provider switched.","commonSituations":"Provider mismatch with trace config; running the same suite under multiple providers where one does not support tracing; custom provider that lacks tracing.","solutions":["Run tracing exclusively under `provider: 'playwright'`.","Turn tracing off for non-playwright provider configurations.","Ensure no stale trace commands are dispatched after switching providers (restart vitest)."],"exampleFix":"// before\ntest: { browser: { provider: 'preview' } }  // preview has no tracing\n\n// after\ntest: { browser: { provider: 'playwright', trace: 'on' } }","handlingStrategy":"validation","validationCode":"const provider = 'playwright'\nexport default defineConfig({\n  test: { browser: { provider, trace: provider === 'playwright' ? 'on-all' : false } },\n})","typeGuard":"function supportsTracing(provider: { name: string }): boolean {\n  return provider.name === 'playwright'\n}","tryCatchPattern":null,"preventionTips":["Match provider across start and stop trace lifecycle (do not switch mid-run).","Disable tracing for non-playwright providers.","Restart vitest after changing provider to flush queued trace commands."],"tags":["browser","tracing","provider","playwright"],"backgroundTag":null,"analyzedSha":"1fa9837ec26533512fdcad8baebf249771bd340a","analyzedAt":"2026-08-11T16:11:39.638Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}