Skip to content

Drive notebook recovery fails after file creation #389

Description

@ashmcmn

Problem

Drive-backed notebook creation can leave a metadata-only file and fail recovery with TypeError: Failed to fetch in the browser.

The ordinary Drive metadata request succeeds, including CORS preflight and the actual response. The recovery path then requests the same file and fields using a slightly different URL shape. Its preflight succeeds, but the actual request fails at the browser boundary.

Reproduction

  1. Start a Drive-backed notebook creation through WebMCP.
  2. Let the initial media upload fail after Drive has created the file.
  3. Retry the same idempotent creation request.
  4. Observe that file discovery and media download succeed, but the version check fails with TypeError: Failed to fetch.

The failed metadata URL omits the redundant fileId query parameter used by the working normal metadata path. Initial media uploads also omit the version receipt fields used by the newer recovery upload path.

Expected behavior

The retry should adopt the existing metadata-only file, verify its current version, upload the intended bytes, and return the persisted Drive URI and revision.

Proposed fix

  • Keep version checks on the request shape already used by the working metadata path.
  • Request version receipt fields from initial media uploads too.
  • Preserve shared-drive and resource-key behavior.

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions