-
Notifications
You must be signed in to change notification settings - Fork 407
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
VF Language Server - textDocument/documentHighlight failed #5593
Comments
Hi @humairazaman-devsinc, Can we see what other error messages are present? What are the 5 errors in the Problems tab? And what do you see when you run |
Sorry about the typo - I did mean You see this every time you uncomment the style tag, right? If you can consistently reproduce the issue this way, can you please comment and uncomment the style tag again to produce the error a second time? And please send us all the error messages that you see. |
Screen.Recording.2024-05-14.at.9.55.45.AM.online-video-cutter.com.mp4^ This is what happens on commenting/uncommenting the code, on formatting, on clicking the style line (I forgot to make it absolutely clear, but clicking something other than the style lines doesn't cause trouble) and on opening the dev tools. I haven't used the dev tools before, so if there was something else you wanted to see, let me know and I'll check that too. One other problem that I forgot to add was that if you change it and try to deploy it, the Screen.Recording.2024-05-14.at.10.29.42.AM.mov |
@humairazaman-devsinc Thank you for your video of the issue. Our team is currently working on an attempt to reproduce this issue. We'll let you know when we have a reproduction and are able to proceed. Thank you for your patience. |
This issue has been linked to a new work item: W-15773029 |
Hi @humairazaman-devsinc, Our team has found a reproducer for this error and have identified this to be a bug. We have created a new work item and will prioritize it in our next grooming session. However, I'm still able to deploy the Visualforce page to my scratch org and see the results of the deployment after seeing the error. Since the error only happens when you format, are you able to deploy if you turn off format on save? If you save without formatting, are you able to deploy the Visualforce page and see the results? |
Yes, I can still deploy even with the error. The Output tab remains stuck on the VF Language Server potentially because every time it tries to move away, another error comes in and deems the VF Language Server the most relevant view. As such, while the deployment happens, it is hard to see the logs for it, unless I preemptively move to a different tab, and even then, sometimes the problem persist for a small while. Everything actually works fine, even the formatter can be made to work with an outside linter or via commenting and uncommenting the style tag. There is no real blocker, only a major inconvenience. Thanks for the help, and looking forward to having this fixed whenever it happens. |
Summary
I have a VisualForce page. It has many tags, including apex tags, html tags and a script tag, and nothing goes wrong. The moment I add a <style> tag, every time I try to format it (and I have a format on save as well as an autosaver, so that happens a lot) I get the Visualforce Language Server error
The error message changes slightly according to unknown circumstances, I have also noticed
js_source_text is not defined
, but the error code remains the same.If I comment out the script tag, everything works, and there is no error message.
EDIT: I just realized that
Debug Failure. False expression.
triggers if I click a line of code within the <script> tags, and thejs_source_text is not defined
shows up when I attempt to format. Neither shows up if the <style> tag is commented.Steps To Reproduce:
Expected result
Code is formatted.
Actual result
Code is not formatted, instead, there is an error message in the Visualforce Language Server output.
Additional information
Salesforce Extension Version in VS Code: v60.12.0
Salesforce CLI Version: v60.12.0
OS and version: Mac v 12.7.4
VS Code version: Version: 1.89.0 (Universal)
Most recent version of the extensions where this was working: It never worked for me.
The text was updated successfully, but these errors were encountered: