cli icon indicating copy to clipboard operation
cli copied to clipboard

Recreating database throws error on `provider_id` column for google oauth users

Open KajSzy opened this issue 2 years ago • 6 comments

Describe the bug I've dumped my production data to sql file for local development purpose. Trying to reset local supabase instance I get an error that column type is invalid.

To Reproduce Steps to reproduce the behavior:

  1. Dump data from production (requires users signed up using google oauth) supabase db dump --data-only -f supabase/seed.sql
  2. Reset local supabase with new seed supabase db reset locally

Expected behavior As previous versions it was working fine, resetting local database should run smoothly for all signed up users.

Desktop (please complete the following information):

  • OS: MacOS
  • Version of CLI: 1.127.4

Additional context

Both databases show provider_id column as text

{
  "Type": "ErrorResponse",
  "Severity": "ERROR",
  "SeverityUnlocalized": "ERROR",
  "Code": "22P02",
  "Message": "invalid input syntax for type uuid: \"110207739924152032961\"",
  "Detail": "",
  "Hint": "",
  "Position": 1333,
  "InternalPosition": 0,
  "InternalQuery": "",
  "Where": "",
  "SchemaName": "",
  "TableName": "",
  "ColumnName": "",
  "DataTypeName": "",
  "ConstraintName": "",
  "File": "uuid.c",
  "Line": 133,
  "Routine": "string_to_uuid",
  "UnknownFields": null
}

KajSzy avatar Jan 01 '24 20:01 KajSzy

This is probably caused by mismatched versions between local and prod. You can sync up local gotrue version to match remote by running supabase link.

Let me know if db reset works after relinking.

sweatybridge avatar Jan 02 '24 09:01 sweatybridge

Still throws same error, supabase link did not show any mismatches between local and remote

KajSzy avatar Jan 02 '24 11:01 KajSzy

In that case, could you create a ticket and report the crash id for me to take a closer look?

supabase db reset --create-ticket

sweatybridge avatar Jan 02 '24 11:01 sweatybridge

In that case, could you create a ticket and report the crash id for me to take a closer look?

supabase db reset --create-ticket

Ticket id: 90f0cd39e8d84df289525bad7e767e7d

KajSzy avatar Jan 02 '24 11:01 KajSzy

Could you try db reset again after rm -rf supabase/.temp? The crash ticket looks ok to me.

sweatybridge avatar Jan 03 '24 07:01 sweatybridge

Sadly, still same error. I'm quite sure it was working fine with older version but I am unable to test which one exactly. Tried beta but still got same error

EDIT: I've found out that with version 1.115.4 it works fine, but with 1.123.0 it starts to throw errors. I'm in the progress of fidning exact version at which it was broken

KajSzy avatar Jan 03 '24 11:01 KajSzy

This seems to be a duplicate of https://github.com/supabase/supabase/issues/19620#issuecomment-1856418658

The resolution is to update supabase/seed.sql according to the steps in the linked comment.

sweatybridge avatar Apr 18 '24 03:04 sweatybridge