nix-community / nixpkgs-update-github-releases

Fetches releases from github for https://github.com/ryantm/nixpkgs-update
Creative Commons Zero v1.0 Universal
3 stars 2 forks source link

Recently broken "raise JSONDecodeError("Expecting value", s, err.value) from None" #8

Closed ryantm closed 6 months ago

ryantm commented 2 years ago

Hi, I'm working on debugging this but I'm just posting this here in case the backtrace makes the problem obvious to you:

Nov 13 19:46:02 nix-community-build02 nixpkgs-update-github-start[1033465]: Fetching page 2 for kythe/kythe
Nov 13 19:46:07 nix-community-build02 nixpkgs-update-github-start[1033465]: Discarding unfit version 2021-06-30 (2021-06-28 03:42:17+00:00), because it is older than our current version 2021-06-30.
Nov 13 19:46:16 nix-community-build02 nixpkgs-update-github-start[1033465]: Discarding unfit version v2.0 (2016-11-07 08:38:45+00:00), because it is older than our current version unstable-2020-09-10.
Nov 13 19:46:17 nix-community-build02 nixpkgs-update-github-start[1033465]: Discarding unfit version 1.2 (2016-07-17 23:09:10+00:00), because it is older than our current version 2019-08-20.
Nov 13 19:46:26 nix-community-build02 nixpkgs-update-github-start[1033465]: 3600 requests remaining this hour!
Nov 13 19:46:30 nix-community-build02 nixpkgs-update-github-start[1033465]: Discarding unfit version v0.5.1 (2016-05-18 11:28:35+00:00), because it is older than our current version unstable-2020-06-27.
Nov 13 19:46:39 nix-community-build02 nixpkgs-update-github-start[1033465]: Discarding unfit version v0.3 (2016-12-02 02:35:28+00:00), because it is older than our current version unstable-2018-08-25.
Nov 13 19:46:42 nix-community-build02 nixpkgs-update-github-start[1033465]: Discarding unfit version v0.1.0 (2018-12-25 09:08:35+00:00), because it is older than our current version unstable-2021-04-02.
Nov 13 19:46:51 nix-community-build02 nixpkgs-update-github-start[1033465]: Discarding unfit version 1.3.0 (2020-06-15 18:20:55+00:00), because it is older than our current version unstable-2021-06-02.
Nov 13 19:46:56 nix-community-build02 nixpkgs-update-github-start[1033465]: Discarding unfit version 1.0.9 (2014-10-02 14:05:46+00:00), because it is older than our current version 2019-08-23.
Nov 13 19:47:08 nix-community-build02 nixpkgs-update-github-start[1033465]: Discarding unfit version v0.1.0 (2017-10-27 13:51:51+00:00), because it is older than our current version unstable-2020-08-13.
Nov 13 19:47:22 nix-community-build02 nixpkgs-update-github-start[1033465]: 3500 requests remaining this hour!
Nov 13 19:47:23 nix-community-build02 nixpkgs-update-github-start[1033465]: Cached stats:
Nov 13 19:47:23 nix-community-build02 nixpkgs-update-github-start[1033465]: {False: 1282, True: 2422}
Nov 13 19:47:23 nix-community-build02 nixpkgs-update-github-start[1033465]: Traceback (most recent call last):
Nov 13 19:47:23 nix-community-build02 nixpkgs-update-github-start[1033465]:   File "/nix/store/jkbiaghi4nkyczjy9g1lgzdza13mrnb8-nixpkgs-update-github-releases-src/main.py", line 349, in <module>
Nov 13 19:47:23 nix-community-build02 nixpkgs-update-github-start[1033465]:     main()
Nov 13 19:47:23 nix-community-build02 nixpkgs-update-github-start[1033465]:   File "/nix/store/jkbiaghi4nkyczjy9g1lgzdza13mrnb8-nixpkgs-update-github-releases-src/main.py", line 339, in main
Nov 13 19:47:23 nix-community-build02 nixpkgs-update-github-start[1033465]:     for line in updateLines(meta):
Nov 13 19:47:23 nix-community-build02 nixpkgs-update-github-start[1033465]:   File "/nix/store/jkbiaghi4nkyczjy9g1lgzdza13mrnb8-nixpkgs-update-github-releases-src/main.py", line 327, in updateLines
Nov 13 19:47:23 nix-community-build02 nixpkgs-update-github-start[1033465]:     nextVersion = getNextVersion(version, page)
Nov 13 19:47:23 nix-community-build02 nixpkgs-update-github-start[1033465]:   File "/nix/store/jkbiaghi4nkyczjy9g1lgzdza13mrnb8-nixpkgs-update-github-releases-src/main.py", line 287, in getNextVersion
Nov 13 19:47:23 nix-community-build02 nixpkgs-update-github-start[1033465]:     nextVersionDate = latestRelease(*userRepo)
Nov 13 19:47:23 nix-community-build02 nixpkgs-update-github-start[1033465]:   File "/nix/store/jkbiaghi4nkyczjy9g1lgzdza13mrnb8-nixpkgs-update-github-releases-src/main.py", line 202, in latestRelease
Nov 13 19:47:23 nix-community-build02 nixpkgs-update-github-start[1033465]:     for tag in releases:
Nov 13 19:47:23 nix-community-build02 nixpkgs-update-github-start[1033465]:   File "/nix/store/jkbiaghi4nkyczjy9g1lgzdza13mrnb8-nixpkgs-update-github-releases-src/main.py", line 184, in iterReleases
Nov 13 19:47:23 nix-community-build02 nixpkgs-update-github-start[1033465]:     result = getEndpoint(f'/repos/{user}/{repo}/releases?page={page}')
Nov 13 19:47:23 nix-community-build02 nixpkgs-update-github-start[1033465]:   File "/nix/store/jkbiaghi4nkyczjy9g1lgzdza13mrnb8-nixpkgs-update-github-releases-src/main.py", line 167, in getEndpoint
Nov 13 19:47:23 nix-community-build02 nixpkgs-update-github-start[1033465]:     return resp.json()
Nov 13 19:47:23 nix-community-build02 nixpkgs-update-github-start[1033465]:   File "/nix/store/yackizmlflwf97j5z9ka5j1g1lrq301z-python3-3.9.6-env/lib/python3.9/site-packages/requests/models.py", line 910, in json
Nov 13 19:47:23 nix-community-build02 nixpkgs-update-github-start[1033465]:     return complexjson.loads(self.text, **kwargs)
Nov 13 19:47:23 nix-community-build02 nixpkgs-update-github-start[1033465]:   File "/nix/store/8dxxjbiyxwkvh53q5kh6nydla2anacgi-python3-3.9.6/lib/python3.9/json/__init__.py", line 346, in loads
Nov 13 19:47:23 nix-community-build02 nixpkgs-update-github-start[1033465]:     return _default_decoder.decode(s)
Nov 13 19:47:23 nix-community-build02 nixpkgs-update-github-start[1033465]:   File "/nix/store/8dxxjbiyxwkvh53q5kh6nydla2anacgi-python3-3.9.6/lib/python3.9/json/decoder.py", line 337, in decode
Nov 13 19:47:23 nix-community-build02 nixpkgs-update-github-start[1033465]:     obj, end = self.raw_decode(s, idx=_w(s, 0).end())
Nov 13 19:47:23 nix-community-build02 nixpkgs-update-github-start[1033465]:   File "/nix/store/8dxxjbiyxwkvh53q5kh6nydla2anacgi-python3-3.9.6/lib/python3.9/json/decoder.py", line 355, in raw_decode
Nov 13 19:47:23 nix-community-build02 nixpkgs-update-github-start[1033465]:     raise JSONDecodeError("Expecting value", s, err.value) from None
Nov 13 19:47:23 nix-community-build02 nixpkgs-update-github-start[1033465]: json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

It gets

raise JSONDecodeError("Expecting value", s, err.value) from None

when calling

resp.json()
ryantm commented 2 years ago

Well, it seems like this problem has gone away without any fix, so maybe it was just a transient error on GitHub's end.

Synthetica9 commented 2 years ago

Oh yeah, thought I had put that here but looks like it got lost in the draft...

zowoq commented 7 months ago

Reopening this, still transient but I've seen it several times.

Synthetica9 commented 7 months ago

Should be fixed by 67faaa6a073ffc4d16b89cba9c668396bb5b5f2e

zowoq commented 7 months ago

Thanks! Deployed in https://github.com/nix-community/infra/pull/1226.

At one point I saw this error several days in a row but only seems to have occurred twice in the last week, don't have logs older than that as the machine was reinstalled. I'll keep checking it for the next couple of weeks and close this if the logs are clear.

Synthetica9 commented 7 months ago

Well twice a week is still pretty frequent, if this doesn't cause any issues by the end of the week we should be able to close this permanently

zowoq commented 6 months ago

No errors since this was deployed, thanks again for fixing it.