[Sun, 28 Apr 2024 19:56:01 GMT] Syncing 1480 submissions...
[Sun, 28 Apr 2024 19:56:01 GMT] Got info for submission #321203125
[Sun, 28 Apr 2024 19:56:01 GMT] Getting question data for counting-elements...
[Sun, 28 Apr 2024 19:56:01 GMT] Committing solution for counting-elements...
[Sun, 28 Apr 2024 19:56:01 GMT] HttpError: Must supply either tree.sha or tree.content. Request will be rejected if both are present.
at /home/runner/work/_actions/joshcai/leetcode-sync/v1.6/dist/index.js:6540:21
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async commit (/home/runner/work/_actions/joshcai/leetcode-sync/v1.6/dist/index.js:14666:24)
at async Object.sync (/home/runner/work/_actions/joshcai/leetcode-sync/v1.6/dist/index.js:14914:34)
at async main (/home/runner/work/_actions/joshcai/leetcode-sync/v1.6/dist/index.js:19564:3)
Error: HttpError: Must supply either tree.sha or tree.content. Request will be rejected if both are present.
Turns out the problem counting-elements is a locked/premium problem. As a consequence, fetching the questionData yields null, which then leads to an empty tree.content in the commit, causing the above error.
Interestingly, I do seem to have an accepted solution for the problem in my submission history.
And, No, I wasn't on leetcode premium in the past.
I'm guessing, counting-elements started off as an open problem, but was locked sometime after I'd solved it.
As a hotfix for my personal use, I've wrapped questionData in a template literal. Please feel free to add appropriate fallback text and logs as you deem fit.
Also, shot myself in the foot with the git add . in the pre-commit. Hence a tiny tweak.
PS. Thanks for the good work, Josh. Very nifty tool!
Came across the below error on a recent run:
Turns out the problem counting-elements is a locked/premium problem. As a consequence, fetching the
questionData
yieldsnull
, which then leads to an emptytree.content
in the commit, causing the above error.Interestingly, I do seem to have an accepted solution for the problem in my submission history. And, No, I wasn't on leetcode premium in the past.
I'm guessing,
counting-elements
started off as an open problem, but was locked sometime after I'd solved it.As a hotfix for my personal use, I've wrapped
questionData
in a template literal. Please feel free to add appropriate fallback text and logs as you deem fit.Also, shot myself in the foot with the
git add .
in the pre-commit. Hence a tiny tweak.PS. Thanks for the good work, Josh. Very nifty tool!