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

Request textDocument/documentSymbol failed #71

Closed
cig0 opened this issue Feb 7, 2018 · 8 comments
Closed

Request textDocument/documentSymbol failed #71

cig0 opened this issue Feb 7, 2018 · 8 comments
Assignees

Comments

@cig0
Copy link

cig0 commented Feb 7, 2018

Hi,

I get the following error whenever I'm editing an Ansible role, inventory or playbook:

[Error - 21:40:53] Request textDocument/documentSymbol failed.
  Message: Request textDocument/documentSymbol failed with message: Cannot read property 'push' of undefined
  Code: -32603 

screen shot 2018-02-06 at 21 41 46-compressed

Thanks

@yaweiw
Copy link
Contributor

yaweiw commented Feb 7, 2018

@yungez

@yungez
Copy link
Collaborator

yungez commented Feb 7, 2018

@cig0 thanks for reporting the issue. we're looking at it and update the result here.

@yungez yungez self-assigned this Feb 7, 2018
@yungez
Copy link
Collaborator

yungez commented Feb 7, 2018

@cig0 after investigation, the error is reproduced. when yaml file is invalid format, such wrong indent etc, extension failed to parse yaml file then this error. we've fixed the code to show nice and clear error message to user. the fix will be shipped in next release, estimate around end of Feb. Stay tuned.

@oestoer
Copy link

oestoer commented Feb 9, 2018

I've got a similar error if the yaml indenting is not correct, just for hover

[Error - 16:03:40] Request textDocument/hover failed.
  Message: Request textDocument/hover failed with message: Cannot read property 'push' of undefined
  Code: -32603 

Fixing the formatting fixes the issue too. Thought to log it anyway.

@kkolk
Copy link

kkolk commented Feb 13, 2018

Could we just suppress this error completely? I don't see any evidence on whatever it's alerting on is affecting the functionality of the runbook. Having my terminal switch to Output anytime, I paste content into a runbook because it needs to output this message is frustrating.

@cig0
Copy link
Author

cig0 commented Feb 13, 2018

Indeed it would be nice to have a switch to let the user completely turn off this functionality to avoid wasting CPU cycles and memory when not needed.

@yungez
Copy link
Collaborator

yungez commented Feb 24, 2018

fixed by PR #69 . released in 0.1.4. pls have a try and let us know if any further question. thanks.

@yungez yungez closed this as completed Feb 24, 2018
@superiums
Copy link

suffering this issue again.

reported by volar:

[Error - 16:40:29] Request textDocument/foldingRange failed.
  Message: Request textDocument/foldingRange failed with message: host.fileExists is not a function
  Code: -32603 

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

No branches or pull requests

6 participants