Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exception has occurred: RangeError [ERR_OUT_OF_RANGE] #1699

Closed
Jason3S opened this issue Oct 26, 2021 · 3 comments
Closed

Exception has occurred: RangeError [ERR_OUT_OF_RANGE] #1699

Jason3S opened this issue Oct 26, 2021 · 3 comments
Assignees
Labels
bug Something isn't working
Milestone

Comments

@Jason3S
Copy link

Jason3S commented Oct 26, 2021

  • GitLens Version:
    GitLens (Insiders) v2021.10.2305
  • Git Version: Run git --version
    git version 2.26.0
  • VSCode Version: Run code --version
    Version: 1.61.2
    Commit: 6cba118ac49a1b88332f312a8f67186f7f3c1643
    Date: 2021-10-19T15:49:28.381Z
    Electron: 13.5.1
    Chrome: 91.0.4472.164
    Node.js: 14.16.0
    V8: 9.1.269.39-electron.0
    OS: Darwin x64 20.6.0
  • OS Version:
    OS: Darwin x64 20.6.0

Steps to Reproduce:

I don't have good step. I was debugging my extension and this error showed up.

image

Call Stack: Exception has occurred: RangeError [ERR_OUT_OF_RANGE]: The value of "err" is out of range. It must be a negative integer. Received 1
Exception has occurred: RangeError [ERR_OUT_OF_RANGE]: The value of "err" is out of range. It must be a negative integer. Received 1
  at Object.getSystemErrorName (util.js:231:11)
    at errnoException (internal/errors.js:501:21)
    at ChildProcess.spawn (internal/child_process.js:403:11)
    at spawn (child_process.js:562:9)
    at execFile (child_process.js:246:17)
    at electron/js2c/asar_bundle.js:5:2242
    at /Users/jason/.vscode/extensions/eamodio.gitlens-insiders-2021.10.2305/dist/webpack:/gitlens-insiders/src/git/shell.ts:183:16
    at new Promise (<anonymous>)
    at run (/Users/jason/.vscode/extensions/eamodio.gitlens-insiders-2021.10.2305/dist/webpack:/gitlens-insiders/src/git/shell.ts:182:9)
    at git (/Users/jason/.vscode/extensions/eamodio.gitlens-insiders-2021.10.2305/dist/webpack:/gitlens-insiders/src/git/git.ts:134:13)
    at Object.rev_parse__show_toplevel (/Users/jason/.vscode/extensions/eamodio.gitlens-insiders-2021.10.2305/dist/webpack:/gitlens-insiders/src/git/git.ts:1298:23)
    at Object.getRepoPathCore (/Users/jason/.vscode/extensions/eamodio.gitlens-insiders-2021.10.2305/dist/webpack:/gitlens-insiders/src/git/gitService.ts:3435:21)
    at Object.<anonymous> (/Users/jason/.vscode/extensions/eamodio.gitlens-insiders-2021.10.2305/dist/webpack:/gitlens-insiders/src/system/decorators/log.ts:113:16)
    at Object.getRepoPath (/Users/jason/.vscode/extensions/eamodio.gitlens-insiders-2021.10.2305/dist/webpack:/gitlens-insiders/src/git/gitService.ts:3381:25)
    at Function.fromUri (/Users/jason/.vscode/extensions/eamodio.gitlens-insiders-2021.10.2305/dist/webpack:/gitlens-insiders/src/git/gitUri.ts:324:26)
    at R.initialize (/Users/jason/.vscode/extensions/eamodio.gitlens-insiders-2021.10.2305/dist/webpack:/gitlens-insiders/src/trackers/trackedDocument.ts:74:15)
    at Function.create (/Users/jason/.vscode/extensions/eamodio.gitlens-insiders-2021.10.2305/dist/webpack:/gitlens-insiders/src/trackers/trackedDocument.ts:30:3)
    at Object.getLogForFile (/Users/jason/.vscode/extensions/eamodio.gitlens-insiders-2021.10.2305/dist/webpack:/gitlens-insiders/src/git/gitService.ts:2316:15)
    at Object.getCommitForFile (/Users/jason/.vscode/extensions/eamodio.gitlens-insiders-2021.10.2305/dist/webpack:/gitlens-insiders/src/git/gitService.ts:1517:15)
    at zi.provideDetailsHover (/Users/jason/.vscode/extensions/eamodio.gitlens-insiders-2021.10.2305/dist/webpack:/gitlens-insiders/src/hovers/lineHoverController.ts:115:16)
    at s.provideHover (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:94:170095)
@Jason3S Jason3S added potential-bug triage Needs to be looked at labels Oct 26, 2021
@eamodio
Copy link
Member

eamodio commented Nov 4, 2021

Wow -- that's an odd one. It looks like child_process spawn returned some bogus error code or something. Without reproducible steps I don't see anything I can fix here -- since this is inside node.js itself. Have you seen it more than this one time?

@eamodio eamodio added needs-more-info Needs further information, steps, details, etc. and removed triage Needs to be looked at labels Nov 4, 2021
@Jason3S
Copy link
Author

Jason3S commented Nov 4, 2021

I have no idea why Node was having an issue. But it prevented me from debugging, so I had to uninstall the extension.

https://github.com/Axosoft/vscode-gitlens/blob/28a3a6bb627529d294f866d52ef65292281e2979/src/hovers/lineHoverController.ts#L115-L117

But it is possible to catch the issue: .catch(() => null)

logCommit = await Container.git.getCommitForFile(commit.repoPath, commit.uri.fsPath, {
	ref: commit.sha,
}).catch(() => null);

@github-actions github-actions bot added inactive Issue has not had recent required feedback and removed inactive Issue has not had recent required feedback labels Nov 12, 2021
@eamodio eamodio removed the needs-more-info Needs further information, steps, details, etc. label Nov 16, 2021
@gitkraken gitkraken deleted a comment from github-actions bot Nov 16, 2021
@eamodio eamodio added bug Something isn't working and removed potential-bug labels Nov 16, 2021
@eamodio eamodio added this to the Backlog milestone Nov 16, 2021
@eamodio eamodio self-assigned this Dec 22, 2021
@eamodio eamodio modified the milestones: Backlog, Soon™ Dec 22, 2021
@eamodio eamodio added the pending-release Resolved but not yet released to the stable edition label Dec 22, 2021
@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 22, 2022
@eamodio eamodio removed the pending-release Resolved but not yet released to the stable edition label Mar 1, 2022
@eamodio eamodio modified the milestones: Soon™, Shipped Mar 1, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants
@eamodio @Jason3S and others