After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 776482 - raitv: XML declaration allowed only at the start of the document
raitv: XML declaration allowed only at the start of the document
Status: RESOLVED FIXED
Product: grilo
Classification: Other
Component: plugins
git master
Other Linux
: Normal normal
: ---
Assigned To: grilo-maint
grilo-maint
Depends on:
Blocks:
 
 
Reported: 2016-12-25 15:12 UTC by gnome.vrb
Modified: 2017-01-03 10:40 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description gnome.vrb 2016-12-25 15:12:23 UTC
1. Open grilo-test-ui in terminal
2. Rai -> Most Popular -> Black and White.

dev@unstable:~/source/git/totem$ grilo-test-ui-0.3 
Entity: line 2: parser error : XML declaration allowed only at the start of the document
<?xml version="1.0" encoding="UTF-8"?><CLASSIFICAVISTI>
     ^
Entity: line 2: parser error : XML declaration allowed only at the start of the document
<?xml version="1.0" encoding="UTF-8"?><CLASSIFICAVISTI>
     ^
Entity: line 2: parser error : XML declaration allowed only at the start of the document
<?xml version="1.0" encoding="UTF-8"?><CLASSIFICAVISTI>
Comment 1 gnome.vrb 2016-12-25 15:16:54 UTC
dev@unstable:~/source/git/totem$ gdb $(which grilo-test-ui-0.3)
..
..
(gdb) bt 0
  • #0 proxy_call_browse_grlnet_async_cb
    at grl-raitv.c line 641

(gdb) p content
$13 = (gchar *) 0x555556434780 "\n<?xml version=\"1.0\" encoding=\"UTF-8\"?><CLASSIFICAVISTI>\n<numgiorni>7</numgiorni>\n<content>\n<dominio>RaiTv</dominio>\n<localid>ContentItem-a8e6d342-f1cc-423e-a588-02b360897c9d</localid>\n<numvisite>1969"...

The XML document should start with:

<?xml version=\"1.0\" encoding=\"UTF-8\"?>

Whitespace and newlines before that is not acceptable. It would help to trim leading whitespace / newlines from content.
Comment 2 Bastien Nocera 2017-01-03 10:40:43 UTC
commit 063064bceb777dc3d8dcd518c39d5ce404e30c2b
Author: Bastien Nocera <hadess@hadess.net>
Date:   Tue Jan 3 11:38:14 2017 +0100

    raitv: Work-around leading linefeed at start of XML
    
    1. Open grilo-test-ui in terminal
    2. Rai -> Most Popular -> Black and White.
    
    Entity: line 2: parser error : XML declaration allowed only at the start
    of the document
    <?xml version="1.0" encoding="UTF-8"?><CLASSIFICAVISTI>
    
    Removing the leading linefeed fixes that problem.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=776482