Visual Studio Code (vscode) - Request textDocument/documentLink failed error on key press - html

Hi I'm running VSCode on my mac and Windows 10 machine. They've both started displaying the same symptoms after the latest update/rollback.
Every couple of keypresses I get the output box appear, with the "HTML Language Server" selected in the dropdown. The error displayed is:
[Error - 13:47:09] Request textDocument/documentLink failed.
Message: Request textDocument/documentLink failed with message: Path must be a string. Received undefined
Code: -32603
This gets repeated indefinetly and is making VSCode unusable. I'm editing some JSP / JSTL files so I'm wondering if it's some non-valid HTML setting it off, but this has never been an issue before.
All research I've found of this error seems to suggest a faulty extension, but I've currently not got any installed.
Help appreciated!

This is a known issue and, as per this Github issue, the workaround is to open Visual Studio Code on a folder instead of a file.

I too had this popping up this morning, google pointed me to vscode's extensions, so I went through the vscode extensions, updated them all and Debugger for Chrome (2.2.0) was the only one fitting the Error message.
Since I do not have the time right now to file an issue (and answer follow-ups) on https://github.com/Microsoft/vscode-chrome-debug/issues I have just disabled the extension for now.
One thing to note is, while vscode says it is version 2.2.2 in the extension panel, it is 2.2.0 on its marketplace page and github. Might be of some interest to dive in and find out where the extension panel picks up its - false - version number - and find out whether this has some impact on creating the error.

Related

How to fix html error code in VsCode that says Enotdir: not a directory, stat?

I am very new to web development and I am starting my first project using frontendmentor.io. I began my project Monday and everything was working fine. All of a sudden on Tuesday, I began to get a error message when trying to open live server.
The error message reads:
Error: ENOTDIR: not a directory, stat '/Users/username/html/index.html/'
I have searched plenty of forums and cannot really find anything that fits my situation. I am using only HTML and CSS for this project. I uninstalled VSCode and I lost all of my previous work, so I only have the code that frontendmentor provided to get started, but I can post that below if needed. I am sure I did something wrong, I just cannot figure out what exactly.
I had that problem too.
I opened the CSS file with live server instead of index.html file and it works.

Swagger UI Not Loading Sometimes

I'm using latest version of Swagger in my ASPNetCore 3.1 project and debugging on latest version of Chrome. When I try to enter swagger page it sometimes not loading and i see an empty page. It looks like totally random. It solves after I refresh the page.
I saw these errors on console.
GET https://localhost:44389/swagger/swagger-ui-bundle.js net::ERR_HTTP2_PROTOCOL_ERROR
index.html:95 Uncaught ReferenceError: SwaggerUIBundle is not defined
at window.onload (index.html:95)
File in the error is random. Its sometimes a js file, sometimes a .css file. It changes.
If I publish this project on IIS and disable Http/2 support I never encounter this error.
Why?
You can try the following:
1.Check if all your controller methods have [http] tag. If they all do and still doesn't work go to step 2
2.In your configure function to ensure that you have app.UseStaticFiles(); If it still doesn't work go to step 3
3.Uninstall and reinstall swagger. If it doesn't work go to step 4 (Core Only)
4.If you are using Core Install Microsoft.AspNetCore.StaticFiles and reference it in your project.
I encountered the same problem, SwaggerUIBundle is not defined, and the problem is not on the web app that I'm developing but on my network. The problem was resolved after I switch to another network.

Getting exception "Unknown Error" after bundling the application(exe)

We are using the evaluation version of JXBrowser for some charting application. We wanted to showcase a demo to our client just to check the overall performance of charts with JXBrowser. But we encountered some unexpected issue while we were trying to build an "EXE".
The issue:
We created a build and the passed the URL from the classpath(webView.getBrowser().loadURL(getClass().getResource("/chartiq/stx-advanced.html").toExternalForm());); the build successfully generated and if we run the build we are getting exception "Unknown Error" but its working fine in the IDE(Eclipse).
Afterwards, we tried to host the html pages at some server and we were able to get the html rendered in the application.
Question:
1. Is the aforementioned issue related to evaluation version?
2. If above question is not the case, is there any fix for that? As we have crawled the web and find nothing related to this.
For the reference I attached the screen shot showing the full exception stacktrace.
Any help will be appreciated.
Thanks,
Nikhil
The reason of this issue is that JxBrowser doesn't support loading resources from JAR files. Chromium engine used in JxBrowser cannot load the /chartiq/stx-advanced.html file located inside JAR archive. You need to extract the file and load the extracted file.
FYI: we have already started working on the functionality that allows loading HTML files and other resources from JAR archives. An updated build with this functionality will be available in December.

Bizarre Error in Chrome Developer Console - Failed to load resource: net::ERR_CACHE_MISS

As far as I can tell, this error was not being thrown yesterday on Chrome, and as of this morning, it is. I have not changed any of my browser settings. I have attached a screenshot (after opening/closing Developer Tools window four times):
This issue is tangentially similar to Stack Overlow post Failed to load resource under Chrome except that it only occurs when I "Inspect Element" in Chrome. Here are the details I have:
To the best of my ability I undid everything I did since last night (when I did not have this error) and the error persists. When I remove all pre-<html> PHP code, the error disappears.
When I only remove all the pre-<html> PHP code except
<?php session_start(); ?>
the error returns.
Since the error seems to involve PHP, I checked my error log, but there are no notices, warnings, nor errors. When I close the Developer Tools window and then open up the window without a page reload, the number of errors increments by one each time.
When I keep the window open, and then reload the page, the page reloads without throwing the error. However, as soon as I close the Developer tools window again, then open it (no page reload), the error is thrown. I checked my site on Firefox with Firebug enabled, and no errors are thrown, making it seem like a Chrome issue (version 38). My site seems to function normally otherwise. Other sites on device browsed via Chrome (for example, Yahoo) also experience this error.
Also, I have not manually changed any of my browser settings since months ago. As an additional note, this is the second strange error I have encountered in Chrome in the last year (see Stack Overflow question Failed to load resource: net::ERR_NETWORK_IO_SUSPENDED), to which no one was able to find a solution, even with a bounty offered.
Is there a way to prevent this error, or is this a browser-only issue? On a side note, when I open up Developer Tools in Chrome for Stack Overflow, there is no error thrown, so either Stack Overflow is not coded in PHP or they have a way to prevent this error. I think my site is not affected, but I am not 100% sure, and it makes me nervous :)
Per the developers, this error is not an actual failure, but rather "misleading error reports". This bug is fixed in version 40, which is available on the canary and dev channels as of 25 Oct.
Patch
On Chrome's latest update (38.0.2125.104 m at the moment), Google added the option to know whether the files loaded to the website were newly downloaded from the server - or read from the local cache.
When an error like yours "hits" the console - you know the files were just downloaded from the server and not read from the local cache. You can recreate this error by clicking Ctrl + F5 (refresh and erase cache).
It fits your description where Firebug (or equivalents) doesn't fire any errors to the console - whilst Chrome does.
So, the bottom line is - your're just fine and you can ignore this error - it's merely an indicator.
Check to see if you have previously disabled caching in Chrome when the developer console is open - the setting is under the console, settings icon > General tab: Disable cache (while DevTools is open)
Check for the presence of words like "ad", "banner" or "popup" within your file. I removed these and it worked. Based on this post here: Failed to load resource under Chrome it seems like Ad Block Plus was the culprit in my case.
See if you can recreate the issue in an Incognito tab. If you find that the problem no longer occurs then I would recommend you go through your extensions, perhaps disabling them one at a time. This is commonly the cause as touched on by Nikola
I had issues getting through a form because of this error.
I used Ctrl+Click to click the submit button and navigate through the form as usual.

ms-xhelp not recognised

I'm trying to get to grips with the relatively new help system fronted by Microsoft Help Viewer 1.0.
I've found the SDK (at http://www.microsoft.com/en-us/download/details.aspx?id=14923) and have started working through it. I've used Help Library Manager to add the modified help file in step 9 of the "Walkthrough: Branding Package and Content" tutorial, but step 10 tells me to view help by typing a command into a command prompt that starts "ms-xhelp:///". The command prompt responds with a generic unrecognised command response. Pasting the whole thing into Chrome just does a Google search, so obviously that's not recognising it, and pasting it into Internet Explorer attempts to start doing something but then pops a message up "There was a problem sending the command to the program".
Remarkably, this appears to be the first post on here containing "ms-xhelp", and no tags seem directly relevant.
I do have VS2010 installed and it runs help correctly. If I modify the tail end of the URL the web browser opens in, I can get at the newly installed help file, but piggybacking on something that knows what it's doing is unsatisfactory and doesn't show me where things are going wrong. Does anyone know why the "ms-xhelp" approach isn't working?