Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Debug meeting creation in deployment #109

Closed
wants to merge 13 commits into from

Conversation

MinhxNguyen7
Copy link
Member

@MinhxNguyen7 MinhxNguyen7 commented May 27, 2024

Description

  • TBA

Debugging Steps

  • Use SST dashboard to see error message.
    • Resolved problem with error throwing because error() in the handler is supposed to be thrown, not returned.
    • Doesn't actually solve underlying problem, but at least we can see the error message.
    • Can add more try/excepts with console.error() to pinpoint where the error is thrown.
  • Include the error message and stack trace in response message. Not viable for prod, of course, but potentially useful.
    • Can now see error in this deployment in the network > response tab.
    • It's some error with Date.toISOString being passed an invalid value, but the stack trace is not helpful.
      • The only table with timestamp that we're writing to at meeting creation is meetingDates, so the problem might be the data passed into insertMeetingDates in databaseUtils.server.ts.
  • Connect to dev/staging DB with drizzle studio to see if schemas line up.
    • No tables, and only the public schema shows up despite the connection string having ?search_path=dev.
  • Try to nuke the dev DB.
    • Can't because I don't have permissions.
  • Host app locally while connecting to dev DB to see console logs.
    • Get error that table sessions doesn't exist, despite it existing in every schema other than drizzle in the deployed zotmeet DB, which is consistent with what Drizzle Studio reports locally.

Working Hypotheses

  • from_time and to_time in the meetings table used to be timestamps and now are char[5] (HH:MM). If that migration didn't happen, we'd be trying to insert 11:30 as a timestamp, which might be converted into a Date object at some point.
    • This is corroborated by the fact that the line that's throwing is [dbMeeting] = await db.insert(meetings).values(meeting).returning();
    • As far as I can see, the data coming in (which is being echoed) is well-formed.
  • Connection to DB isn't working properly.

Issues

@MinhxNguyen7 MinhxNguyen7 added the bug Something isn't working label May 27, 2024
@MinhxNguyen7 MinhxNguyen7 self-assigned this May 27, 2024
@MinhxNguyen7 MinhxNguyen7 temporarily deployed to staging-109 May 27, 2024 21:58 — with GitHub Actions Inactive
@MinhxNguyen7 MinhxNguyen7 temporarily deployed to staging-109 May 27, 2024 22:01 — with GitHub Actions Inactive
@MinhxNguyen7 MinhxNguyen7 temporarily deployed to staging-109 May 30, 2024 04:58 — with GitHub Actions Inactive
@MinhxNguyen7 MinhxNguyen7 temporarily deployed to staging-109 May 31, 2024 21:09 — with GitHub Actions Inactive
@MinhxNguyen7 MinhxNguyen7 temporarily deployed to staging-109 May 31, 2024 21:27 — with GitHub Actions Inactive
@MinhxNguyen7 MinhxNguyen7 temporarily deployed to staging-109 May 31, 2024 21:49 — with GitHub Actions Inactive
@MinhxNguyen7 MinhxNguyen7 temporarily deployed to staging-109 May 31, 2024 21:59 — with GitHub Actions Inactive
@MinhxNguyen7 MinhxNguyen7 temporarily deployed to staging-109 May 31, 2024 22:11 — with GitHub Actions Inactive
@MinhxNguyen7 MinhxNguyen7 temporarily deployed to staging-109 May 31, 2024 22:12 — with GitHub Actions Inactive
@MinhxNguyen7 MinhxNguyen7 temporarily deployed to staging-109 June 3, 2024 08:03 — with GitHub Actions Inactive
@MinhxNguyen7 MinhxNguyen7 temporarily deployed to staging-109 June 3, 2024 08:09 — with GitHub Actions Inactive
@MinhxNguyen7 MinhxNguyen7 temporarily deployed to staging-109 June 3, 2024 08:15 — with GitHub Actions Inactive
@MinhxNguyen7 MinhxNguyen7 temporarily deployed to staging-109 June 3, 2024 08:20 — with GitHub Actions Inactive
@MinhxNguyen7 MinhxNguyen7 mentioned this pull request Jun 3, 2024
@MinhxNguyen7
Copy link
Member Author

Superceded by #116

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Meeting creation doesn't work on staging
1 participant