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

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.

Related

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.

HTTP2 Protocol Error while loading the website

I am facing an issue while loading the angular web app after any deployment and getting error like ERR_HTTP2_PROTOCOL_ERROR. I am still confused about why this issue is coming again and again. Can anyone please help me with this issue.
Size of the client js file which gets auto-generated while building the angular web gets above 5MB size this error usually comes so if anyone facing the same error either optimize the code to bring down the size or manually minify the js file.

Cordova File Download and open it using cordova

Please forgive my ignorance, Any advice/directional assistance would be greatly appreciated.
I have a small app that reads data from an API with json requests.
One of the actions the app needs to do is to download a given PDF and open it either in the app, or in the OS default viewer.
I have followed several guides, but I think I am not including all needed files or something. The guides don't speak of including files of any type, but I still get errors.
In this link for example I followed the steps, but I am getting an error when I add these two lines in to the script at the bottom of the page:
var fileTransfer = new FileTransfer();
console.log(FileTransfer);
When running that I get the error Uncaught ReferenceError: FileTransfer is not defined at employee_documents.html:102
I am sure that either i am not including the files correctly in netbeans or I am missing something simple...
Any advise would be greatly appreciated.
To answer the question specifically. In order to solve the error, you need to run the cordova app using the CLI. In that way, the plugins installed from your cordova will be used otherwise if you're only running it via refresh or something similar it will produce an error like this.
In other words, type this command in your CLI:
cordova run browser
You can change this to your preferred platform (android, ios)

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

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.

Application Cache Error event: Manifest fetch failed (404)

I have a simple html website containing one css and js doc and some images. I need to make this work offline.I use html 5 offline cache for this purpose.
On deploying and browsing i see that the website doesnt cache.Console shows an error :
Application Cache Error event: Manifest fetch failed (404)
Following are the details :
Directory structure :
Manifest file :
Whats wrong?
The file name must be manifest.appcache ; it should not contain names of files other than images/javascript/css/html files. Any other types will result in error in fetching files.
The rule applied to offline caching is ~ 'catch all or none'.
If you are caching mobile data on iPhone, please check the filename since, according to Apple Docs it must be cache.manifest:
Storing Data on the Client
It's already 2019 and I had the very same error message =)
For me renaming the file as manifest.appcache made it work.
In any case, digging further about this error, I found the AppCache API is deprecated (I'm new to these APIs, since I started studying about PWA recently) and no longer recommended (Use CacheStorage + ServiceWorkers instead)
https://developer.mozilla.org/en-US/docs/Web/HTML/Using_the_application_cache
Hope this info can help others on the same path =)
Did you try example.manifest.php? instead of .txt?