Bug 163578 - KDE 4.1 knetworkconf gives "Could not parse the XML file" error
Summary: KDE 4.1 knetworkconf gives "Could not parse the XML file" error
Status: RESOLVED UNMAINTAINED
Alias: None
Product: knetworkconf
Classification: Miscellaneous
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Juan Luis Baptiste
URL:
Keywords:
: 184356 185966 192394 194134 197494 (view as bug list)
Depends on:
Blocks:
 
Reported: 2008-06-09 09:56 UTC by Serhiy
Modified: 2012-09-04 20:43 UTC (History)
28 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Crash report of segfault in knetworkconfig (3.23 KB, application/octet-stream)
2009-03-13 06:29 UTC, P. Levine
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Serhiy 2008-06-09 09:56:05 UTC
Version:            (using Devel)
Installed from:    Compiled sources

kcm_knetworkconfmodule does not appear to be visible from systemsettings, but can be accessed by entering "kcmshell4 kcm_knetworkconfmodule". The module loads correctly, but with no interfaces listed, and an error message saying "Could not parse the XML file."

Error is reproducible for Fedora 9 Kubuntu-KDE4 8.04.
Please see 
https://bugzilla.redhat.com/show_bug.cgi?id=449977
and
https://bugs.launchpad.net/ubuntu/+source/kdeadmin-kde4/+bug/229366

There is similar bug 
http://bugs.kde.org/show_bug.cgi?id=117338
for KDE 3.x.
But this seems to be different because when I look to .xsession-errors on Fedora I see only 
--get XML: 
and nothing after this.

Thanks,
Serhiy
Comment 1 Serhiy 2008-06-09 09:57:49 UTC
*** This bug has been confirmed by popular vote. ***
Comment 2 Serhiy 2008-07-08 11:43:16 UTC
I've spend some time investigating this issue and I have some additional details to add.

The problem seems to be not with "knetworkconf" gui code (C++ code) but with perl code of backend.
When I run 
.../backends/network-conf script I see following errors
--
Can't locate /general.pl in @INC (@INC contains: /usr/lib/perl5/5.10.0/i586-linux-thread-multi /usr/lib/perl5/5.10.0 /usr/lib/perl5/site_perl/5.10.0/i586-linux-thread-multi /usr/lib/perl5/site_perl/5.10.0 /usr/lib/perl5/vendor_perl/5.10.0/i586-linux-thread-multi /usr/lib/perl5/vendor_perl/5.10.0 /usr/lib/perl5/vendor_perl .) at ../backends_back/network-conf line 52.
BEGIN failed--compilation aborted at ../backends_back/network-conf line 58.
--

But there should be no errors when running this script. When I checked all perl scripts I found following
--
$SCRIPTSDIR = "";
if ($SCRIPTSDIR =~ /^@scriptsdir[@]/)
...
--
When I manually edited all perl scripts and specified value of this variable directly in each script:
--
$SCRIPTSDIR = "/usr/share/kde4/apps/knetworkconf/backends"; 
--
I was able to run this script without errors and knetworkconf started to work.

So the problem is that the value of scriptsdir variable was not defined in backends scripts. As far as I can see from http://websvn.kde.org/trunk/KDE/kdeadmin/knetworkconf/backends/ the same variable is defined in system-tools-backends.pc and probably pkg-config (http://pkg-config.freedesktop.org/wiki/FrontPage) should be used during compilation to set values of this variable in all scripts (perl sources have $SCRIPTSDIR = "@scriptsdir@"; definition of this variable and probably the value should be set during compilation). I am not familiar with CMake and I am not sure how exactly knetworkconf should be compiled to set the values of $SCRIPTSDIR variable during compilation. But I hope that this additional information will help to resolve this issue.

Thanks,
Serhiy
Comment 3 Serhiy 2008-07-15 12:26:14 UTC
In order to resolve problem with displaying knetworkconf in KDE 4.x system settings need to change header of "kcm_knetworkconfmodule.desktop" file to be following:
--
[Desktop Entry]
Type=Service
X-KDE-ServiceTypes=KCModule
X-DocPath=knetworkconf/index.docbook
Icon=knetworkconf
#Icon=preferences-system-network
Exec=kcmshell4 kcm_knetworkconfmodule

X-KDE-Library=kcm_knetworkconfmodule
X-KDE-PluginKeyword=knetworkconf
X-KDE-ParentApp=kcontrol

X-KDE-System-Settings-Parent-Category=network-settingss
--

This will add additional section to "System Settings"->"General"->"Network & Connectivity"->"Network Settings"->"Network Settings".
Thanks,
Serhiy
Comment 4 Serhiy 2008-07-15 12:27:24 UTC
Sorry, there is a typo in my previous post.

In order to resolve problem with displaying knetworkconf in KDE 4.x system settings need to change header of "kcm_knetworkconfmodule.desktop" file to be following:
-- 
[Desktop Entry]
Type=Service
X-KDE-ServiceTypes=KCModule
X-DocPath=knetworkconf/index.docbook
Icon=knetworkconf
#Icon=preferences-system-network
Exec=kcmshell4 kcm_knetworkconfmodule

X-KDE-Library=kcm_knetworkconfmodule
X-KDE-PluginKeyword=knetworkconf
X-KDE-ParentApp=kcontrol

X-KDE-System-Settings-Parent-Category=network-settings
-- 

This will add additional section to "System Settings"->"General"->"Network & Connectivity"->"Network Settings"->"Network Settings".

Thanks,
Serhiy 
Comment 5 Serhiy 2008-07-15 12:28:46 UTC
In order to resolve problem with displaying knetworkconf in KDE 4.x system settings need to change header of "kcm_knetworkconfmodule.desktop" file to be following:

-- 
[Desktop Entry]
Type=Service
X-KDE-ServiceTypes=KCModule
X-DocPath=knetworkconf/index.docbook
Icon=knetworkconf
#Icon=preferences-system-network
Exec=kcmshell4 kcm_knetworkconfmodule

X-KDE-Library=kcm_knetworkconfmodule
X-KDE-PluginKeyword=knetworkconf
X-KDE-ParentApp=kcontrol

X-KDE-System-Settings-Parent-Category=network-settings
-- 

This will add additional section to "System Settings"->"General"->"Network & Connectivity"->"Network Settings"->"Network Settings".

Thanks,
Serhiy
Comment 6 Serhiy 2008-07-15 12:30:44 UTC
Please sorry for so many comments.
Actually comments #4 and #5 are broken. Please remove them.

Comment #3 is ok with the only exception that 
X-KDE-System-Settings-Parent-Category=network-settingss
should be changed to 
X-KDE-System-Settings-Parent-Category=network-settings
(one 's' at the end).
Comment 7 Serhiy 2008-07-16 12:30:08 UTC
System Settings in KDE 4.1 does not support "Administrative Mode". This is planed for KDE 4.2
http://techbase.kde.org/Schedules/KDE4/4.2_Feature_Plan
This feature is necessary for knetworkconf.
Comment 8 Pedro Neves 2009-01-09 17:07:26 UTC
Any news regarding this bug? I'm using kde 4.2. beta 2 on Debian and the problem still remains. I mean, there is a "Network settings" tab (System settings/network settings/network settings) but if I click on it, no interfaces show up and I get the "could not parse the XML file ()." message...
Comment 9 Tanel Kurvits 2009-01-15 01:21:31 UTC
I can confirm, that bug still there even KDE4 RC1 in Kubuntu 8.10.!
Run /usr/share/kde4/services/kcm_knetworkconfmodule.desctop and you see it.
Now atleast that module is aviable in KDE4 administration module (in KDE 4.1x was disabled)
Comment 10 Vasileios P. Lourdas 2009-01-29 20:23:44 UTC
(In reply to comment #7)
> System Settings in KDE 4.1 does not support "Administrative Mode". This is
> planed for KDE 4.2
> http://techbase.kde.org/Schedules/KDE4/4.2_Feature_Plan
> This feature is necessary for knetworkconf.

I'm running the final 4.2.0 on Gentoo. This feature has not yet been implemented.

I also experience the "Could not parse the XML file ()" message, still in 4.2.0.
Comment 11 P. Levine 2009-01-30 06:00:47 UTC
I'm running Gentoo with KDE 4.2.60 (KDE 4.2.60 (KDE 4.3 >= 20090116)).
The variables ${filesdir} and ${scriptsdir} don't seem to exist when the configure_file command is run from backends/CMakeLists.txt.

The final system-tools-backends.pc file looks like:

   prefix=/usr/kde/live
   exec_prefix=/usr/kde/live/lib64/kde4/libexec
   libdir=/usr/kde/live/lib64
   includedir=/usr/kde/live/include

   filessdir=
   backenddir=

   Name: gst-backends
   Description: GNOME System Tools backends
   Version: 
   Requires: 
   Libs:
   Cflags:

Is this normal?
Comment 12 MohamadReza Mirdamadi 2009-01-30 16:12:34 UTC
Same problem here in Kubuntu 8.10, Kde 4.2:

Could not parse the XML file ().
Comment 13 Martin Pittamitz 2009-01-30 21:19:18 UTC
Experiencing the same problem on Gentoo Kde 4.2.0
Comment 14 Zdenek Horacek 2009-01-31 01:30:07 UTC
Same problem. Debian KDE 4.2.0
Comment 15 Michał Żarłok 2009-02-07 00:57:09 UTC
Same problem on Kubuntu 9.04 (JJ) alpha-4 and KDE 4.2.0.
Comment 16 Mirza 2009-02-24 01:38:29 UTC
same problem here, how can status be NEW when this bug is being dragged from KDE 4.04??
Comment 17 Markos Chandras 2009-02-25 10:58:49 UTC
If I may say , this bug is not always reproducable. I am able to see my network interfaces on my laptop but not on my desktop. On both of them I am using the exact same configuration ( Gentoo Linux + kde-4.2 ) . Maybe there is another thing in the "back" that does the dirty work?
Comment 18 Brad Hards 2009-02-28 08:02:06 UTC
Patch from Tomas Chvatal:
http://git.overlays.gentoo.org/gitweb/?p=proj/kde.git;a=blob;f=kde-base/knetworkconf/files/backends-scriptsdir.patch

   1 --- knetworkconf/backends/CMakeLists.txt.orig   2009-02-27 10:22:42.000000000 -0600
   2 +++ knetworkconf/backends/CMakeLists.txt        2009-02-27 10:22:58.000000000 -0600
   3 @@ -1,4 +1,4 @@
   4 -
   5 +set(scriptsdir "${DATA_INSTALL_DIR}/knetworkconf/backends")
   6 
   7 
   8  ########### install files ###############
Comment 19 Vasileios P. Lourdas 2009-02-28 09:20:42 UTC
(In reply to comment #18)
> Patch from Tomas Chvatal:
> http://git.overlays.gentoo.org/gitweb/?p=proj/kde.git;a=blob;f=kde-base/knetworkconf/files/backends-scriptsdir.patch

The patch works for me (it does not display any error), however no interfaces are listed.
Comment 20 Radzislaw Galler 2009-03-06 16:15:58 UTC
In gentoo this patch is already in portage

see http://bugs.gentoo.org/show_bug.cgi?id=260098

But still no interfaces are visible in the network configuration window
Comment 21 Vasileios P. Lourdas 2009-03-06 18:21:27 UTC
(In reply to comment #20)
> In gentoo this patch is already in portage
> 
> see http://bugs.gentoo.org/show_bug.cgi?id=260098
> 
> But still no interfaces are visible in the network configuration window

OK, does the system monitor - network widget work for you? I suppose that since no network interfaces are shown in the network configuration window, the widget does not work either.
Comment 22 Jonathan Thomas 2009-03-09 20:04:59 UTC
*** Bug 184356 has been marked as a duplicate of this bug. ***
Comment 23 P. Levine 2009-03-13 06:29:35 UTC
Created attachment 32063 [details]
Crash report of segfault in knetworkconfig

I'm also getting no interfaces.  The backends seem to work. I'm not sure if it's related but if I try to open a context menu in the blank "Available Network Interfaces" area of the window (as super-user) it segfaults.  Attached is the crash report and below is the shell output:

--get XML:                                                                
<?xml version='1.0' encoding='UTF-8' standalone='yes'?>                   
<!DOCTYPE network []>                                                     

<network>

  <dialinstalled>1</dialinstalled>
  <smbinstalled>1</smbinstalled>  
  <smbuse>0</smbuse>              

  <nameserver>192.168.0.254</nameserver>

  <statichost>
    <ip>127.0.0.1</ip>
    <alias>localhost</alias>
    <alias></alias>         
    <alias>localhost.localdomain</alias>
  </statichost>                         
  <statichost>                          
    <ip>192.168.0.2</ip>                
    <alias>Laptop-PC.HOME</alias>       
    <alias>Laptop-PC</alias>            
  </statichost>                         

  <interface type='modem'>

    <dev>tunl0</dev>
    <enabled>0</enabled>
  </interface>          

  <interface type='modem'>

    <dev>ppp0</dev>
    <enabled>0</enabled>
  </interface>          

  <interface type='loopback'>

    <dev>lo</dev>
    <enabled>1</enabled>
  </interface>          

  <interface type='wireless'>

    <dev>wlan0</dev>
    <enabled>0</enabled>
    <hwaddr>00:1b:63:c5:d1:5c</hwaddr>
  </interface>                        

  <interface type='ethernet'>

    <dev>eth0</dev>
    <enabled>1</enabled>
    <hwaddr>00:1b:63:91:3d:6c</hwaddr>
  </interface>                        

  <profiledb>
  </profiledb>

</network>

<!-- GST: end of request -->

XML -d list_ifaces: <?xml version='1.0' encoding='UTF-8' standalone='yes'?>
<!DOCTYPE network-ifaces []>                                               

<network-ifaces>

  <interface>
    <dev>tunl0</dev>
    <enabled>0</enabled>
    <type>modem</type>  
  </interface>          

  <interface>
    <addr>127.0.0.1</addr>
    <dev>lo</dev>         
    <enabled>1</enabled>  
    <mask>255.0.0.0</mask>
    <type>loopback</type> 
  </interface>            

  <interface>
    <dev>wlan0</dev>
    <enabled>0</enabled>
    <hwaddr>00:1b:63:c5:d1:5c</hwaddr>
    <type>wireless</type>             
  </interface>                        

  <interface>
    <addr>192.168.0.2</addr>
    <bcast>192.168.0.255</bcast>
    <dev>eth0</dev>             
    <enabled>1</enabled>        
    <hwaddr>00:1b:63:91:3d:6c</hwaddr>
    <mask>255.255.255.0</mask>        
    <type>ethernet</type>             
  </interface>                        

</network-ifaces>

<!-- GST: end of request -->

Segmentation fault
Comment 24 asmerm 2009-04-09 21:18:54 UTC
I only get this at Konsole:

kcmshell4 kcm_knetworkconfmodule
--get XML:
Then error message appears: Could not parse xml file ().
Please someone fix this. This is critical bug. What is the benefit of plasma and fancy icons if user cannot configure network interface :(.
Comment 25 asmerm 2009-04-10 14:49:24 UTC
This bug is already 10 months old. I think it will never be fixed.
Comment 26 Maksim Melnikau 2009-04-10 15:45:09 UTC
(In reply to comment #25)
> This bug is already 10 months old. I think it will never be fixed.

I somewhere seen that correct NetworkManager integration postponed to KDE-4.3
Comment 27 Sérgio Basto 2009-04-30 18:01:17 UTC
same problem here ! 
https://bugs.kde.org/show_bug.cgi?id=185966 
is also a duplicated of this one? if so, please mark it
Comment 28 Dario Andres 2009-05-15 02:02:53 UTC
*** Bug 192394 has been marked as a duplicate of this bug. ***
Comment 29 Pavel Zheltobryukhov 2009-05-18 21:08:28 UTC
This bug present in KDE 4.2.3 openSUSE 11.0 too
Comment 30 Christoph Feck 2009-05-26 13:54:43 UTC
*** Bug 194134 has been marked as a duplicate of this bug. ***
Comment 31 Christoph Feck 2009-05-26 13:59:59 UTC
*** Bug 185966 has been marked as a duplicate of this bug. ***
Comment 32 charly ghislain 2009-05-30 22:08:09 UTC
that code uses qt deprecated code, being kept for compatibility with qt3, and seems to be quickly ported to qt4. I guess it needs a major rewrite.
Comment 33 Modestas Vainius 2009-05-31 20:35:28 UTC
SVN commit 976040 by modax:

Steal patch from gentoo to fix problems with backends in knetworkconf.
Thanks to Martin Alfke for making me aware of it and testing.

BUG: 163578


 M  +1 -1      CMakeLists.txt  


WebSVN link: http://websvn.kde.org/?view=rev&revision=976040
Comment 34 Pino Toscano 2009-06-22 13:04:49 UTC
*** Bug 197494 has been marked as a duplicate of this bug. ***
Comment 35 Steve Kroon 2009-09-11 08:37:02 UTC
So what version of knetworkconf will this be fixed in?
Comment 36 Andrew Schulman 2009-09-11 09:50:58 UTC
(In reply to comment #21)
> > But still no interfaces are visible in the network configuration window
> 
> OK, does the system monitor - network widget work for you? I suppose that since
> no network interfaces are shown in the network configuration window, the widget
> does not work either.

To answer this question from 6 months back:  No, the widget doesn't work either.  I see no network interfaces in System Settings > Network Settings > Network Settings, and the System monitor - network widget also shows no data.  Although, when I start it it opens two windows, which is interesting since I have two interfaces (besides lo).  But the windows are empty, and when I try to configure them, the list of available interfaces is also empty.

This is with KDE 4.3.1 in Debian.

Thanks,
Andrew.
Comment 37 Andrew Schulman 2009-09-11 09:52:40 UTC
So to be clear, for me this bug is not yet fixed in KDE 4.3.1.  Thanks, A.
Comment 38 Alessandro Macera 2009-09-12 18:10:52 UTC
Same bug in KDE 4.2.4 Slackware 13.0
Comment 39 Steve Kroon 2009-10-13 14:10:32 UTC
OK, so now this bug is:
Status:  	RESOLVED
Resolution: 	FIXED 

How does one go about finding out what path the fix will take before finally reaching a computer near me?
Comment 40 Steve Kroon 2009-11-17 09:02:45 UTC
Bug still present in KDE 4.3.3 Ubuntu 9.10.  Is it supposed to be fixed by now?
Comment 41 Steve Kroon 2010-01-04 12:14:18 UTC
So who is QA for this bug?  Can anyone besides them re-open this bug?
Comment 42 Eckhart Wörner 2010-03-31 21:38:54 UTC
Reopen since comments suggest this bug is still present.
Comment 43 Fitzcarraldo 2010-06-26 01:49:56 UTC
I am using KDE 4.4.4 in Sabayon Linux x86_64 2.6.34-sabayon kernel. If I select Kickoff > Computer > System Settings > Network Settings, a window titled "Detecting Your Current Platform" pops up with the message "Please wait while detecting your current platform..." and, immediately after, on top of it pops up another window titled "Error - System Setti..." with the message "Could not parse the XML file ()."
Comment 44 Rafal Lalik 2010-08-05 03:39:19 UTC
I confirm this bug on my laptop Gentoo, KDE-4.4.95 (and all earlier versions since one year at least).
Comment 45 Fitzcarraldo 2010-09-13 01:20:57 UTC
I upgraded from KDE 4.4.4 to 4.5.1 today and am still experiencing this problem under Sabayon Linux.

$ uname -a
Linux meshedgedx 2.6.34-sabayon #1 SMP Fri Jun 4 18:01:48 BST 2010 x86_64 Intel(R) Core(TM) i7 CPU Q 720 @ 1.60GHz GenuineIntel GNU/Linux

$ eix kde-meta
[I] kde-base/kde-meta
     Available versions:  
        (4.4)   4.4.5
        (4.5)   (~)4.5.1
        {accessibility aqua kdeprefix nls sdk semantic-desktop}
     Installed versions:  4.5.1(4.5)(03:31:44 12/09/10)(accessibility semantic-desktop -aqua -kdeprefix -nls -sdk)
     Homepage:            http://www.kde.org/
     Description:         KDE - merge this to pull in all split kde-base/* packages
Comment 46 Christoph Feck 2012-01-11 00:58:59 UTC
The "knetworkconf" module is unmaintained, and has been replaced with the networkmanagement plasmoid.

If this issue still needs to be addressed with a recent version of this plasmoid, please add a comment, or file a new report for product "Network Management".

http://websvn.kde.org/?revision=1158822&view=revision
Comment 47 Fitzcarraldo 2012-09-04 20:43:16 UTC
I currently have KDE 4.9.0 installed (upgraded from previous versions of KDE in turn over the years).

System Settings > Network Settings has five icons in the left column:

- Network Connections
- Proxy
- Connection Preferences
- Service Discovery
- Network Settings

However the last entry, Network Settings should not be there: it was for the knetworkconf module, which is obsolete (see Comment 46).

If I selected System Settings > Network Settings, a window titled "Detecting Your Current Platform" popped up with the message "Please wait while detecting your current platform..." and, immediately after, on top of it pops up another window titled "Error - System Settings" with the message "Could not parse the XML file ()."

The Gentoo command line utility 'eix' (yes, I used the command 'eix-update' to ensure its database is up-to-date) did not list the obsolete package kde-base/knetworkconf:

# eix knetworkconf
No matches found.
#

which is why I have been so perplexed about this problem, as I apparently did not have knetworkconf installed. Today I suddenly decided to try the command 'emerge --search' instead:

$ emerge --search knetworkconf
Searching...    
[ Results for search key : knetworkconf ]
[ Applications found : 1 ]

*  kde-base/knetworkconf
      Latest version installed: 4.5.4
      Homepage:      http://www.kde.org/
      Description:   KDE Control Center module to configure network settings
      License:       GPL-2

So I unmerged knetworkconf:

$ sudo emerge -C knetworkconf
Password: 
 * This action can remove important packages! In order to be safer, use
 * `emerge -pv --depclean <atom>` to check for reverse dependencies before
 * removing packages.

 kde-base/knetworkconf
    selected: 4.5.4 
   protected: none 
     omitted: none 

All selected packages: kde-base/knetworkconf-4.5.4

>>> 'Selected' packages are slated for removal.
>>> 'Protected' and 'omitted' packages will not be removed.

>>> Waiting 5 seconds before starting...
>>> (Control-C to abort)...
>>> Unmerging in:  5 4 3 2 1 
>>> Unmerging (1 of 1) kde-base/knetworkconf-4.5.4...
 * 
 * Directory symlink(s) may need protection:
 * 
 *      /usr/share/doc/HTML/en/kcontrol/knetworkconf/common
 * 
 * Searching all installed packages for files installed via above symlink(s)...
 * 
 * The above directory symlink(s) are all safe to remove. Removing them now...
 * 

 * GNU info directory index is up-to-date.

$

And now I no longer have that obsolete fifth icon Network Settings in System Settings > Network Settings, and thus, after trying for several years, finally got rid of that damned error message "Could not parse the XML file ()."!