keymanapp / keyman

Keyman cross platform input methods system running on Android, iOS, Linux, macOS, Windows and mobile and desktop web
https://keyman.com/
Other
402 stars 112 forks source link

bug(developer): `Unexpected exception: RangeError: Invalid time value` retrieving commit time from git #12626

Closed mcdurdin closed 2 weeks ago

mcdurdin commented 2 weeks ago

It won't build, but based on the message, I think it's a problem with our Keyman build system and not your keyboard. So, I guess it has to wait until they fix that.

@mcdurdin

karambolpoular.kpj - fatal KM05001: Unexpected exception: RangeError: Invalid time value
16:15:52   
16:15:52       This error has been automatically reported to the Keyman team.
16:15:52   Call stack:
16:15:52         Identifier:  ada9d440ced142d3986773767d1da821
16:15:52   RangeError: Invalid time value
16:15:52         Application: Keyman Developer
16:15:52       at Date.toISOString (<anonymous>)
16:15:52         Reported at: https://sentry.io/organizations/keyman/projects/keyman-developer/events/ada9d440ced142d3986773767d1da821/
16:15:52       at getLastGitCommitDate (file:///C:/BuildAgent/work/aee9ab97cd908689/keyboards/node_modules/@keymanapp/kmc/build/src/util/getLastGitCommitDate.js:37:27)
16:15:52       at BuildKeyboardInfo.build (file:///C:/BuildAgent/work/aee9ab97cd908689/keyboards/node_modules/@keymanapp/kmc/build/src/commands/buildClasses/BuildKeyboardInfo.js:34:32)
16:15:52       at ProjectBuilder.buildTarget (file:///C:/BuildAgent/work/aee9ab97cd908689/keyboards/node_modules/@keymanapp/kmc/build/src/commands/buildClasses/BuildProject.js:103:37)
16:15:52       at ProjectBuilder.buildProjectTargets (file:///C:/BuildAgent/work/aee9ab97cd908689/keyboards/node_modules/@keymanapp/kmc/build/src/commands/buildClasses/BuildProject.js:84:31)
16:15:52       at ProjectBuilder.run (file:///C:/BuildAgent/work/aee9ab97cd908689/keyboards/node_modules/@keymanapp/kmc/build/src/commands/buildClasses/BuildProject.js:76:30)
16:15:52       at async build (file:///C:/BuildAgent/work/aee9ab97cd908689/keyboards/node_modules/@keymanapp/kmc/build/src/commands/build.js:138:22)
16:15:52       at async Command.buildFile (file:///C:/BuildAgent/work/aee9ab97cd908689/keyboards/node_modules/@keymanapp/kmc/build/src/commands/build.js:92:14)
16:15:52       at async Command.parseAsync (C:\BuildAgent\work\aee9ab97cd908689\keyboards\node_modules\commander\lib\command.js:935:5)
16:15:52       at async run (file:///C:/BuildAgent/work/aee9ab97cd908689/keyboards/node_modules/@keymanapp/kmc/build/src/kmc.js:55:5)
16:15:53   [/c/BuildAgent/work/aee9ab97cd908689/keyboards] ## build failed

Originally posted by @LornaSIL in https://github.com/keymanapp/keyboards/issues/3143#issuecomment-2457903231

sentry-io[bot] commented 2 weeks ago

Sentry Issue: KEYMAN-DEVELOPER-2AY

mcdurdin commented 2 weeks ago

This issue is arising because the only commit for experimental/k/karambolpoular/HISTORY.md is a merge commit, which we are excluding from our git history search.

The error manifests slightly differently in 17.0 and 18.0. In 17.0, it crashes, because a blank string is not a valid date format. In 18.0, we get msec instead of a date string, so we instead get the current date/time (from NaN), which is also not helpful. So a fix needs to be applied to both versions.