XmlException Syntax Error


#1

Hi, just upgraded from 2.0.0.5085 to version 2.0.0.5163 and now getting an XmlException Syntax Error after all nzb downloads. I believe this started occurring thru this commit https://github.com/Sonarr/Sonarr/commit/ae2a97763d3b2541b3393cd33762fe08dbc3256d.

Apart from a way to disable XML validation, just looking for ways that could work around.
This was the nzb file that caused an exception: https://transfer.sh/DqC60/sample.nzb

OS: FreeNAS-11.1-U4
Sonarr: 2.0.0.5163
Mono version: 3.10.0

Thanks

18-5-6 22:00:01.5|Warn|ProcessDownloadDecisions|Couldn't add report to download queue. 
[v2.0.0.5163] System.Xml.XmlException: Syntax Error after '<' character: h http://www.newzbin.com/DTD/nzb/nzb-1.1.dtd Line 1, position 2.
  at System.Xml.DTDReader.ProcessDTDSubset () [0x00169] in /usr/wrkdirprefix/usr/ports/lang/mono/work/mono-3.10.0/mcs/class/System.XML/System.Xml/DTDReader.cs:253 
  at System.Xml.DTDReader.GenerateDTDObjectModel () [0x0012f] in /usr/wrkdirprefix/usr/ports/lang/mono/work/mono-3.10.0/mcs/class/System.XML/System.Xml/DTDReader.cs:166 
  at Mono.Xml2.XmlTextReader.GenerateDTDObjectModel (System.String name, System.String publicId, System.String systemId, System.String internalSubset, Int32 intSubsetStartLine, Int32 intSubsetStartColumn) [0x000b8] in /usr/wrkdirprefix/usr/ports/lang/mono/work/mono-3.10.0/mcs/class/System.XML/System.Xml/XmlTextReader.cs:2442 
  at Mono.Xml2.XmlTextReader.ReadDoctypeDecl () [0x00116] in /usr/wrkdirprefix/usr/ports/lang/mono/work/mono-3.10.0/mcs/class/System.XML/System.Xml/XmlTextReader.cs:2397 
  at Mono.Xml2.XmlTextReader.ReadDeclaration () [0x00062] in /usr/wrkdirprefix/usr/ports/lang/mono/work/mono-3.10.0/mcs/class/System.XML/System.Xml/XmlTextReader.cs:2238 
  at Mono.Xml2.XmlTextReader.ReadContent () [0x00128] in /usr/wrkdirprefix/usr/ports/lang/mono/work/mono-3.10.0/mcs/class/System.XML/System.Xml/XmlTextReader.cs:1279 
  at Mono.Xml2.XmlTextReader.Read () [0x00141] in /usr/wrkdirprefix/usr/ports/lang/mono/work/mono-3.10.0/mcs/class/System.XML/System.Xml/XmlTextReader.cs:573 
  at System.Xml.XmlTextReader.Read () [0x0006b] in /usr/wrkdirprefix/usr/ports/lang/mono/work/mono-3.10.0/mcs/class/System.XML/System.Xml/XmlTextReader2.cs:566 
  at Mono.Xml.XmlFilterReader.Read () [0x00000] in /usr/wrkdirprefix/usr/ports/lang/mono/work/mono-3.10.0/mcs/class/System.XML/Mono.Xml/XmlFilterReader.cs:235 
  at Mono.Xml.XmlFilterReader.Read () [0x00000] in /usr/wrkdirprefix/usr/ports/lang/mono/work/mono-3.10.0/mcs/class/System.XML/Mono.Xml/XmlFilterReader.cs:235 
  at Mono.Xml.XmlFilterReader.Read () [0x00061] in /usr/wrkdirprefix/usr/ports/lang/mono/work/mono-3.10.0/mcs/class/System.XML/Mono.Xml/XmlFilterReader.cs:243 
  at System.Xml.Linq.XDocument.ReadContent (System.Xml.XmlReader reader, LoadOptions options) [0x00053] in /usr/wrkdirprefix/usr/ports/lang/mono/work/mono-3.10.0/mcs/class/System.Xml.Linq/System.Xml.Linq/XDocument.cs:161 
  at System.Xml.Linq.XDocument.LoadCore (System.Xml.XmlReader reader, LoadOptions options) [0x00006] in /usr/wrkdirprefix/usr/ports/lang/mono/work/mono-3.10.0/mcs/class/System.Xml.Linq/System.Xml.Linq/XDocument.cs:147 
  at System.Xml.Linq.XDocument.Load (System.Xml.XmlReader reader, LoadOptions options) [0x00035] in /usr/wrkdirprefix/usr/ports/lang/mono/work/mono-3.10.0/mcs/class/System.Xml.Linq/System.Xml.Linq/XDocument.cs:140 
  at System.Xml.Linq.XDocument.Load (System.Xml.XmlReader reader) [0x00000] in /usr/wrkdirprefix/usr/ports/lang/mono/work/mono-3.10.0/mcs/class/System.Xml.Linq/System.Xml.Linq/XDocument.cs:132 
  at NzbDrone.Core.Download.NzbValidationService.Validate (System.String filename, System.Byte[] fileContent) [0x00024] in M:\BuildAgent\work\b69c1fe19bfc2c38\src\NzbDrone.Core\Download\NzbValidationService.cs:22 
  at NzbDrone.Core.Download.UsenetClientBase`1[NzbDrone.Core.Download.Clients.Sabnzbd.SabnzbdSettings].Download (NzbDrone.Core.Parser.Model.RemoteEpisode remoteEpisode) [0x00151] in M:\BuildAgent\work\b69c1fe19bfc2c38\src\NzbDrone.Core\Download\UsenetClientBase.cs:76 
  at NzbDrone.Core.Download.DownloadService.DownloadReport (NzbDrone.Core.Parser.Model.RemoteEpisode remoteEpisode) [0x00175] in M:\BuildAgent\work\b69c1fe19bfc2c38\src\NzbDrone.Core\Download\DownloadService.cs:69 
  at NzbDrone.Core.Download.ProcessDownloadDecisions.ProcessDecisions (System.Collections.Generic.List`1 decisions) [0x000dd] in M:\BuildAgent\work\b69c1fe19bfc2c38\src\NzbDrone.Core\Download\ProcessDownloadDecisions.cs:76 


Sonarr error "Couldn't add report to download queue. (the name of file I'm trying to download)-PSA: Syntax Error after '<' character: h http://www.newzbin.com/DTD/nzb/nzb-1.1.dtd Line 1, position 2"
Not sending shows to download
#3

**Sonarr version: 2.0.0.5163
**Mono version: 3.10.0
OS: FreeNAS-11.1-U4
Debug logs: https://drive.google.com/open?id=1cEjJ1UNTou4QQXYRrotBd1RPjFibFHwf
Description of issue:
Applications: Sonarr, CouchPotato, Sabnzbd
Usenet: easynews
nzb indexer: nzb-tortuga.com

My setup has been working perfectly for months now but as of a few days ago everytime sonarr tries to pull an nzb file it gets the following message:

Couldn't add report to download queue. Lucifer.S03E23.720p.HDTV.2CH.x265.HEVC-PSA: Syntax Error after '<' character: h http://www.newzbin.com/DTD/nzb/nzb-1.1.dtd Line 1, position 2.

I’ve verified that permissions are working
I’ve reinstalled Sonarr and Sabnzbd (no luck still gives me the same error everytime)

I’ve been trying to fix this for a while now but I’m getting nowhere.
I’m not a linux specialist but I’ve used this enough to know my way around a bit.

I can add logs if it will help: just let me know.

Any help anyone can offer would be greatly appreciated.

Sonar Version: 2.0.0.5163
OS: FreeNAS-11.1-U4
Mono Version: 3.10.0

Debug logs: https://drive.google.com/file/d/1cEjJ1UNTou4QQXYRrotBd1RPjFibFHwf/view?usp=sharing
Trace logs: https://drive.google.com/file/d/1_AKakEfNW4tGzZp9xE93M199bzBCxRdo/view?usp=sharing
info logs: https://drive.google.com/file/d/1T20-2413Aq4pNTsnM_XBvDnFyCkiRe3n/view?usp=sharing

Here’s an update to this case:
I’ve literally killed my Freenas server and started from scratch. No backups.
Reinstalled the Freenas OS, setup accounts, my storage pools, and reinstalled the 2 plugins I use: Sabnzbd & Sonarr.

I’ve verified permissions on freenas are correct so the plugins can access and read/write data. I’ve also contacted nzb-tortuga.com support and left a similar post on their forums as well. But no one in their forums are having this issue and I’ve gotten replies to my post from their admins telling me they aren’t able to recreate the error and to post in the Sonarr forums. (https://www.nzb-tortuga.com/forum/viewtopic.php?f=15&t=104)

I’ve been working on this nonstop for many days now but I still can’t get Sonarr to pull nzb file from nzb-tortuga.com and place them into sabnzbd. This use to work perfectly for at least a year with the EXACT
same configuration. Once sabnzbd was done, Sonarr would take over, rename, and move the files. Everything worked exactly as it should but now everything is broken without me making any changes so I’m really at a loss on how to fix it.

I have an existing pool of TV Shows so I have sonarr add them: then I have it search for missing episodes. manual search or auto search all come back the same.

“Couldn’t add report to download queue. Blindspot.S03E16.720p.HEVC.x265-MeGusta-xpost: Syntax Error after ‘<’ character: h http://www.newzbin.com/DTD/nzb/nzb-1.1.dtd Line 1, position 2.”

When I manually try to select the file I want to pull the black download button I press turns red and when I hover my mouse over it I get the same syntax error.

During the process of elimination I was able to manually download an nzb file from nzb-tortuga.com that I saw fail in Sonarr, place it in sabnzbd’s watch folder, and it downloaded the files perfectly.

I’ve uploaded all the logs I could find in Sonarr (trace, Debug, and the normal). I would really appreciate some help with this because frankly I think I’ve exhausted all of my linux/freenas knowledge at this point.

Thanks ins advance.


#4

I downloaded the nzb from this and another indexer. The only difference is an extra <head> section at the top.

Other indexer:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE nzb PUBLIC "-//newzBin//DTD NZB 1.1//EN" "http://www.newzbin.com/DTD/nzb/nzb-1.1.dtd">
<nzb xmlns="http://www.newzbin.com/DTD/2003/nzb">

<file poster="kingof@pr0n.net (brian)" date="1493277869" subject="[982a755faf68614b243dec7df81c1f4d]-[01/42] - &quot;398487-Sample.mkv&quot; yEnc (1/76)">
...rest of file...

nzb-tortuga:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE nzb PUBLIC "-//newzBin//DTD NZB 1.1//EN" "http://www.newzbin.com/DTD/nzb/nzb-1.1.dtd">
<nzb xmlns="http://www.newzbin.com/DTD/2003/nzb">

<head>
 <meta type="category">Other &gt; Misc</meta>
 <meta type="name">982a755faf68614b243dec7df81c1f4d</meta>
</head>

<file poster="kingof@pr0n.net (brian)" date="1493277869" subject="[982a755faf68614b243dec7df81c1f4d]-[01/42] - &quot;398487-Sample.mkv&quot; yEnc (1/76)">
...rest of file...

#5

Hey Thanks for the response.

About that extra "head"
it’s because Tortuga gives you the option to remove Categories it auto searches from.
It defaults to the "other>Misc> category but you can’t move it. All you can do it add more. I left it as is.

That’s not new on that site and it worked before.

Thanks again for looking.
Hopefully you’ll see what I’m clearly missing.


#6

I just wanted to add to this, that I’ve been having exact same error in sonarr last few days. Using NZBGeek as indexer. I don’t really have any additional info to add though beyond other inputs already provided. I did attempt switching to develop branch of Sonarr and still have the same issue on 2.0.0.5200

Its happening on every single nzb it attempts for the last few days. None have worked successfully.


#8

OP here, thanks all for jumping in to raise the issue.

Just as an extra data point, I don’t believe the nzb I used had an extra section.

The code that is doing xml validation appears to have been introduced in version v2.0.0.5085 going forward, so every version after this is affected. Does anybody know a way to safely downgrade, for instance to the release before it v2.0.0.5054, so we can unblock while it can be investigated and/or fixed forward?

Just opened an issue as well: https://github.com/Sonarr/Sonarr/issues/2554


#9

Please provide the info others have about their setup, are you also running mono 3.10?

Only 3 reports, on one reported version of mono (3.10) leads me to believe it’s a mono issue and isn’t affecting everyone.


#10

Thanks for the advice on upgrading mono @markus101, that totally worked!

I was able to at least upgrade mono to 4.6.2 via the pkg install mono command and restarted sonarr 2.0.0.5163. (installing the mono package overwrote the links to the older version mono in /usr/local/bin and sonarr restarted cleanly without a hitch)


#11

Hey thank you all so much! I got it working now too. Mono was definitely the issue.

As I said above I use Freenas so i opened the shell for the sonarr jail and ran the “pkg install mono” command.
Updated the mono on my Sonarr from 3.10.0 to 5.2.0 and that did it.

Thanks again everyone.


#12

@markus101 Mono was definitely the problem. Thank you for your suggestion.

Here is my information:
Sonarr Version - 2.0.0.5163 (That’s when problems started, previously was on Version 2.0.0.5153)
Mono Version - 4.2.3 (previously 3.1.0)
on Docker (Unraid OS)

did docker -it Sonarr bash to get access to the container. then followed the instructions on Mono Download page for Ubuntu 16.04. Mono was upgraded from 3.1.0 to 4.2.3, problem solved.

Note: I’m a noob, if there is an easier way how to update Mono, please don’t laugh at me :joy:


NZBDroneErrorPipeline Won't add to download cue
#14

Hi there, I am having exactly the same issue, but I do not understand this ‘Mono’ fix!

Can someone please explain how I update/install this fix?

I am running Sonarr on MacOS High Seirra version 10.13.4

Many thanks in advance!

Managed to download pkg for MacOS, installed and restarted Sonarr. Mono updated and now working fine.

Thanks for this thread!


#15

I am also running MacOS HS and have the same issue.

a quick read of the installation gubbins, I can see that Mono is a Linux thing.

Wonder what has caused the MacOS one to fail?


#16

Did you fix it ok?

This is the file I downloaded and installed:

http://www.mono-project.com/download/stable/#download-mac


#17

hi there

many thanks, this worked a treat and Sonarr is back to normal

thanks :slight_smile:


#18

I’m running on Raspbian 8 and I’m getting the same error now. It was working fine up until yesterday. I don’t know a whole lot about Linux so I’m not sure what changed. I’ve tried apt-get updating Mono but it says it’s at the latest (3.10.0). I haven’t been able to find anything about how to update to a later version. I’ve done the steps at http://www.mono-project.com/download/stable/#download-lin-raspbian and it still says it’s on version 3.10.0.

Any suggestions?

Thanks.


#19

Having similar issues. Everything was fine, now as of this Friday nothing will download due to similar error in this post.
"[v2.0.0.5163] System.Xml.XmlException: Syntax Error after ‘<!’ characters. http://www.newzbin.com/DTD/nzb/nzb-1.1.dtd Line 1, position 3."

I’m running Sonarr inside a docker on top of unraid. Doesn’t appear anything has updated or changed recently, not sure why this is occurring all of a sudden. Will continue to watch here for updates…


#20

FIXED: Removed older NEEDO image or sonarr and installed new linuxserver image. All good now. thanks!


#21

I was able to run pkg install mono in my jail and have it complete successfully. When I run pkg info mono I get told that I am running version 5.2.0.215_1.

However, the Sonarr system page still says I have version 3.10.0. What am I missing here? Running pkg install mono again just tells me that I am already on the latest version.

This is on FreeNAS 9 btw.

EDIT: And yes, I have tried restarting the Sonarr service as well as the jail it is contained in. No luck :frowning:


#22

I just tried the command `mono -V’ and it says that it’s still 3.10. What am I doing wrong?


#24

Hello All I think this issue is coming up again.

I got the same syntax error a week or so ago so I ran the the " pkg install mono" in the sonar jail and all worked well again (back to 5.2.0)

Today I check and the mono is back to 3.1.0 and running the command says it’s already at the latest level.

Anyone have any new ideas? Did i forget to delete something?

I’m having the exact same issue.
in the jail it says I’m on 5.2.0 but Sonar says I’m on 3.1.0 and gives me those syntax errors again.

restarted Sonarr, Ran the update command, No luck.
I’m on Freenas 11.1-U4