calibreapp / image-actions

A Github Action that automatically compresses JPEGs, PNGs and WebPs in Pull Requests.
https://calibreapp.com/blog/compress-images-in-prs
GNU General Public License v3.0
1.42k stars 67 forks source link

[Bug] HTTPError when committing files #114

Closed yagueto closed 2 years ago

yagueto commented 2 years ago

Describe the bug

When it tries to commit the changes, it fails with an UnhandledPromiseRejectionWarning

How To Reproduce

Steps to reproduce the behavior:

  1. Go to logs
  2. Scroll down to 'Compress images', and then 'Committing Files...'
  3. See error:
    UnhandledPromiseRejectionWarning: HttpError: request to https://api.github.com/repos/[my username]/[my repo]/git/blobs failed, reason: read ECONNRESET
    at /usr/local/src/image-actions/node_modules/@octokit/request/lib/request.js:94:13
    at processTicksAndRejections (internal/process/task_queues.js:97:5)

Expected behaviour

Should add a commit to the PR :upside_down_face:

Screenshots

image

Additional context

Also note that the repo is private; however, yesterday was working nicely. When I click in the URL that it provides, it shows a 404 page

benschwarz commented 2 years ago

Closing as a dupe of #32

yagueto commented 2 years ago

Closing as a dupe of #32

Is it related to this? In this case it doesn’t look like a rate limit, but rather an issue with an inexistent URL. Also, this is strange as I had used it before successfully, and this PR removed multiple images 😅

benschwarz commented 2 years ago

@yagueto The URL isn't a navigable page, it's only for use in the API. The promise rejection is likely a timeout (or rate limit) due to the number of blobs being committed. I still believe it's a dupe of #32.