Building R repositories on with repo2docker failes with JSON exception

Recently it is not possible for me to build R projects on mybinder anymore. It is possible to load already finished builds from the past, but not to finish new builds.

e.g. GitHub - jokokojote/r-example is an unmodified fork of the binder r example repo GitHub - jokokojote/r-example . When I try to open it with mybinder I get the following logs:

Waiting for build to start...
Picked Git content provider.
Cloning into '/tmp/repo2dockernhez_r8g'...
HEAD is now at bc16a97 Initial commit
Error during build: Extra data: line 1 column 5 (char 4)

The same happens when I try to build this repo locally using repo2binder (repo2binder 2022.10.0 & 2022.02.0, docker desktop 4.19.0 & Engine 23.0.5):

[Repo2Docker] Looking for repo2docker_config in /Users/felixrothe/.virtualenvs
Picked Git content provider.
Cloning into '/var/folders/l8/l4ssxy4d6hbblzt22ngd2gc40000gn/T/repo2docker2xhswdv_'...
remote: Enumerating objects: 21, done.
remote: Counting objects: 100% (21/21), done.
remote: Compressing objects: 100% (17/17), done.
remote: Total 21 (delta 0), reused 18 (delta 0), pack-reused 0
Receiving objects: 100% (21/21), 1.57 MiB | 1.54 MiB/s, done.
Traceback (most recent call last):
  File "/Users/felixrothe/.virtualenvs/docker/lib/python3.8/site-packages/requests/", line 971, in json
    return complexjson.loads(self.text, **kwargs)
  File "/Users/felixrothe/.pyenv/versions/3.8-dev/lib/python3.8/json/", line 357, in loads
    return _default_decoder.decode(s)
  File "/Users/felixrothe/.pyenv/versions/3.8-dev/lib/python3.8/json/", line 340, in decode
    raise JSONDecodeError("Extra data", s, end)
json.decoder.JSONDecodeError: Extra data: line 1 column 5 (char 4)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/felixrothe/.virtualenvs/docker/bin/jupyter-repo2docker", line 8, in <module>
  File "/Users/felixrothe/.virtualenvs/docker/lib/python3.8/site-packages/repo2docker/", line 418, in main
  File "/Users/felixrothe/.virtualenvs/docker/lib/python3.8/site-packages/repo2docker/", line 830, in start
  File "/Users/felixrothe/.virtualenvs/docker/lib/python3.8/site-packages/repo2docker/", line 780, in build
    picked_buildpack.render(), extra=dict(phase="building")
  File "/Users/felixrothe/.virtualenvs/docker/lib/python3.8/site-packages/repo2docker/buildpacks/", line 458, in render
    for user, script in self.get_build_scripts():
  File "/Users/felixrothe/.virtualenvs/docker/lib/python3.8/site-packages/repo2docker/buildpacks/", line 269, in get_build_scripts
    cran_mirror_url = self.get_cran_mirror_url(self.checkpoint_date)
  File "/Users/felixrothe/.virtualenvs/docker/lib/python3.8/site-packages/repo2docker/buildpacks/", line 232, in get_cran_mirror_url
    return self.get_rspm_snapshot_url(snapshot_date)
  File "/Users/felixrothe/.virtualenvs/docker/lib/python3.8/site-packages/repo2docker/buildpacks/", line 191, in get_rspm_snapshot_url
    snapshots =
  File "/Users/felixrothe/.virtualenvs/docker/lib/python3.8/site-packages/requests/", line 975, in json
    raise RequestsJSONDecodeError(e.msg, e.doc, e.pos)
requests.exceptions.JSONDecodeError: Extra data: line 1 column 5 (char 4)

I am new to binder and repo2docker so I am not sure if I miss something important here or it is a bug indeed.

Building new R projects on mybinder worked until a few days ago, so I would suspect an upgrade problem maybe.

RStudio recently changed the location of their package repository:

This will hopefully be deployed to in the next few minutes.