Can't login to webservice. Deserialization error.




9 years ago
7 years ago


(Reporter: greg.martyn, Unassigned)






9 years ago
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/532.5 (KHTML, like Gecko) Chrome/ Safari/532.5
Build Identifier:  Bugzilla 3.4.4 on perl 5.10.1

After a recent debian perl upgrade, the bugzilla web service stopped working. Bugzilla web pages appear to function normally.

This is the error that my php code emits. The format of this message is "xmlrpc: $response[faultString] ($response[faultCode])"

xmlrpc: Application failed during request deserialization: 
no element found at line 1, column 0, byte -1 at /usr/lib/perl5/XML/ line 187 (Client)

Here is my code for reference. It was working before the perl upgrade, so I don't think it's the source of the problem:

$request = xmlrpc_encode_request("User.login", array(
	'login' => $user,
	'password' => $password,
	'remember' => true,
$context = stream_context_create(array('http' => array(
	'method' => "POST",
	'header' => "Content-Type: text/xml",
	'content' => $request
$file = fopen('http://localbugzilla/xmlrpc.cgi', 'r', false, $context);

$response = xmlrpc_decode(stream_get_contents($file));
if (xmlrpc_is_fault($response)) {
	trigger_error("xmlrpc: $response[faultString] ($response[faultCode])");

Reproducible: Always

Steps to Reproduce:
1. Execute the login php code provided above
2. Error is triggered
Actual Results:  
Encoded in an xmlrpc reply:

Application failed during request deserialization: 
no element found at line 1, column 0, byte -1 at /usr/lib/perl5/XML/ line 187

Expected Results:  
http response with cookies

The "Client" $response[faultCode] has me second-guessing myself, wondering if my code is wrong, but I double-checked the login credentials and they work. The php code used to work, so it must be a problem with bugzilla and/or perl.

Comment 1

9 years ago
# ./ --verbose
* This is Bugzilla 3.4.4 on perl 5.10.1
* Running on Linux 2.6.30-2-amd64 #1 SMP Sat Sep 26 03:42:23 UTC 2009

Checking perl modules...
Checking for     (v3.33)   ok: found v3.43
Checking for          Digest-SHA (any)     ok: found v5.47
Checking for            TimeDate (v2.21)   ok: found v2.23
Checking for            DateTime (v0.28)   ok: found v0.51
Checking for   DateTime-TimeZone (v0.71)   ok: found v1.05
Checking for                 DBI (v1.41)   ok: found v1.609
Checking for    Template-Toolkit (v2.22)   ok: found v2.22
Checking for          Email-Send (v2.00)   ok: found v2.198
Checking for          Email-MIME (v1.861)  ok: found v1.902
Checking for Email-MIME-Encodings (v1.313)  ok: found v1.313
Checking for Email-MIME-Modifier (v1.442)  ok: found v1.902
Checking for                 URI (any)     ok: found v1.37

Checking available perl DBD modules...
Checking for              DBD-Pg (v1.45)   ok: found v2.14.1
Checking for           DBD-mysql (v4.00)   ok: found v4.012
Checking for          DBD-Oracle (v1.19)    not found

The following Perl modules are optional:
Checking for                  GD (v1.20)   ok: found v2.39
Checking for               Chart (v1.0)    ok: found v2.4.1
Checking for         Template-GD (any)     ok: found v1.56
Checking for          GDTextUtil (any)     ok: found v0.86
Checking for             GDGraph (any)     ok: found v1.44
Checking for            XML-Twig (any)     ok: found v3.32
Checking for          MIME-tools (v5.406)  ok: found v5.427
Checking for         libwww-perl (any)     ok: found v5.833
Checking for         PatchReader (v0.9.4)  ok: found v0.9.5
Checking for          PerlMagick (any)     ok: found v6.5.7
Checking for           perl-ldap (any)     ok: found v0.39
Checking for         Authen-SASL (any)     ok: found v2.13
Checking for          RadiusPerl (any)     ok: found v0.13
Checking for           SOAP-Lite (v0.710.06) ok: found v0.710.10
Checking for         HTML-Parser (v3.40)   ok: found v3.64
Checking for       HTML-Scrubber (any)     ok: found v0.08
Checking for Email-MIME-Attachment-Stripper (any)     ok: found v1.316
Checking for         Email-Reply (any)     ok: found v1.202
Checking for         TheSchwartz (any)      not found
Checking for      Daemon-Generic (any)     ok: found v0.61
Checking for            mod_perl (v1.999022) ok: found v2.000004
* OPTIONAL MODULES                                                    *
* Certain Perl modules are not required by Bugzilla, but by           *
* installing the latest version you gain access to additional         *
* features.                                                           *
*                                                                     *
* The optional modules you do not have installed are listed below,    *
* with the name of the feature they enable. Below that table are the  *
* commands to install each module.                                    *
* MODULE NAME * ENABLES FEATURE(S)                                    *
* TheSchwartz * Mail Queueing                                         *

    TheSchwartz: /usr/bin/perl TheSchwartz

To attempt an automatic install of every required and optional module
with one command, do:

  /usr/bin/perl --all

Reading ./localconfig...
Checking for           DBD-mysql (v4.00)   ok: found v4.012
Checking for           MySQL (v4.1.2)  ok: found v5.0.51a-24+lenny2

Removing existing compiled templates...
Precompiling templates...done.
Fixing file permissions...
Checking for        GraphViz (any)     ok: found

Running  /usr/bin/perl --all doesn't seem to install TheSchwartz correctly, as continues to not find it.

Comment 2

9 years ago
using package from debian: libxml-parser-perl (2.36-1.1+b1)

Comment 3

9 years ago
Hmm, are you running under mod_perl? Did you restart the server after the upgrade?

(Is this still happening?)

Comment 4

9 years ago
I was running under mod_perl. It kept happening until I switched to plain cgi.

Comment 5

9 years ago
Ah, okay. I'm guessing that this happened because your mod_perl config changed so that Bugzilla's lib/ dir was no longer included in the library path, or some other mod_perl configuration problem. (The error you're seeing looks like a problem from an older SOAP::Lite.)
Last Resolved: 9 years ago
Resolution: --- → WORKSFORME
See also bug 600810... Isn't bug 600810 a duplicate of this one here?
You need to log in before you can comment on or make changes to this bug.