Signalr: XML parsing error: Hub reply does not define a root element

Created on 13 Feb 2018  ·  9Comments  ·  Source: SignalR/SignalR

I'm replicating the issue reported in the SignalR Core repo

This doesn't present a problem of the function, it is just not pretty; when invoking a method on the server my FF Developer tab reports:
XML Parsing Error: no root element found
Location: https://localhost:44311/signalr?id=ff8ff481-439a-4bcc-8f1f-67941a5ca331
Line Number 1, Column 1:

Again, not a bug per se but it does clutter the dev window. Not sure if it can be changed or if the browser is wrong.

I'm getting the same issue on FF when SignalR calls the close function. I'm getting this when the page is unloaded. It's not a big deal, but nobody like getting errors on the dev tools.

Fixed 2.4.0-preview2

Most helpful comment

All 9 comments

I'm experiencing the same issue.

Having the same issue too...

Same here. It seemed to not be this way not but yesterday. Then I changed my hubs to reduce the number of methods. In fact, eliminating all methods because only want to emit events.

I tried adding methods, to see if the XML changed, but no dice.

Using .NET MVC SIGNALR and jquery signalR 2.2.2 and, in firefox, getting following in console...

XML Parsing Error: no root element found
Location: http://l-mmoloney2.qvidiancorp.com/Qvidian.WOPI/signalr/signalr/abort?transport=we.......

This seems to then stop any SIGNALR messaging for the browser.
Is there a new release upcoming to fix this?

2.2.3 - same issue. It seems like SignalR for asp.net is a forgotten project...

@omaximenco It's definitely not forgotten. It's in NPM without jQuery. As the new Core version.
The issue is kinda jQuery because a request without a response body is fine, but only works without throwing in jQuery if you specify the content to be text and not json. :(

@molo9966 Apparently, firefox is losing the connection right after the first connection attempt, the only fix i found was to call the connection function after the disconnection is detected
//Only for firefox $.connection.hub.disconnected(function () { setTimeout(function () { $.connection.hub.start().done(function () { }); }, 1); });
With this it should be alright ;)

lol I think the right fix is not to use jQuery (which is exactly how the new signalR works). But again, if jquery for this version is a must, then the underlying request needs to specify the expected return type as text if no data is to be returned and only a 200.

Was this page helpful?
0 / 5 - 0 ratings