{"record":{"id":"e962e6e94c9d039b","repo":"diegosouzapw/OmniRoute","slug":"oauth-finished-but-no-provider-connection-was-fou","errorCode":null,"errorMessage":"OAuth finished, but no provider connection was found.","messagePattern":"OAuth finished, but no provider connection was found\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"src/app/(dashboard)/dashboard/providers/components/onboarding/ProviderOnboardingWizard.tsx","lineNumber":508,"sourceCode":"  };\n\n  const handleOAuthSuccess = async () => {\n    if (!selectedProvider) return;\n    setShowOAuthModal(false);\n    setSubmitting(true);\n    setError(null);\n    try {\n      setStatus(text(\"onboardingLoadingOAuthConnection\", \"Loading OAuth connection…\"));\n      const connections = await fetchOnboardingConnections();\n      const matchingConnections = connections.filter(\n        (connection) => connection.provider === selectedProvider.id\n      );\n      const connection =\n        matchingConnections.find((candidate) => !knownOAuthConnectionIds.has(candidate.id)) ||\n        matchingConnections[0] ||\n        null;\n      if (!connection) {\n        throw new Error(\n          text(\n            \"onboardingOAuthNoConnectionFound\",\n            \"OAuth finished, but no provider connection was found.\"\n          )\n        );\n      }\n      setCreatedConnection(connection);\n      await runConnectionTest(connection);\n      setStep(\"result\");\n    } catch (oauthError) {\n      setError(\n        oauthError instanceof Error\n          ? oauthError.message\n          : text(\"onboardingOAuthFailed\", \"OAuth onboarding failed\")\n      );\n      setStep(\"result\");\n    } finally {\n      setSubmitting(false);","sourceCodeStart":490,"sourceCodeEnd":526,"githubUrl":"https://github.com/diegosouzapw/OmniRoute/blob/a179ffed5bb2e0b883b9ae7214ce8717b2a94c4d/src/app/(dashboard)/dashboard/providers/components/onboarding/ProviderOnboardingWizard.tsx#L490-L526","documentation":"Literal error thrown after a successful OAuth popup flow when the subsequent connections fetch finds no connection matching the selected provider. Means the OAuth completed upstream but the callback/connection persistence failed or the provider id mismatches stored connections.","triggerScenarios":"Thrown at src/app/(dashboard)/dashboard/providers/components/onboarding/ProviderOnboardingWizard.tsx:508 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Re-run the onboarding OAuth flow; the connection may appear after a delay","Check server logs for OAuth callback persistence errors","Verify the provider id matches the connection's provider field"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"a179ffed5bb2e0b883b9ae7214ce8717b2a94c4d","analyzedAt":"2026-08-25T18:35:09.898Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}