• We have updated our Community Code of Conduct. Please read through the new rules for the forum that are an integral part of Paradox Interactive’s User Agreement.

SmartassSkeleton

Recruit
43 Badges
Dec 3, 2022
3
0
  • Stellaris: Megacorp
  • Europa Universalis IV: Third Rome
  • Stellaris: Synthetic Dawn
  • Age of Wonders III
  • Stellaris: Humanoids Species Pack
  • Stellaris: Apocalypse
  • Stellaris: Distant Stars
  • Europa Universalis IV: Dharma
  • Shadowrun Returns
  • Shadowrun: Dragonfall
  • Shadowrun: Hong Kong
  • Stellaris - Path to Destruction bundle
  • Europa Universalis IV: Golden Century
  • Prison Architect
  • Stellaris: Ancient Relics
  • Stellaris: Lithoids
  • Stellaris: Federations
  • Crusader Kings III
  • Crusader Kings III: Royal Edition
  • Europa Universalis 4: Emperor
  • Stellaris: Necroids
  • Stellaris: Nemesis
  • Europa Universalis IV: Common Sense
  • Europa Universalis IV
  • Europa Universalis IV: Art of War
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Call to arms event
  • Magicka
  • Europa Universalis IV: Res Publica
  • Teleglitch: Die More Edition
  • Europa Universalis IV: El Dorado
  • Magicka: Wizard Wars Founder Wizard
  • Crusader Kings II
  • Europa Universalis IV: Cossacks
  • Europa Universalis IV: Mare Nostrum
  • Stellaris
  • Stellaris: Galaxy Edition
  • Stellaris: Galaxy Edition
  • Stellaris: Galaxy Edition
  • Hearts of Iron IV: Cadet
  • Stellaris: Digital Anniversary Edition
  • Stellaris: Leviathans Story Pack
Hello Paradox!

I freshly installed EU4 on my Linux machine via Steam. When I launch the game in Steam, the launcher pops up with the message "Database migration failed. Most likely , your database file has been affected by a newer version of the launcher. Remove/raname the file '/home/smartassskeleton/.local/share/Paradox Interactive/Europa Universalis IV/launcher-v2.sqlite' and try again".

I did try to follow as the warning states and remove the file. After relaunching I still get the same error.

I've tried to follow other suggestions from similar posts and removing
  • .paradoxlauncher
  • .local/share/Paradox\ Interactive/launcher-v2
  • .local/share/Paradox\ Interactive/launcherpath
Then trying to relaunch to no avail. I'd be happy if someone can help me resolve the issue.

Launching Stellaris via steam on the same machine works without any problems.

I've attached a clean log file from my latest try to launch the game.

Happy weekend :)
 

Attachments

  • launcher-2022-12-03.log
    13,8 KB · Views: 0
Last edited:
Does '/home/smartassskeleton/.local/share/Paradox Interactive/Europa Universalis IV/launcher-v2.sqlite' when you start the launcher again after deleting the file(the launcher should be closed when deleting it)? If it gets created, is it a valid sqlite3 file? If you have the sqlite3 command line tool, you can open it with sqlite3 '/home/smartassskeleton/.local/share/Paradox Interactive/Europa Universalis IV/launcher-v2.sqlite' and then enter the command .tables to see a list of tables in the file. According to your log, the launcher fails to read the tables "mods" and "playsets" from it.

Disclaimer: I'm not working for Paradox. I'm just trying to help people.
 
Thank you grotaclas!

I deleted the file while the launcher was closed and had an other try at it when the launcher was open.
The file gets recreated when I relaunch the game.

I'm comfortable around the command line and tried to look in to the sqlite file using the sqlite3 cli as you suggested.
Bash:
sqlite3 launcher-v2.sqlite

SQLite version 3.40.0 2022-11-16 12:10:08
Enter ".help" for usage hints.
sqlite> .tables
knex_migrations       knex_migrations_lock
sqlite>

The tables don't exist as we can see, but the first error we see in the the log I provided is Failed to initialize models: VError: Knex initialization failed: Database migration failed: ROLLBACK - SQLITE_ERROR: cannot rollback - no transaction is active . I also tried selecting all rows in the table, but the knex_migrations table is empty and all knex_migrations_lock has is 1|0.

I don't know how to proceed from here.
 
I also have tables knex_migrations, knex_migrations_lock and a bunch of others. knex_migrations has a 19 entries, but this might be, because my file has been used by a few launcher versions(edit: probably not, because I just realized that all timestamps are from july 29th when I reinstalled my system). But I have no idea why the launcher fails to create and populate the other tables in your case.
I have a few ideas which you could try, but they are somewhat far fetched:
  • copy the launcher-v2.sqlite from stellaris (optionally empty its stellaris specific information about mods and playsets)
  • subscribe to a mod in steam, so that the launcher has some mods to store there
  • unsubscribe from all mods
  • uninstall the launcher and delete the launcher-v2.sqlite before you start eu4 from steam again, so that the launcher version which comes with eu4 can try to create the file(it is probably a little older than the 2022.14 from your log)
  • choose an older eu4 version in the betas tab in the eu4 properties in steam, uninstall the launcher and delete launcher-v2.sqlite and then launch that version so that you get an older launcher(1.33 or 1.32 might be good candidates, because they are not too old)
  • use the following sql commands to create the missing tables in your sqlite file:
Code:
CREATE TABLE `knex_migrations` (`id` integer not null primary key autoincrement, `name` varchar(255), `batch` integer, `migration_time` datetime);
CREATE TABLE `knex_migrations_lock` (`index` integer not null primary key autoincrement, `is_locked` integer);
CREATE TABLE `mods` (`id` char(36) not null, `pdxId` varchar(255), `steamId` varchar(255), `gameRegistryId` text, `name` varchar(255), `displayName` varchar(255), `description` text, `thumbnailUrl` text, `thumbnailPath` text, `version` varchar(255), `tags` json default '[]', `requiredVersion` varchar(255), `arch` text, `os` text, `repositoryPath` text, `dirPath` text, `archivePath` text, `status` text not null, `source` text not null, `cause` text null default null, `timeUpdated` integer, `isNew` boolean, `createdDate` datetime, `subscribedDate` datetime, `size` integer, `metadataId` varchar(255), `remotePdxId` varchar(255), `remoteSteamId` varchar(255), `metadataVersion` varchar(255), `isMetadataApplied` boolean not null default '0', primary key (`id`));
CREATE TABLE `mods_dependencies` (`modId` char(36) not null, `modVersion` varchar(255) not null, `dependencyType` text not null, `dependencyId` char(36) not null, `dependencyVersion` varchar(255), `dependencyName` varchar(255), primary key (`modId`, `modVersion`, `dependencyId`));
CREATE TABLE `dlc` (`id` char(36) not null, `name` varchar(255) not null, `dirPath` varchar(255) not null, primary key (`id`));
CREATE TABLE playsets (
        id char(36) not null,
        name varchar(255) not null,
        isActive boolean,
        loadOrder varchar(255),
        pdxId int,
        pdxUserId char(36),
        createdOn datetime not null,
        updatedOn datetime,
        syncedOn datetime,
        lastServerChecksum text,
        isRemoved boolean not null default false, `hasNotApprovedChanges` boolean not null default '0', `syncState` varchar(255),
        primary key (id),
        constraint uq_pdxId unique (pdxId)
      );
CREATE TABLE `playsets_mods` (`playsetId` char(36) not null, `modId` char(36) not null, `enabled` boolean default '1', `position` integer, foreign key(`playsetId`) references `playsets`(`id`) on delete CASCADE, foreign key(`modId`) references `mods`(`id`) on delete CASCADE);
CREATE TABLE `metadata_relationships` (`id` char(36) not null, `modMetadataId` varchar(255) not null, `relationshipId` varchar(255) not null, `relationshipType` text not null, `resourceType` text not null, `requiredVersion` varchar(255), `displayName` varchar(255), primary key (`id`));
You could even populate the knex tables with the information from my file:
Code:
INSERT INTO knex_migrations VALUES(1,'initialSchema',1,1659115828469);
INSERT INTO knex_migrations VALUES(2,'addIsNewColumn',1,1659115828470);
INSERT INTO knex_migrations VALUES(3,'addPrimaryToPlaysetMods',1,1659115828474);
INSERT INTO knex_migrations VALUES(4,'addLoadOrderColumn',1,1659115828475);
INSERT INTO knex_migrations VALUES(5,'addCreatedAndSubscribedDate',1,1659115828477);
INSERT INTO knex_migrations VALUES(6,'addSizeColumn',1,1659115828478);
INSERT INTO knex_migrations VALUES(7,'modsDependencies',1,1659115828479);
INSERT INTO knex_migrations VALUES(8,'modStatusEnumColumnType',1,1659115828491);
INSERT INTO knex_migrations VALUES(9,'removeEnumChecks',1,1659115828568);
INSERT INTO knex_migrations VALUES(10,'addDlcTable',1,1659115828574);
INSERT INTO knex_migrations VALUES(11,'updateDlcDependenciesId',1,1659115828576);
INSERT INTO knex_migrations VALUES(12,'extendPlaysetsTable',1,1659115828611);
INSERT INTO knex_migrations VALUES(13,'modifyPositionToInteger',1,1659115828636);
INSERT INTO knex_migrations VALUES(14,'addHasNotApprovedChangesColumn',2,1659116879676);
INSERT INTO knex_migrations VALUES(15,'addModLFv11Columns',2,1659116879677);
INSERT INTO knex_migrations VALUES(16,'migrateIdToRemoteId',2,1659116879682);
INSERT INTO knex_migrations VALUES(17,'playsetsSyncState',2,1659116879688);
INSERT INTO knex_migrations VALUES(18,'addMetadataRelationshipTable',2,1659116879690);
INSERT INTO knex_migrations VALUES(19,'addIsMetadataAppliedColumn',2,1659116879691);
INSERT INTO knex_migrations_lock VALUES(1,0);
 
  • 1Like
Reactions:
Good morning grotaclas,

I tried creating the tables using the table structure you provided. Well, it resolved all the errors about tables not existing, but it created an other error:

Bash:
2022-12-04T01:56:22.030Z (pid:1225832) warn [GfnService]: Failed to close GeforceNow runtime
2022-12-04T01:56:22.054Z (pid:1225832) info [SocketServer]: Listening for connections on 127.0.0.1:11000
2022-12-04T01:56:22.296Z (pid:1225832) info [LauncherUpdateHandler]: Checking for launcher updates
2022-12-04T01:56:22.388Z (pid:1225832) info [AppsMetaDataManager]: Loading apps metadata
2022-12-04T01:56:22.399Z (pid:1225832) info [Game container]: Initializing game container (game directory: null || ~/.local/share/Steam/steamapps/common/Europa Universalis IV)
2022-12-04T01:56:22.472Z (pid:1225832) error [Game container]: Failed to initialize models: VError: Knex initialization failed: Database migration failed: create table `mods` (`id` char(36) not null, `pdxId` varchar(255), `steamId` varchar(255), `gameRegistryId` text, `name` varchar(255), `displayName` varchar(255), `description` text, `thumbnailUrl` text, `thumbnailPath` text, `version` varchar(255), `tags` json default '[]', `requiredVersion` varchar(255), `arch` text, `os` text, `repositoryPath` text, `dirPath` text, `archivePath` text, `status` text check (`status` in ('ready_to_play', 'invalid_mod', 'initialized', 'to_install', 'installation_failed', 'interrupted_installation', 'cancelling_installation', 'to_remove', 'interrupted_removal', 'removal_finished', 'unsubscribed', 'to_unsubscribe')) not null, `source` text check (`source` in ('pdx', 'steam', 'local')) not null, `cause` text null default null, `timeUpdated` integer, primary key (`id`)) - SQLITE_ERROR: table `mods` already exists
    at knex_container_KnexContainer.initialize (~/.paradoxlauncher/launcher-v2.2022.14/resources/app/dist/main/main.js:8:2440931)
    at async setupGameContainer (~/.paradoxlauncher/launcher-v2.2022.14/resources/app/dist/main/main.js:8:2793590)
    at async initializeContainerAsync (~/.paradoxlauncher/launcher-v2.2022.14/resources/app/dist/main/main.js:8:2793953)
    at async initializeGameContainer (~/.paradoxlauncher/launcher-v2.2022.14/resources/app/dist/main/main.js:8:2796373)
    at async _initializeGame (~/.paradoxlauncher/launcher-v2.2022.14/resources/app/dist/main/main.js:8:2796254)
    at async IpcServer.onInvoke (~/.paradoxlauncher/launcher-v2.2022.14/resources/app/dist/main/main.js:8:2894077)
    at async electron/js2c/browser_init.js:201:563
2022-12-04T01:56:22.472Z (pid:1225832) info [Game container]: Game ID: eu4
2022-12-04T01:56:22.472Z (pid:1225832) info [Game container]: Game dist platform: steam
2022-12-04T01:56:22.487Z (pid:1225832) info [ModsRegistryMigration]: SKIPPING Migration from ModsRegistry into playsets. Reason: There are no mods to migrate from ModsRegistry
2022-12-04T01:56:22.503Z (pid:1225832) info [MigrateMods]: Mods migration started
2022-12-04T01:56:22.504Z (pid:1225832) info [SteamService]: Getting subscribed Steam workshop items
2022-12-04T01:56:22.504Z (pid:1225832) info [SteamService]: Expecting 0 items
2022-12-04T01:56:22.504Z (pid:1225832) info [SteamService]: Got "0" workshop items in total
2022-12-04T01:56:22.535Z (pid:1225832) info [Game container]: Game container successfully initialized
2022-12-04T01:56:22.554Z (pid:1225832) info [GetSettingsLayout]: Loading in-game settings
2022-12-04T01:56:22.555Z (pid:1225832) info [IngameSettingsRepositoryV0]: Loading in-game settings
2022-12-04T01:56:22.665Z (pid:1225832) warn [TelemetryService]: No telemetry data to send
2022-12-04T01:56:22.666Z (pid:1225832) info [SteamService]: Getting subscribed Steam workshop items
2022-12-04T01:56:22.666Z (pid:1225832) info [SteamService]: Expecting 0 items
2022-12-04T01:56:22.666Z (pid:1225832) info [SteamService]: Got "0" workshop items in total
2022-12-04T01:56:22.693Z (pid:1225832) warn [ModHandler]: Window is already subscribed to Steam events
2022-12-04T01:56:22.694Z (pid:1225832) warn [ModHandler]: (eu4) Window is already subscribed to pdx events
2022-12-04T01:56:23.028Z (pid:1225832) info [LauncherUpdateHandler]: Latest launcher version: 2022.14
2022-12-04T01:56:23.479Z (pid:1225832) info [LauncherUpdater]: Current launcher version is: "2022.14"
2022-12-04T01:56:23.479Z (pid:1225832) info [LauncherUpdateHandler]: No launcher updates available
2022-12-04T01:56:29.373Z (pid:1225832) warn [GfnService]: Failed to close GeforceNow runtime

As we can see now it tries to create the tables that are already created for some reason. Which lead me to believe that the knex migration needs to be flagged as run somehow.

Then I saw that in your population script there's a line that adds 'initialSchema',1 to the table. I ended up running your population script and the error was resolved.

I also tried to install and uninstall mods and trying to shift playsets and it seems to be working. I just hope this won't break any long term functionality and would be happy if a Paradox official would take a look at this and confirm this, maybe even apply a fix to it?

Thank you so much grotaclas and have a happy weekend!