Skip to content

Google Drive: creating a new database in My Drive fails with 404 "File not found: ." #543

Description

@cnukep

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

  1. Open KeePassium.
  2. Add/connect Google Drive as a remote file connection.
  3. Open My Drive.
  4. Choose the option to create a new KeePass database.
  5. Enter a database name, for example My Password.
  6. Save/create the database in the root of My Drive.
  7. 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?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions