Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test failure with latest 'curl' due to redirect to eu.kobotoolbox.org #18

Closed
jeroen opened this issue Mar 1, 2024 · 2 comments
Closed

Comments

@jeroen
Copy link

jeroen commented Mar 1, 2024

The latest version of the curl package changes the default for CURLOPT_UNRESTRICTED_AUTH to 0, which causes the CRAN version of KoboconnectR to fail its tests:

* checking tests ...
  Running ‘spelling.R’
  Running ‘testthat.R’
 ERROR
Running the tests in ‘tests/testthat.R’ failed.
Last 13 lines of output:
    'test-kobo_export_create.R:21:3', 'test-kobo_export_create.R:30:3',
    'test-kobo_exports.R:2:3', 'test-kobo_xls_dl.R:2:3',
    'test-kobotools_api.R:31:3', 'test-kobotools_kpi_data.R:38:3'

  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Failure ('test-kobo_df_download.R:10:3'): invalid input fails ───────────────
  `is.null(...)` did not throw the expected error.
  ── Failure ('test-kobo_media_downloader.R:10:3'): invalid input fails ──────────
  `is.null(kobo_media_downloader(uname = "scary_", pwd = "sy", assetid = "ahwQoXtnbQJB"))` did not throw the expected error.
  ── Failure ('test-kobo_xls_dl.R:12:3'): invalid input fails ────────────────────
  `is.null(kobo_xls_dl(uname = "scary_", pwd = "sy", assetid = "ahwQoXtnbQJB"))` did not throw the expected error.

  [ FAIL 3 | WARN 3 | SKIP 10 | PASS 25 ]
  Error: Test failures
  Execution halted

The problem is that your package makes an authenticated HTTP request to https://kobo.humanitarianresponse.info/ but this API seems to have moved and gets redirected to to https://eu.kobotoolbox.org/.

For security reasons, the new version of curl no longer automatically sends the credentials to the redirected host.

The easiest solution is to search-and-replace kobo.humanitarianresponse.info with eu.kobotoolbox.org in your code.

@asitav-sen
Copy link
Owner

Hi @jeroen ,
Thanks a ton for letting me know. I have just submitted the amended version. I will post here if the submission is accepted.

@jeroen
Copy link
Author

jeroen commented Mar 3, 2024

OK thank you I see it is on cran now. Maybe you should also push the update here to GitHub.

@jeroen jeroen closed this as completed Mar 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants