MediaBrowser / Emby

Emby Server is a personal media server with apps on just about every device.
https://emby.media
GNU General Public License v2.0
4.14k stars 805 forks source link

'Element' is an invalid XmlNodeType. #56

Closed CBers closed 11 years ago

CBers commented 11 years ago

I get this occasionally in the Server log file:

'Element' is an invalid XmlNodeType.

I think it's to do with a TV show that is not in a provider's database as yet.

Full log is here:

https://dl.dropbox.com/u/8367652/Server-634988707661217582.log

LukePulverenti commented 11 years ago

Please post the xml files for that series.

On Thu, Mar 14, 2013 at 11:17 AM, CBers notifications@github.com wrote:

I get this occassionally in the Server log file:

'Element' is an invalid XmlNodeType.

I think it's to do with a TV show that is not in a provider's database as yet.

Full log is here:

https://dl.dropbox.com/u/8367652/Server-634988707661217582.log

— Reply to this email directly or view it on GitHubhttps://github.com/MediaBrowser/MediaBrowser/issues/56 .

Luke Pulverenti

CBers commented 11 years ago

Series.xml ??

There are 2:

https://dl.dropbox.com/u/8367652/series.xml https://dl.dropbox.com/u/8367652/series2.xml

I believe they are in THETVDB.

ebr11 commented 11 years ago

This has to do with a bug in MB2. Basically, the MB2 series provider is saving actors in an element tag that duplicates one that is possibly already there.

I fixed this problem in the provider for MB3 so, you should be able to just delete the series.xml and let mb3 re-create it.

CBers commented 11 years ago

OK, cool.

LukePulverenti commented 11 years ago

This is a good post because it just made me realize something. we have not seen much testing around mb3 saving local metadata.

CBers commented 11 years ago

Useful at last :-)

ebr11 commented 11 years ago

Of course, I've saved locally from the beginning but that's just me. It would be nice if more folks did try out the internal providers and saving.

ebr11 commented 11 years ago

CBers, please confirm if deleting the xml file and allowing MB3 to recreate it (make sure MB2 doesn't beat us to it) solves this problem.

CBers commented 11 years ago

It's not been recreated as yet.

How can I force MB3 to do it ?? Run the Scan Media Library ??

I have DOWNLOAD METADATA and SAVE METADATA with media folders checked.

ebr11 commented 11 years ago

Yes, running the scan should do it or you can just refresh that one series from the Library Explorer.

ebr11 commented 11 years ago

Did you delete the xml file with the server running? That should have picked it up automatically.

CBers commented 11 years ago

Yes I did.

Refreshing the series, even with the force set, doesn't do anything.

This is in the log:

2013-03-14 17:27:03.1885, Debug, ProviderManager, Providers changed for Soldiers of the Apocalypse. Clearing and forcing refresh. 2013-03-14 17:27:03.2736, Info, ProviderManager, Running ImageFromMediaLocationProvider for \MediaServer-2\TV\Soldiers of the Apocalypse 2013-03-14 17:27:03.3586, Info, ProviderManager, Running FolderProviderFromXml for \MediaServer-2\TV\Soldiers of the Apocalypse 2013-03-14 17:27:06.8808, Info, App, SQL Delayed writer executed 1 commands

and

2013-03-14 17:28:33.7627, Debug, ProviderManager, Providers changed for NCIS RED. Clearing and forcing refresh. 2013-03-14 17:28:33.8517, Info, ProviderManager, Running ImageFromMediaLocationProvider for \MediaServer-2\TV\NCIS RED 2013-03-14 17:28:33.9357, Info, ProviderManager, Running FolderProviderFromXml for \MediaServer-2\TV\NCIS RED 2013-03-14 17:28:37.0969, Info, App, SQL Delayed writer executed 1 commands

abobader commented 11 years ago

Our problem to fully report any issue for local metadata for mb3, that we do not have finished mbt as client to display and test, i been testing mb3 metadata for movies and tv series (save locally) enable for some times now.

LukePulverenti commented 11 years ago

You can use the library explorer in the meantime. Scott and Mark should have builds up soon too.

On Thu, Mar 14, 2013 at 1:39 PM, abobader notifications@github.com wrote:

Our problem to fully report any issue for local metadata for mb3, that we do not have finished mbt as client to display and test, i been testing mb3 metadata for movies and tv series (save locally) enable for some times now.

— Reply to this email directly or view it on GitHubhttps://github.com/MediaBrowser/MediaBrowser/issues/56#issuecomment-14917197 .

Luke Pulverenti

ebr11 commented 11 years ago

CBers - looks like those items are no longer resolving as TV series. Do they contain seasons?

If you look at them in the lib explorer, what does it say they are?

CBers commented 11 years ago

Don't worry, I'll just delete them for the time being :-)

ebr11 commented 11 years ago

No, please let us know what is going on here. There may be a bug we need to address. What are the answers to my questions above?

CBers commented 11 years ago

OK :-)

They are empty folders (placeholders) as I don't have them as yet.

I was attempting to get them ready for when they were available.

ebr11 commented 11 years ago

Okay, I do that all the time. Just create a sub folder called "Season 1" and then create an empty file in there called s01e01.avi and then all the meta should load in properly.

CBers commented 11 years ago

OK, created a Season 1 and an s01e01.avi file as you suggested , forced a refresh in Library Explorer, but nothing gets created.

Extract from log is:

2013-03-14 18:51:07.2470, Debug, ProviderManager, Providers changed for Soldiers of the Apocalypse. Clearing and forcing refresh. 2013-03-14 18:51:07.2470, Info, ProviderManager, Running ImageFromMediaLocationProvider for \MediaServer-2\TV\Soldiers of the Apocalypse 2013-03-14 18:51:07.2470, Info, ProviderManager, Running FolderProviderFromXml for \MediaServer-2\TV\Soldiers of the Apocalypse 2013-03-14 18:51:09.9732, Info, App, SQL Delayed writer executed 1 commands

There are 2 images in the top-level folder, banner.jpg and backdrop.jpg but no XML files.

ebr11 commented 11 years ago

You are going to have to re-scan the library or re-start the server because those items are folders and nothing you do to them while the server is running is going to make them ever be anything but just plain folders. They have to be re-discovered as TV after you altered them to contain the things that make them TV.

CBers commented 11 years ago

It's found them now - must have just been a timing thing.

Didn't restart MB3Server.

ebr11 commented 11 years ago

A library scan would have done it too.

CBers commented 11 years ago

Looks like MB3 is trying to process a trailer in the trailers folder, and erroring:

2013-03-17 13:03:01.2724, Debug, ProviderManager, Providers changed for trailer. Clearing and forcing refresh. 2013-03-17 13:03:01.2724, Info, ProviderManager, Running FFProbeVideoInfoProvider for \MediaServer-2\Movies\Red Dawn (2012)\trailers\trailer.mp4 2013-03-17 13:03:01.2724, Debug, FFMpegManager, C:\ProgramData\MediaBrowser-Server\MediaTools\ffmpeg20130310\ffprobe.exe -i file:"\MediaServer-2\Movies\Red Dawn (2012)\trailers\trailer.mp4" -threads 0 -v info -print_format json -show_streams -show_format 2013-03-17 13:03:01.3134, Error, ProviderManager, SeriesProviderFromXml failed refreshing Zero Hour (2012) 'Element' is an invalid XmlNodeType. System.Xml.XmlException at System.Xml.XmlReader.FinishReadElementContentAsXxx() at System.Xml.XmlReader.ReadElementContentAsString() at MediaBrowser.Controller.Providers.BaseItemXmlParser1.FetchDataFromXmlNode(XmlReader reader, T item) at MediaBrowser.Controller.Providers.TV.SeriesXmlParser.FetchDataFromXmlNode(XmlReader reader, Series item) at MediaBrowser.Controller.Providers.TV.SeriesXmlParser.FetchDataFromXmlNode(XmlReader reader, Series item) at MediaBrowser.Controller.Providers.BaseItemXmlParser1.Fetch(T item, String metadataFile, CancellationToken cancellationToken) at MediaBrowser.Controller.Providers.TV.SeriesProviderFromXml.Fetch(BaseItem item, CancellationToken cancellationToken) at MediaBrowser.Controller.Providers.TV.SeriesProviderFromXml.<>c__DisplayClass1.2013-03-17 13:15:50.4104, Info, App, SQL Delayed writer executed 2 commands

Obviously there are no XML files etc. for trailers.

Is this a buggette ??

TIA.

ebr11 commented 11 years ago

This is the same thing as previously reported. The series "Zero Hour" has an MB2-generated series.xml in it.

The log is not as easy to decipher as with MB2. MB3 is massively parallel so messages are interspersed with one another. The trailer activity you are seeing is unrelated to the error.

ebr11 commented 11 years ago

Going to re-open this and see if there is anything we can do to be compatible with the malformed MB2 xml.

CBers commented 11 years ago

My metadata for movies is generated by Media Center Master - is that gonna be incompatible with MB3 ??

LukePulverenti commented 11 years ago

I just tried this out. The reason for the failure is that the xml parser is expecting this

|Edwin Hodge|Gillian Alexy|John Corbett|Kenneth Mitchell|Miguel Ferrer|Scott Grimes|

But seeing this:

<Actors>
  <Actor>
    <id>309668</id>
    <Image />
    <Name>Edwin Hodge</Name>
    <Role>Kai Ashe</Role>
    <SortOrder>3</SortOrder>
  </Actor>
  <Actor>
    <id>309669</id>
    <Image />
    <Name>Gillian Alexy</Name>
    <Role>Special Agent Claire</Role>
    <SortOrder>3</SortOrder>
  </Actor>

However, if you look at CBers xml files two things stand out - the data in both nodes is exactly the same, and MCM puts the one we don't recognize all the way at the end of the file.

So there's actually no loss of data here because it happens at the end. It's just an exception in the log. We do have code that can handle either representation of actors, so there might be a way to peek at the content of the node to see which one we should call.

ebr11 commented 11 years ago

That's what I said in my first post about this :), except it is actually MB2 that is saving the duplicate actor node.

MCM should not be a problem and this should only be a problem in MB2-generated Series.xml.

CBers commented 11 years ago

Metadata for TV shows is done by SickBeard.

ebr11 commented 11 years ago

I'm pretty sure the Series.xml files that are causing this problem were created by the MB2 fetchers. Unless someone else has the exact same bug we did.

LukePulverenti commented 11 years ago

I would actually suggest closing this. The offending nodes appear last after other data has been collected, so nothing is actually lost by allowing the provider to fail gracefully.

ebr11 commented 11 years ago

Yeah, I there really isn't any harm here I don't think.