Skip to content

Conversation

@perminder-17
Copy link
Contributor

When I merged a PR #1105 the CI test were failing, saying that no englishCommit data is available.

TypeError: Cannot read properties of null (reading 'date')
    at GitHubCommitTracker.formatMultiLanguageIssueBody (/home/runner/work/p5.js-website/p5.js-website/.github/actions/translation-tracker/index.js:381:63)
    at GitHubCommitTracker.createMultiLanguageTranslationIssue (/home/runner/work/p5.js-website/p5.js-website/.github/actions/translation-tracker/index.js:306:28)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async checkTranslationStatus (/home/runner/work/p5.js-website/p5.js-website/.github/actions/translation-tracker/index.js:665:21)
    at async main (/home/runner/work/p5.js-website/p5.js-website/.github/actions/translation-tracker/index.js:737:31)

So, in this PR I just added a guard, when the data is null, it shouldn't crash. I haven't gone till the root cause of the problem, @Divyansh013 do you have any idea on this? Since I saw the latest commit to this file was from you. Thanks for the help.

@perminder-17 perminder-17 merged commit 05feac8 into processing:main Jan 27, 2026
4 checks passed
@perminder-17 perminder-17 deleted the englishCommit branch January 27, 2026 10:20
@Divyansh013
Copy link
Member

Hi @perminder-17 great catch!

The root cause when a file had all translations missing (none existed), the loop would:
Add each missing language to missingLanguages
Hit continue before ever reaching the code that fetches englishCommit
Still add the file to the issue queue (because missingLanguages.length > 0)
Crash when trying to format the issue body with englishCommit.date on a null value
I have moved the English commit fetch to the beginning of the file loop, before any language processing. If the commit can't be retrieved, skip the entire file. This ensures any file that reaches the issue creation step has valid commit data.

I have raised #1118 for the same

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants