Skip to content

[WIP] Fix Facebook conversation integration errors due to missing table#170

Closed
Copilot wants to merge 1 commit intomainfrom
copilot/fix-facebook-integration-errors
Closed

[WIP] Fix Facebook conversation integration errors due to missing table#170
Copilot wants to merge 1 commit intomainfrom
copilot/fix-facebook-integration-errors

Conversation

Copy link
Contributor

Copilot AI commented Feb 3, 2026

Thanks for assigning this issue to me. I'm starting to work on it and will keep this PR's description up to date as I form a plan and make progress.

Original prompt

This section details on the original issue you should resolve

<issue_title>Facebook conversation integration errors (Prisma: missing 'facebook_conversion_events' table) in production</issue_title>
<issue_description>### Problem
When using the Facebook conversation integrations (see /dashboard/integrations/facebook), multiple errors are occurring in production related to the Prisma model for Facebook conversion events. Facebook integrations (conversion list/retry/status) are failing due to a missing database table (public.facebook_conversion_events), resulting in the following error:

prisma:error 
Invalid `prisma.conversionEvent.count()` invocation:
The table `public.facebook_conversion_events` does not exist in the current database.
code: 'P2021',
clientVersion: '6.19.0'

This breaks:

  • /api/integrations/facebook/conversions
  • /api/integrations/facebook/conversions/retry
  • /api/integrations/facebook/status

Example log context (from vercel_logs_result.json) and related dashboard URL:

Graph API context:

[GraphAPI] Request: {
  url: 'https://graph.facebook.com/v24.0/debug_token?access_token=...',
  method: 'GET',
  body: undefined
}

Required Investigation

  • Check if the Prisma model for facebook_conversion_events exists in prisma/schema.prisma and is migrated to the production DB
  • Audit all Facebook integration endpoints for broken or incomplete DB logic
  • Confirm all table names match across code, schema, and DB
  • Re-run migrations or patch prod DB if necessary
  • Ensure integration endpoints (especially conversions and retry) handle missing table/DB setup gracefully
  • Review related logs in vercel_logs_result.json for any further errors related to Facebook features

Notes

  • Error originated from production (codestormhub.live)
  • Prisma version: 6.19.0
  • Example endpoints impacted: conversions, retry, status

Action: Please triage and resolve the broken Facebook integration endpoints by fixing the DB use (.env.example for Database URL) and code to ensure facebook_conversion_events table exists and all Prisma logic completes successfully. Mention any missing migrations or schema issues found.</issue_description>

<agent_instructions>Perform full codebase review, install all the dependencies, setup environment using .env.example, run prisma commands along with type-check, lint and build. Finally start the dev server and perform browser automation testing to navigate to the dashboard integration Facebook page and perform all the actions available in that pages. Implement fix all the errors that may occur and fix them properly by researching online </agent_instructions>

Comments on the Issue (you are @copilot in this section)


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

@vercel
Copy link

vercel bot commented Feb 3, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
stormcom Error Error Feb 3, 2026 5:02pm
stormcomui Canceled Canceled Feb 3, 2026 5:02pm

@vercel vercel bot temporarily deployed to Preview – stormcomui February 3, 2026 17:01 Inactive
@vercel vercel bot temporarily deployed to Production – stormcom February 3, 2026 17:02 Inactive
Copilot stopped work on behalf of syed-reza98 due to an error February 3, 2026 22:55
@syed-reza98 syed-reza98 closed this Feb 3, 2026
@github-project-automation github-project-automation bot moved this from Backlog to Done in StormCom Feb 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Facebook conversation integration errors (Prisma: missing 'facebook_conversion_events' table) in production

2 participants