Bug 1409665 - Banshee cannot process podcasts whose XML has Windows end-of-line sequences
Summary: Banshee cannot process podcasts whose XML has Windows end-of-line sequences
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: banshee
Version: 25
Hardware: i686
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Tom "spot" Callaway
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-01-02 22:36 UTC by David Costanzo
Modified: 2017-09-30 06:10 UTC (History)
5 users (show)

Fixed In Version: banshee-2.6.2-25.fc26 banshee-2.6.2-25.fc25 banshee-2.6.2-25.fc27
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-09-09 23:53:20 UTC
Type: Bug


Attachments (Terms of Use)
Screenshot of error in Banshee (15.76 KB, image/png)
2017-01-02 22:36 UTC, David Costanzo
no flags Details

Description David Costanzo 2017-01-02 22:36:27 UTC
Created attachment 1236730 [details]
Screenshot of error in Banshee

Description of problem:
I am unable to add a podcast from the Spanish news radio station "Cadena Ser" into Bashee.  When I try, I get a general parsing error.  Other podcasts from different Web sites work.

Version-Release number of selected component (if applicable):
banshee-2.6.2-15.fc24.i686

(Even though I'm using Fedora 25, dnf installed a package with "fc24" in it name, so I assume its the latest one.)

How reproducible:
Every Time

Steps to Reproduce:
1. Start "banshee"
2. From the main menu, select "Media -> Add Podcast..."
3. In the URL box, enter
"""
http://urotrosfiles.media.streamtheworld.com/otrosfiles/podcasts/671p.xml
"""
4. Click the "Subscribe" button

Actual results:
An error message appears at the bottom that says Parsing Error Updating http://urotrosfiles.media.streamtheworld.com/otrosfiles/podcasts/671p.xml

Banshee prints the following to the command line
"""
[Warn  13:44:24.482] Caught an exception - System.Xml.XmlException: Data at the root level is invalid. Line 1, position 1. (in `System.Xml')
  at System.Xml.XmlTextReaderImpl.Throw (System.Exception e) <0xa3c27858 + 0x0007f> in <filename unknown>:0 
  at System.Xml.XmlTextReaderImpl.Throw (System.String res, System.String arg) <0xa3c27388 + 0x0009b> in <filename unknown>:0 
  at System.Xml.XmlTextReaderImpl.Throw (System.String res) <0xa3c27360 + 0x00023> in <filename unknown>:0 
  at System.Xml.XmlTextReaderImpl.ParseRootLevelWhitespace () <0xb3837b28 + 0x00267> in <filename unknown>:0 
  at System.Xml.XmlTextReaderImpl.ParseDocumentContent () <0xb38d0778 + 0x004fb> in <filename unknown>:0 
  at System.Xml.XmlTextReaderImpl.Read () <0xb38ce968 + 0x00053> in <filename unknown>:0 
  at System.Xml.XmlLoader.Load (System.Xml.XmlDocument doc, System.Xml.XmlReader reader, Boolean preserveWhitespace) <0xb38c1f88 + 0x0019f> in <filename unknown>:0 
  at System.Xml.XmlDocument.Load (System.Xml.XmlReader reader) <0xb38c1e20 + 0x00083> in <filename unknown>:0 
  at System.Xml.XmlDocument.LoadXml (System.String xml) <0xb196e200 + 0x00098> in <filename unknown>:0 
  at Migo.Syndication.RssParser..ctor (System.String url, System.String xml) <0xa3c26d08 + 0x00115> in <filename unknown>:0 
[Warn  13:44:24.484] Caught an exception - System.FormatException: Invalid XML document. (in `Migo')
  at Migo.Syndication.RssParser..ctor (System.String url, System.String xml) <0xa3c26d08 + 0x002b3> in <filename unknown>:0 
  at Migo.Syndication.FeedUpdateTask.OnDownloadDataReceived (System.Object sender, Migo.Net.DownloadStringCompletedEventArgs args) <0xa3c264e0 + 0x0024f> in <filename unknown>:0 
"""

Expected results:
The podcast is added as "Negra y Criminal" and its episodes are shown in the right box.


Suggested Work-around:
1) Download the file into an empty directory

curl http://urotrosfiles.media.streamtheworld.com/otrosfiles/podcasts/671p.xml > myrssfile.xml

2) Convert Windows newlines to UNIX newlines
dos2unix myrssfile.xml

3) Host the file on a local web server
python -m SimpleHTTPServer 8000

4) Add the podcast using this URL
http://localhost:8000/myrssfile.xml


Additional info:
Firefox has no trouble rendering the URL as an RSS feed.

I haven't tried to run a banshee built from the latest source.  Based on bug 
#1379508, I'd expect this is not something I'd be able to do.

According to https://www.w3.org/TR/REC-xml/#sec-line-ends

"""
the XML processor MUST behave as if it normalized all line breaks in external parsed entities (including the document entity) on input, before parsing, by translating both the two-character sequence #xD #xA and any #xD that is not followed by #xA to a single #xA character.
"""

This makes me think that the RSS feed should not be considered malformed because of its newlines.  It also suggests that the problem may be in System.Xml.XmlTextReaderImpl, not banshee itself.

Comment 1 Fedora Update System 2017-08-31 16:33:54 UTC
banshee-2.6.2-25.fc25 dbus-sharp-glib-0.6.0-1.fc25 dbus-sharp-0.8.1-3.fc25 mono-zeroconf-0.9.0-20.fc25 notify-sharp-0.4.1-0.1.20130131git28d2f65.fc25 has been submitted as an update to Fedora 25. https://bodhi.fedoraproject.org/updates/FEDORA-2017-8ccc53509f

Comment 2 Fedora Update System 2017-08-31 16:34:05 UTC
banshee-2.6.2-25.fc26 has been submitted as an update to Fedora 26. https://bodhi.fedoraproject.org/updates/FEDORA-2017-901c53087b

Comment 3 Fedora Update System 2017-08-31 16:34:11 UTC
banshee-2.6.2-25.fc27 has been submitted as an update to Fedora 27. https://bodhi.fedoraproject.org/updates/FEDORA-2017-acb787484c

Comment 4 Fedora Update System 2017-09-01 04:23:16 UTC
banshee-2.6.2-25.fc27 has been pushed to the Fedora 27 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-acb787484c

Comment 5 Fedora Update System 2017-09-01 11:58:25 UTC
banshee-2.6.2-25.fc26 has been pushed to the Fedora 26 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-901c53087b

Comment 6 Fedora Update System 2017-09-01 12:56:07 UTC
banshee-2.6.2-25.fc25, dbus-sharp-0.8.1-3.fc25, dbus-sharp-glib-0.6.0-1.fc25, mono-zeroconf-0.9.0-20.fc25, notify-sharp-0.4.1-0.1.20130131git28d2f65.fc25 has been pushed to the Fedora 25 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-8ccc53509f

Comment 7 David Costanzo 2017-09-02 20:12:34 UTC
I don't understand the relationship between bodhi and bugzilla, so I'm reposting some information here.  I confirmed the fix on FC25, which is what my system uses.  With the fix, I was able to subscribe to the podcast that was cited in this bug and listen to a few episodes.  I did a few other things with Banshee, like listen to music on my local file system and listen to Internet radio.  This all worked as before (no regressions).

I was expecting this fix to enable Banshee to play all podcasts from Cadena Ser (http://cadenaser.com/ser/podcasts/), but Banshee reported errors for the few that I tried.  For one of these podcasts, I followed my "Suggested Work Around", except did not run "dos2unix" on the XML and Banshee was able to load the episodes, even with the CRLF line endings.  I therefore expect that the fix is correct for the bug that is described in this ticket and there's some other bug that prevents the other podcasts from working.  I plan to open a separate bug for that after this fix goes live and I investigate a little more.

Comment 8 Fedora Update System 2017-09-09 23:53:20 UTC
banshee-2.6.2-25.fc26 has been pushed to the Fedora 26 stable repository. If problems still persist, please make note of it in this bug report.

Comment 9 Fedora Update System 2017-09-10 04:52:41 UTC
banshee-2.6.2-25.fc25, dbus-sharp-0.8.1-3.fc25, dbus-sharp-glib-0.6.0-1.fc25, mono-zeroconf-0.9.0-20.fc25, notify-sharp-0.4.1-0.1.20130131git28d2f65.fc25 has been pushed to the Fedora 25 stable repository. If problems still persist, please make note of it in this bug report.

Comment 10 Fedora Update System 2017-09-30 06:10:17 UTC
banshee-2.6.2-25.fc27 has been pushed to the Fedora 27 stable repository. If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.