[GH-ISSUE #178] [Bug] Game Fails to Import Due to Foreign Key Constraint #90

Open
opened 2026-02-17 17:06:05 -05:00 by yindo · 2 comments
Owner

Originally created by @JamesRy96 on GitHub (Aug 6, 2025).
Original GitHub issue: https://github.com/Drop-OSS/drop/issues/178

Version: 0.3.1

When adding a new game to my library the process fails silently, looking at the logs it seems like data is trying to be added to the table public before the game is added to the Game table.

PostgreSQL Database directory appears to contain a database; Skipping initialization

2025-08-06 14:10:23.414 UTC [1] LOG:  starting PostgreSQL 14.18 on x86_64-pc-linux-musl, compiled by gcc (Alpine 14.2.0) 14.2.0, 64-bit
2025-08-06 14:10:23.414 UTC [1] LOG:  listening on IPv4 address "0.0.0.0", port 5432
2025-08-06 14:10:23.414 UTC [1] LOG:  listening on IPv6 address "::", port 5432
2025-08-06 14:10:23.422 UTC [1] LOG:  listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
2025-08-06 14:10:23.431 UTC [26] LOG:  database system was shut down at 2025-08-06 14:10:22 UTC
2025-08-06 14:10:23.440 UTC [1] LOG:  database system is ready to accept connections

2025-08-06 14:23:25.584 UTC [243] ERROR:  insert or update on table "GameVersion" violates foreign key constraint "GameVersion_gameId_fkey"
2025-08-06 14:23:25.584 UTC [243] DETAIL:  Key (gameId)=(6ba68033-dd08-4d8f-9396-e427d306ea3f) is not present in table "Game".
2025-08-06 14:23:25.584 UTC [243] STATEMENT:  INSERT INTO "public"."GameVersion" ("gameId","versionName","created","platform","launchCommand","launchArgs","setupCommand","setupArgs","onlySetup","umuIdOverride","dropletManifest","versionIndex","delta") VALUES ($1,$2,$3,CAST($4::text AS "public"."Platform"),$5,$6,$7,$8,$9,$10,$11,$12,$13) RETURNING "public"."GameVersion"."gameId", "public"."GameVersion"."versionName", "public"."GameVersion"."created", "public"."GameVersion"."platform"::text, "public"."GameVersion"."launchCommand", "public"."GameVersion"."launchArgs", "public"."GameVersion"."setupCommand", "public"."GameVersion"."setupArgs", "public"."GameVersion"."onlySetup", "public"."GameVersion"."umuIdOverride", "public"."GameVersion"."dropletManifest", "public"."GameVersion"."versionIndex", "public"."GameVersion"."delta"

2025-08-06 14:30:51.667 UTC [333] ERROR:  insert or update on table "GameVersion" violates foreign key constraint "GameVersion_gameId_fkey"
2025-08-06 14:30:51.667 UTC [333] DETAIL:  Key (gameId)=(0d7072a8-12a1-4507-932d-6ffaf8832881) is not present in table "Game".
2025-08-06 14:30:51.667 UTC [333] STATEMENT:  INSERT INTO "public"."GameVersion" ("gameId","versionName","created","platform","launchCommand","launchArgs","setupCommand","setupArgs","onlySetup","umuIdOverride","dropletManifest","versionIndex","delta") VALUES ($1,$2,$3,CAST($4::text AS "public"."Platform"),$5,$6,$7,$8,$9,$10,$11,$12,$13) RETURNING "public"."GameVersion"."gameId", "public"."GameVersion"."versionName", "public"."GameVersion"."created", "public"."GameVersion"."platform"::text, "public"."GameVersion"."launchCommand", "public"."GameVersion"."launchArgs", "public"."GameVersion"."setupCommand", "public"."GameVersion"."setupArgs", "public"."GameVersion"."onlySetup", "public"."GameVersion"."umuIdOverride", "public"."GameVersion"."dropletManifest", "public"."GameVersion"."versionIndex", "public"."GameVersion"."delta"
Originally created by @JamesRy96 on GitHub (Aug 6, 2025). Original GitHub issue: https://github.com/Drop-OSS/drop/issues/178 Version: 0.3.1 When adding a new game to my library the process fails silently, looking at the logs it seems like data is trying to be added to the table `public` before the game is added to the `Game` table. ``` PostgreSQL Database directory appears to contain a database; Skipping initialization 2025-08-06 14:10:23.414 UTC [1] LOG: starting PostgreSQL 14.18 on x86_64-pc-linux-musl, compiled by gcc (Alpine 14.2.0) 14.2.0, 64-bit 2025-08-06 14:10:23.414 UTC [1] LOG: listening on IPv4 address "0.0.0.0", port 5432 2025-08-06 14:10:23.414 UTC [1] LOG: listening on IPv6 address "::", port 5432 2025-08-06 14:10:23.422 UTC [1] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432" 2025-08-06 14:10:23.431 UTC [26] LOG: database system was shut down at 2025-08-06 14:10:22 UTC 2025-08-06 14:10:23.440 UTC [1] LOG: database system is ready to accept connections 2025-08-06 14:23:25.584 UTC [243] ERROR: insert or update on table "GameVersion" violates foreign key constraint "GameVersion_gameId_fkey" 2025-08-06 14:23:25.584 UTC [243] DETAIL: Key (gameId)=(6ba68033-dd08-4d8f-9396-e427d306ea3f) is not present in table "Game". 2025-08-06 14:23:25.584 UTC [243] STATEMENT: INSERT INTO "public"."GameVersion" ("gameId","versionName","created","platform","launchCommand","launchArgs","setupCommand","setupArgs","onlySetup","umuIdOverride","dropletManifest","versionIndex","delta") VALUES ($1,$2,$3,CAST($4::text AS "public"."Platform"),$5,$6,$7,$8,$9,$10,$11,$12,$13) RETURNING "public"."GameVersion"."gameId", "public"."GameVersion"."versionName", "public"."GameVersion"."created", "public"."GameVersion"."platform"::text, "public"."GameVersion"."launchCommand", "public"."GameVersion"."launchArgs", "public"."GameVersion"."setupCommand", "public"."GameVersion"."setupArgs", "public"."GameVersion"."onlySetup", "public"."GameVersion"."umuIdOverride", "public"."GameVersion"."dropletManifest", "public"."GameVersion"."versionIndex", "public"."GameVersion"."delta" 2025-08-06 14:30:51.667 UTC [333] ERROR: insert or update on table "GameVersion" violates foreign key constraint "GameVersion_gameId_fkey" 2025-08-06 14:30:51.667 UTC [333] DETAIL: Key (gameId)=(0d7072a8-12a1-4507-932d-6ffaf8832881) is not present in table "Game". 2025-08-06 14:30:51.667 UTC [333] STATEMENT: INSERT INTO "public"."GameVersion" ("gameId","versionName","created","platform","launchCommand","launchArgs","setupCommand","setupArgs","onlySetup","umuIdOverride","dropletManifest","versionIndex","delta") VALUES ($1,$2,$3,CAST($4::text AS "public"."Platform"),$5,$6,$7,$8,$9,$10,$11,$12,$13) RETURNING "public"."GameVersion"."gameId", "public"."GameVersion"."versionName", "public"."GameVersion"."created", "public"."GameVersion"."platform"::text, "public"."GameVersion"."launchCommand", "public"."GameVersion"."launchArgs", "public"."GameVersion"."setupCommand", "public"."GameVersion"."setupArgs", "public"."GameVersion"."onlySetup", "public"."GameVersion"."umuIdOverride", "public"."GameVersion"."dropletManifest", "public"."GameVersion"."versionIndex", "public"."GameVersion"."delta" ```
yindo added the bugneeds-triage labels 2026-02-17 17:06:05 -05:00
Author
Owner

@JamesRy96 commented on GitHub (Aug 6, 2025):

The "Drop has detected you have new verions of this game to import." banner is no longer shown on the game in the library but the "You have no versions of this game available." banner still shows, it is not possible to add a new version after this.

@JamesRy96 commented on GitHub (Aug 6, 2025): The "Drop has detected you have new verions of this game to import." banner is no longer shown on the game in the library but the "You have no versions of this game available." banner still shows, it is not possible to add a new version after this.
Author
Owner

@Huskydog9988 commented on GitHub (Aug 6, 2025):

Can you check the server logs and see what shows up there? It seems like Drop somehow imported a version on a game that doesn't exist, but appears to be showing up in the ui.

@Huskydog9988 commented on GitHub (Aug 6, 2025): Can you check the server logs and see what shows up there? It seems like Drop somehow imported a version on a game that doesn't exist, but appears to be showing up in the ui.
yindo changed title from [Bug] Game Fails to Import Due to Foreign Key Constraint to [GH-ISSUE #178] [Bug] Game Fails to Import Due to Foreign Key Constraint 2026-06-05 14:21:21 -04:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Drop-OSS/drop#90