marocchino / sticky-pull-request-comment

create comment on pull request, if exists update that comment.
MIT License
418 stars 78 forks source link

Error: invalid json response body at ...... Unexpected end of JSON input #812

Open guowo opened 1 year ago

guowo commented 1 year ago

The issue was:

In our CI workflow, sometimes we will run into the following error: Error: invalid json response body at https://api.github.com/repos/chewielabs/Oscar/issues/1474/comments reason: Unexpected end of JSON input

Below are the details of the error:

Run marocchino/sticky-pull-request-comment@v2 with: message: <!DOCTYPE html>

Image Size Checker - Test

✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅

For A image_size_without_this_pr = 244796 image_size_with_this_pr = 244836 Delta = 40

For B image_size_without_this_pr = 244796 image_size_with_this_pr = 244836 Delta = 40

For current commit, delta between ImageA and ImageB is 0
For previous commit, delta between ImageA and ImageB is 0
Above results are comparing current commit

3983c80a939cac62ec07852bfda455b67af2ac75

vs. Previous commit

28cd7df651fecfdbf43b127f6a2a5446b6b57606

append: false recreate: false delete: false hide_details: false hide: false hide_and_recreate: false hide_classify: OUTDATED ignore_empty: true follow_symbolic_links: false GITHUB_TOKEN: *** env: BUILD_RUN_NUMBER: 229 CONFIG_PATH: ./images/size_checker/ CONFIG_FILE: size_checker.conf COMMIT_LINK: https://github.com/chewielabs/Oscar/commit/ sDiff_A: 40 sDiff_B: 40 sDiff_prev_A_B: 0 sDiff_cur_A_B: 0 emojiState:

✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅

RESULT: ./images/size_checker/passed_result.xml Error: invalid json response body at https://api.github.com/repos/chewielabs/Oscar/issues/1474/comments reason: Unexpected end of JSON input

image-20221107-060451

georgej-github commented 1 year ago

Running into the same issue

marocchino commented 1 year ago

We are using @action/github internally. So It looks like same issue with https://github.com/actions/github-script/issues/256 I'm sorry this isn't the answer you were looking for, but if it's an internal issue, I think we'll have to wait for it to be fixed.