Skip to content

[R-pkg-devel] How to fix "Number of redirects hit maximum amount"?

8 messages · Spencer Graves, Uwe Ligges, Ben Bolker +3 more

#
Hello, All:


TWO QUESTIONS:


1. HOW TO FIX "Number of redirects hit maximum amount"?


For the Ecdat package, CRAN reported, "Number of redirects hit maximum 
amount [www.cde.ca.gov]". Uwe Ligges asked, "Please fix and resubmit."


"www.cde.ca.gov" works for me when I enter it into a browser. Moreover, 
that URL was unchanged after the page appeared. Also, I've looked for 
tools to trace redirects and have so far been unable to find any that 
find any redirect from "www.cde.ca.gov".


2. GITHUB ACTION WITH "--as-cran"?


Is there a way to modify GitHub Action so "R CMD check --as-cran" runs 
on one of the platforms?


** I'm currently concerned about "https://github.com/sbgraves237/Ecdat"


FYI: "R CMD check --as-cran Ecdat_0.4.6.tar.gz" on my local computer a 
few minutes ago found several "(possibly) invalid URLs", none of which 
reported "Number of redirects hit maximum amount". Also, 
"www.cde.ca.gov" was NOT flagged this time.


Should I just document this in "cran-comments.md" and hope for the best?


Thanks, Spencer Graves


-------- Forwarded Message --------
Subject: Re: CRAN package Ecdat
Date: Tue, 2 Sep 2025 12:38:24 +0200
From: Uwe Ligges <ligges at statistik.tu-dortmund.de>
Organization: Fakult?t Statistik, Technische Universit?t Dortmund
To: Spencer Graves <spencer.graves at effectivedefense.org>, CRAN at R-project.org

For your latest submission I wrote

"
Argh, so many false positives or ill configured web sites, but one is 
true positive.

      URL: https://www.cde.ca.gov
        From: man/Caschool.Rd
        Status: Error
        Message: Number of redirects hit maximum amount [www.cde.ca.gov]:
          Maximum (10) redirects followed

Please fix and resubmit.

Best,
Uwe Ligges
"


Best,
Uwe
On 02.09.2025 12:36, Spencer Graves wrote:
#
On 02.09.2025 22:39, Spencer Graves wrote:
I guess you need a different URL.
Have you tried in a web browser? Firefox tells me locally "redirection 
error" (translated from German) and I cannot see any web page. So this 
URL seems to need a change.

Best,
Uwe Ligges
#
Hmm. Maybe there's something region-specific? From Canada, it works 
for me from Firefox or Chromium ...
On 9/2/25 16:46, Uwe Ligges wrote:

  
    
#
There is a single request when loading the page that results in a 301
status code which is a GET request for https://www.google.com/jsapi

Test the url with curl -I https://www.cde.ca.gov/

Curl results in this response, though, which indicates that a 302 redirect
status does occur when the site thinks you're a bot (fair enough in these
LLM days where companies are stealing the internet).

HTTP/1.1 302 Moved Temporarily
Server: rdwr
Date: Tue, 02 Sep 2025 21:12:14 GMT
Content-Type: text/html
Connection: keep-alive

Location:
https://validate.perfdrive.com/?ssa=613ca131-5a8f-43fc-a8f0-b8263d09dd74&ssb=98511261404&ssc=https%3A%2F%2Fwww.cde.ca.gov%2F&ssi=befc02e3-ctxv-4d8c-a298-7ca114da9162&ssk=botmanager_support at radware.com&ssm={snipped}

It's tough because how can anyone be confident that the `Location` header
will ever actually resolve to the provided url?
On Tue, Sep 2, 2025 at 2:00?PM Ben Bolker <bbolker at gmail.com> wrote:

            

  
  
#
Hi, Uwe and Ben:


Thanks for the replies. That URL worked just now in Firefox, Safari and 
Chrome on my Mac and in the browser on my iPhone in Kansas City, 
Missouri, USA.


It's in the documentation for "The California Test Score Data Set" 
(Ecdat::Caschool), which was created years ago by Yves Croissant, a 
professor at the University of Lyon, France, and author of (2024) 
Microeconometrics with R (https://ycroissant.github.io/micsr_book/) and 
several other publications that use R.


The fact that it didn't work for Uwe worries me.[1]


I hesitate to degrade the work of Yves Croissant. I plan to document 
this in "cran-comments.md" and proceed with the other checks outlined in 
Wickham and Bryan, "R Packages". The current version on GitHub has green 
check marks on 5 platforms. As I mentioned, "R CMD check --as-cran" 
locally flagged several URLs that I have checked multiple times and 
found them good -- but did NOT flag "cde.ca.gov".


Reasonable?
Thanks again.
Spencer Graves
On 9/2/25 16:00, Ben Bolker wrote:
#
On Tue, 2 Sep 2025 17:00:18 -0400
Ben Bolker <bbolker at gmail.com> wrote:

            
Definitely. For me, with or without cookies enabled,
https://www.cde.ca.gov/ reliably returns a 303 redirect to
https://www.cde.ca.gov/wafalert.html?_event_transid=<large hexadecimal
string>, which in turn returns a 303 redirect to the same address.

The Internet Wayback Machine does have some good snapshots; not all
captures are redirects to validate.perfdrive.com:
http://web.archive.org/web/*/https://www.cde.ca.gov/
http://web.archive.org/web/20250823081216/https://www.cde.ca.gov/
#
FWIW same here from the other hemisphere - it's an infinite loop in their webserver. I?d say that confirms that the link is not accessible, so definitely needs fixing.

Looking at the package, I think that link is entirely pointless anyway, because it doesn't even point to the data source, so either point to the actual page with the data or remove (pointing to the archive for the CDE front page is just as useless IMHO).

Cheers,
Simon
#
Hello, Simon, Ben, Ivan, Uwe:


Thanks for the suggestions.


I followed Ivan's suggestion of replacing the problem URL with a call to 
a copy on archive.org, and it passed all the tests locally and on 
winbuilder devel, release, and oldrelease.


Spencer Graves
On 9/2/25 18:43, Simon Urbanek wrote: