Description
When creating a new KeePass database in the root of My Drive using the built-in Google Drive connection, KeePassium fails with a 404 error:
File not found: .
Opening and downloading an existing KDBX file from the same Google Drive connection works correctly.
How to reproduce
- Open KeePassium.
- Add/connect Google Drive as a remote file connection.
- Open My Drive.
- Choose the option to create a new KeePass database.
- Enter a database name, for example My Password.
- Save/create the database in the root of My Drive.
- KeePassium reports an error: File not found: .
Expected behavior
The new KeePass database should be created successfully in the root of Google Drive (My Drive).
Screenshots
Not applicable. The error is reproducible from the application log.
Environment
- Device: MacBook Pro (Apple Silicon / M1)
- OS: macOS 26.x
- App Version: KeePassium 2.5.171
Additional context
Existing KDBX files in the same Google Drive connection can be opened and downloaded successfully.
The KeePassium diagnostic log shows:
Creating a file
Creating new file
followed by a Google Drive API HTTP 404 response:
File not found: .
I inspected the KeePassium source code and noticed a possible cause.
GoogleDriveItem.getSpecialFolder(.myDrive, ...) represents the My Drive root with an empty ID (id: ""). The code in GoogleDriveItem.getRequestURL(.children(...)) already handles this case by using:
'root' in parents
However, GoogleDriveManager.createFile() currently derives the parent ID directly from folder.id (except for the App Folder case). This appears to result in an empty parent ID when creating a file in the My Drive root, rather than using the Google Drive root ID (root).
Could this be the cause of the 404 error?
Description
When creating a new KeePass database in the root of My Drive using the built-in Google Drive connection, KeePassium fails with a 404 error:
File not found: .
Opening and downloading an existing KDBX file from the same Google Drive connection works correctly.
How to reproduce
Expected behavior
The new KeePass database should be created successfully in the root of Google Drive (My Drive).
Screenshots
Not applicable. The error is reproducible from the application log.
Environment
Additional context
Existing KDBX files in the same Google Drive connection can be opened and downloaded successfully.
The KeePassium diagnostic log shows:
Creating a file
Creating new file
followed by a Google Drive API HTTP 404 response:
File not found: .
I inspected the KeePassium source code and noticed a possible cause.
GoogleDriveItem.getSpecialFolder(.myDrive, ...) represents the My Drive root with an empty ID (id: ""). The code in GoogleDriveItem.getRequestURL(.children(...)) already handles this case by using:
'root' in parents
However, GoogleDriveManager.createFile() currently derives the parent ID directly from folder.id (except for the App Folder case). This appears to result in an empty parent ID when creating a file in the My Drive root, rather than using the Google Drive root ID (root).
Could this be the cause of the 404 error?