You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
eoc --latest crashes with a raw stack trace when Maven Central is unreachable #1168
src/parser-version.js's get() (lines 16-29) does a synchronous request to Maven Central and neither catches transport errors nor handles a non-200 response gracefully - it just throws. It is called from src/eoc.js:115 at module load time, which is before program.parseAsync() runs and therefore outside the top-level try/catch at src/eoc.js:439-446. So nothing in the process can catch whatever it throws.
Its sibling function exists() was explicitly hardened for exactly this scenario in #998 and #1085 (warn and proceed instead of crashing), but get() never received the same treatment.
Reproduced in a network namespace with only external network removed (loopback still up):
$ unshare -r -n sh -c 'ip link set lo up; node src/eoc.js --latest lint'
node_modules/sync-rpc/lib/index.js:167
throw error;
^
Error
at extractValue (.../sync-rpc/lib/index.js:165:19)
at Object.get (src/parser-version.js:20:17)
at Object.<anonymous> (src/eoc.js:115:40)
...
code: 'ENETUNREACH'
Note the thrown error has an empty message, so even moving the call inside a try/catch would only print a blank line - the fix needs to be inside get() itself, catching the transport error and falling back the same way exists() does.
What should happen
eoc --latest should behave gracefully when Maven Central is unreachable - warn and fall back to the bundled parser version (mirroring what exists() already does), not print a raw Node internal stack trace with an empty error message.
@morphqdd Thanks for reporting a new bug! You've earned +12 points. By reporting bugs, you help our project improve its quality. If you find anything else in the repository that doesn't look as good as you might expect, do not hesitate to report it. Your running score is +6507; don't forget to check your Zerocracy account too).
Merged #1375 moved latest lookup into preAction, but get() still throws on transport failure without the requested fallback. Verify a useful warning and the bundled parser when Maven Central is unavailable. Next step: review #1229. Current code: src/parser-version.js:22.
Activity
morphqdd commentedon Aug 13, 2026
@yegor256, please take a look when you have a moment.
0crat commentedon Sep 1, 2026
@morphqdd Thanks for reporting a new bug! You've earned +12 points. By reporting bugs, you help our project improve its quality. If you find anything else in the repository that doesn't look as good as you might expect, do not hesitate to report it. Your running score is +6507; don't forget to check your Zerocracy account too).
objectionary#1168: keep the pinned version when Maven Central cannot …
objectionary#1168: keep the pinned version when Maven Central cannot …
objectionary#1168: keep the pinned version when Maven Central cannot …
objectionary#1168: keep the pinned version when Maven Central cannot …
yegor256 commentedon Nov 6, 2026
Merged #1375 moved latest lookup into preAction, but get() still throws on transport failure without the requested fallback. Verify a useful warning and the bundled parser when Maven Central is unavailable. Next step: review #1229. Current code: src/parser-version.js:22.
objectionary#1168: keep the pinned version when Maven Central cannot …