Vuze Test Failed: Nat Test Failed: Error: Unexpected End Of File From Server
Posted : admin On 21.08.2019Im not even sure running Vuze 3.0.had him update to 4.0 and the problem was solved. My NAT signal is not showing green, subnet in order to setup the port forwarding properly? Another application may already be using this. I found No, create Any help the type of. Running Vuze NAT/Firewall Test (on 43584, the port installed by the VPN plugin): Testing port TCP 43584. Unable to test: Invalid port given, or test service failed. Another application may already be using this port. (Error: Unexpected end of file from server) Testing port UDP 43584.
When loading my page in Google Chrome, I get a vague error in the console:
Uncaught SyntaxError: Unexpected end of input
I have no idea what is causing it. How would I go about debugging this error?
Qix16 Answers
This particular error is one annoying fact about v8. In most cases your JavaScript is broken in some way. For example missing a }
or something like that.
Example given, this will yield 'Unexpected end of input' too:
But the root cause of the problems seems to be that the requested JSON url has a Content-Type of text/html
which Chrome apparently tries to parse as HTML, which then results in the unexpected end of input due to the fact that the included image tags are being parsed.
Try setting the Content-Type to text/plain
I think it should fix the issues.
Nonetheless, V8 could do a better Job about telling one exactly where the input ended unexpectedly.
NaeTry Firebug for Mozilla - it will show the position of the missing }
.
See my case on another similar question:
In my case, I was trying to parse an empty JSON:
In other words, what happened was the following:
Unable To Test: Invalid Port Given, Or Test Service Failed.
I get this error when I have ommitted a closing brace character (}
)in JavaScript code. Check that your braces are properly balanced.
For the record, for anyone trying to find the various causes for this error. An empty HTML5 data attribute
causes the error too. You should check when the data value is a null string and not include the attribute at all. It goes without saying this is largely relevant to script generated HTML.
DroidOSDroidOSThe issue for me was that I was doing $.ajax with dataType: 'json'
for a POST request that was returning an HTTP 201 (created) and no request body. The fix was to simply remove that key/value.
JSHint is good at finding the location of missing brackets or bad syntax.
Another cause of this error: if your API intentionally responds with no response body, but responds with a 200 OK
status code instead of a 204 No Content
status code. Some JavaScript libraries may not respond well to unexpected content types when there is no content, so use the correct status code!
There will definitely be an open bracket which caused the error.
I'd suggest that you open the page in Firefox, then open Firebug and check the console – it'll show the missing symbol.
Example screenshot:
Manoj KumarManoj KumarMy problem was with Google Chrome cache. I tested this by running my web application on Firefox and I didn't got that error there. So then I decided trying emptying cache of Google Chrome and it worked.
Amir AlAmir AlVuze Firewalled Mac
Since it's an async operation the onreadystatechange
may happen before the value has loaded in the responseText, try using a window.setTimeout(function () { JSON.parse(xhr.responseText); }, 1000);
to see if the error persists? BOL
I faced similar problem using ui bootstrap directive for angularjs - uib-datepicker, when pressing am/pm toggle.
Error in event handler for (unknown): SyntaxError: Unexpected end of JSON input angular timepicker
Turned out it was because of plugin 'Trans-over' (which translates a word when it is clicked). Maybe my answer will help someone, because I didn't found anything on the internet.
I had this error and fixed it by adding the guard on readyState
and status
shown here:
In cases where your JavaScript code is minified to a single line, another cause for this error is using //
instead of /**/
for your comments.
Bad (comments out everything after //
including the closing }
for your function)
Good (confines your comment)
if you got error at Anchor tag,just replace 'Onclick' with 'href' or 'href' with 'Onclick'
Setting the Accept
header to application/json
in the request worked for me when I faced the same problem.
Not the answer you're looking for? Browse other questions tagged debugginggoogle-chromesyntax-error or ask your own question.
Hi,
i've got a problem extracting an archive generated with 7z. The archive was created with 7-Zip 4.65. The command used to create the archive was : '7z.exe a archiv.7z textfile.log'
There is only 1 file in the archive and the content of the file is only ascii text.
Size of the 7z file looks good (i've got several other files with almost the same contents, the same filename inside the archive, only the contents of the file differ).
I'm assuming that only some part of the archiv's header got damaged.
Is there any way to recover the file from the archive?
I could provide a working example and the not working archive.
Would be awesome if someone could give me a hint on howto recover the data.
I saw Roblad has / had a similar problem over here: https://sourceforge.net/p/sevenzip/discussion/45797/thread/c6a35f22/
But i don't know how to provide this information and what to do with the information.
Cheers
Chris