Skip to content

google drive download/permissions failure #166

Open

Description

@achubaty

using reproducible@AI triggers failure:

── Error ('test-wardDispersalFunction.R:231:3'): test large files ──────────────
Error in `dlErrorHandling(failed, downloadResults, warns, messOrig, numTries, url, fileToDownload, destinationPath, targetFile, checksumFile, verbose)`: Error in retry(downloadCall, retries = 2) : 
  Error in httr2::req_auth_bearer_token(req, bearer) : 
  `token` must be a single string, not `NULL`.

Failed after 2 attempts.

...downloading...
Downloading from Google Drive.
File on Google Drive is 3.9 Mb

Download of https://drive.google.com/file/d/1MHA3LeBuPJXRPkPDp33M6iJmNpw7ePZI failed. This may be a permissions issue. Please check the url and permissions are correct.
If the url is correct, it is possible that manually downloading it will work. To try this, with your browser, go to
https://drive.google.com/file/d/1MHA3LeBuPJXRPkPDp33M6iJmNpw7ePZI,
 ... then download it manually, give it this name: '/tmp/Rtmp9T0tjB/working_dir/Rtmp086lKj/dest_756668387776/dispersalMarch2021.zip', and place file here: /tmp/Rtmp9T0tjB/working_dir/Rtmp086lKj/dest_756668387776.
-------------------
If manual download was successful, you will likely also need to run Checksums manually after you download the file with this command: reproducible:::appendChecksumsTable(checkSumFilePath = '/tmp/Rtmp9T0tjB/working_dir/Rtmp086lKj/dest_756668387776/CHECKSUMS.txt', filesToChecksum = 'dispersalMarch2021/dtSrc.rds', destinationPath = '/tmp/Rtmp9T0tjB/working_dir/Rtmp086lKj/dest_756668387776', append = TRUE)
Backtrace:
    ▆
 1. └─reproducible::prepInputs(...) at test-wardDispersalFunction.R:231:3
 2.   └─reproducible::preProcess(...)
 3.     └─reproducible::downloadFile(...)
 4.       └─reproducible:::dlErrorHandling(...)

Activity

  1. achubaty commented on Nov 6, 2025

    @achubaty
    ContributorAuthor

    this appears to be a problem in reproducible@AI when the user hasn't pre-authenticated with googledrive (PredictiveEcology/reproducible#447)

  2. changed the title [-]test-wardDispersalFunction download/permissions failure[/-] [+]google drive download/permissions failure[/+] on Nov 13, 2025
  3. achubaty commented on Nov 13, 2025

    @achubaty
    ContributorAuthor

    same problem in test-speciesInStudyArea

  4. achubaty commented on Nov 13, 2025

    @achubaty
    ContributorAuthor

    For now, I removed the calls to drive_deauth() in the two failing tests, so they can at least be run locally.

  5. achubaty commented on Dec 1, 2025

    @achubaty
    ContributorAuthor
    ── Error ('test-wardDispersalFunction.R:235:3'): test large files ──────────────
    Error: Error in `retry(retries = 1, quote(googledrive::drive_get(googledrive::as_id(url), shared_drive = team_drive)))`: Error in map(as_id(id), get_one_file_id) : i In index: 1.
    Caused by error in `drive_auth()`:
    ! Can't get Google credentials.
    i Are you running googledrive in a non-interactive session? Consider:
    * Call `drive_deauth()` to prevent the attempt to get credentials.
    * Call `drive_auth()` directly with all necessary specifics.
    i See gargle's "Non-interactive auth" vignette for more details:
    i <https://gargle.r-lib.org/articles/non-interactive-auth.html>
    
    Failed after 1 attempts.
    Backtrace:
        ▆
     1. └─reproducible::prepInputs(...) at test-wardDispersalFunction.R:235:3
     2.   └─reproducible::preProcess(...)
     3.     └─reproducible:::.guessAtFile(...)
     4.       └─reproducible:::assessGoogle(...)
     5.         └─reproducible::retry(...)
    
    [ FAIL 1 | WARN 3 | SKIP 9 | PASS 581 ]
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