Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FATAL: Error verifying developer key: Failed to parse server's response: Content is not allowed in prolog. #72

Closed
sai-tirunagiri opened this issue Oct 12, 2016 · 18 comments

Comments

@sai-tirunagiri
Copy link

Hi,

Any help on the below error?

FATAL: Error verifying developer key: Failed to parse server's response: Content is not allowed in prolog.
br.eti.kinoshita.testlinkjavaapi.util.TestLinkAPIException: Error verifying developer key: Failed to parse server's response: Content is not allowed in prolog.
at br.eti.kinoshita.testlinkjavaapi.MiscService.checkDevKey(MiscService.java:64)
at br.eti.kinoshita.testlinkjavaapi.TestLinkAPI.(TestLinkAPI.java:146)
at hudson.plugins.testlink.TestLinkBuilder.getTestLinkSite(TestLinkBuilder.java:331)
at hudson.plugins.testlink.TestLinkBuilder.perform(TestLinkBuilder.java:206)
at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:779)
at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.build(MavenModuleSetBuild.java:919)
at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.doRun(MavenModuleSetBuild.java:671)
at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:534)
at hudson.model.Run.execute(Run.java:1741)
at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:531)
at hudson.model.ResourceController.execute(ResourceController.java:98)
at hudson.model.Executor.run(Executor.java:410)
Caused by: org.apache.xmlrpc.client.XmlRpcClientException: Failed to parse server's response: Content is not allowed in prolog.
at org.apache.xmlrpc.client.XmlRpcStreamTransport.readResponse(XmlRpcStreamTransport.java:188)
at org.apache.xmlrpc.client.XmlRpcStreamTransport.sendRequest(XmlRpcStreamTransport.java:156)
at org.apache.xmlrpc.client.XmlRpcHttpTransport.sendRequest(XmlRpcHttpTransport.java:143)
at org.apache.xmlrpc.client.XmlRpcSunHttpTransport.sendRequest(XmlRpcSunHttpTransport.java:69)
at org.apache.xmlrpc.client.XmlRpcClientWorker.execute(XmlRpcClientWorker.java:56)
at org.apache.xmlrpc.client.XmlRpcClient.execute(XmlRpcClient.java:167)
at org.apache.xmlrpc.client.XmlRpcClient.execute(XmlRpcClient.java:158)
at org.apache.xmlrpc.client.XmlRpcClient.execute(XmlRpcClient.java:147)
at br.eti.kinoshita.testlinkjavaapi.BaseService.executeXmlRpcCall(BaseService.java:90)
at br.eti.kinoshita.testlinkjavaapi.MiscService.checkDevKey(MiscService.java:61)
... 12 more
Caused by: org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 1; Content is not allowed in prolog.
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1239)
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:643)
at org.apache.xmlrpc.client.XmlRpcStreamTransport.readResponse(XmlRpcStreamTransport.java:186)
... 21 more
ERROR: Error communicating with TestLink. Check your TestLink configuration.

@kinow
Copy link
Owner

kinow commented Oct 12, 2016

Hi @sai-tirunagiri

Probably worth double-checking the URL you are using. Perhaps the endpoint URL is incorrect

@sai-tirunagiri
Copy link
Author

http://*******/testlink/lib/api/xmlrpc/v1/xmlrpc.php

This would be the URL I am using currently. Don't know what exactly the problem is.

@kinow
Copy link
Owner

kinow commented Oct 12, 2016

What version of TestLink are you using?

@sai-tirunagiri
Copy link
Author

Its 1.9.15

@kinow
Copy link
Owner

kinow commented Oct 16, 2016

Reproduced the issue on 1.9.15, though I can't really say what's wrong yet.

@abogdanovqa
Copy link

abogdanovqa commented Oct 16, 2016

The problem is on testlink side.

There is a workaround (from https://foliovision.com/2007/05/xml-rpc-server-wordpress-error):
Add the following lines to lib/api/xmlrpc/v1/xmlrpc.php

// Some browser-embedded clients send cookies. We don't want them.
$_COOKIE = array();

$GLOBALS['HTTP_RAW_POST_DATA'] = file_get_contents("php://input");

I've reported a bug in TestLink project - http://mantis.testlink.org/view.php?id=7701

@kinow
Copy link
Owner

kinow commented Oct 16, 2016

Thanks @abogdanovqa !

I noticed some weird errors in the logs, but thought it could be because I was running PHP 7. Tried with PHP 5, and got the same error. Now at least it makes sense.

@ghost
Copy link

ghost commented Dec 17, 2016

Any updates on this issue ? I'm also facing similar problem. Logs are as below:

FATAL: Error verifying developer key: Failed to parse server's response: Content is not allowed in prolog.
br.eti.kinoshita.testlinkjavaapi.util.TestLinkAPIException: Error verifying developer key: Failed to parse server's response: Content is not allowed in prolog.
	at br.eti.kinoshita.testlinkjavaapi.MiscService.checkDevKey(MiscService.java:64)
	at br.eti.kinoshita.testlinkjavaapi.TestLinkAPI.<init>(TestLinkAPI.java:146)
	at hudson.plugins.testlink.TestLinkBuilder.getTestLinkSite(TestLinkBuilder.java:331)
	at hudson.plugins.testlink.TestLinkBuilder.perform(TestLinkBuilder.java:206)
	at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
	at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:779)
	at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.build(MavenModuleSetBuild.java:939)
	at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.doRun(MavenModuleSetBuild.java:890)
	at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:534)
	at hudson.model.Run.execute(Run.java:1720)
	at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:544)
	at hudson.model.ResourceController.execute(ResourceController.java:98)
	at hudson.model.Executor.run(Executor.java:404)
Caused by: org.apache.xmlrpc.client.XmlRpcClientException: Failed to parse server's response: Content is not allowed in prolog.
	at org.apache.xmlrpc.client.XmlRpcStreamTransport.readResponse(XmlRpcStreamTransport.java:188)
	at org.apache.xmlrpc.client.XmlRpcStreamTransport.sendRequest(XmlRpcStreamTransport.java:156)
	at org.apache.xmlrpc.client.XmlRpcHttpTransport.sendRequest(XmlRpcHttpTransport.java:143)
	at org.apache.xmlrpc.client.XmlRpcSunHttpTransport.sendRequest(XmlRpcSunHttpTransport.java:69)
	at org.apache.xmlrpc.client.XmlRpcClientWorker.execute(XmlRpcClientWorker.java:56)
	at org.apache.xmlrpc.client.XmlRpcClient.execute(XmlRpcClient.java:167)
	at org.apache.xmlrpc.client.XmlRpcClient.execute(XmlRpcClient.java:158)
	at org.apache.xmlrpc.client.XmlRpcClient.execute(XmlRpcClient.java:147)
	at br.eti.kinoshita.testlinkjavaapi.BaseService.executeXmlRpcCall(BaseService.java:90)
	at br.eti.kinoshita.testlinkjavaapi.MiscService.checkDevKey(MiscService.java:61)
	... 12 more
Caused by: org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 1; Content is not allowed in prolog.
	at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source)
	at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
	at org.apache.xmlrpc.client.XmlRpcStreamTransport.readResponse(XmlRpcStreamTransport.java:186)
	... 21 more
ERROR: Error communicating with TestLink. Check your TestLink configuration.

@kinow
Copy link
Owner

kinow commented Dec 17, 2016

Hi @diptman the issue has been reported to TestLink. There is a workaround that was posted here before too. Take a look at the comments, and feel free to chime in here to say whether that works for you too, or in the TestLink issue tracker :-)

@ghost
Copy link

ghost commented Dec 19, 2016

@kinow : workaround worked for me ! Thanks!
Thanks @abogdanovqa

@kinow
Copy link
Owner

kinow commented Dec 19, 2016

Excellent, thanks for the feedback @diptman ! Hopefully it will work for others too.

@kinow
Copy link
Owner

kinow commented Mar 14, 2017

1.9.16 released. We can test it soon and check if a 1.9.16-0 could be cut (if anyone has time to give it a shot, otherwise I may have time to set up the dev env again in a few days)

@kinow
Copy link
Owner

kinow commented Mar 19, 2017

Version 1.9.16-0 to be released in the next hours.

Tested the following:

  • Started a temp MySQL Server with https://github.com/kinow/testlink-java-api/issues/77
  • Downloaded testlink-1.9.16.tar.gz, and unpacked
  • Started a temp PHP Server with cd testlink-1.9.16 && php -S 0.0.0.0:8888

Followed the installation procedure, then created a project, and generated my admin user API Key. Then tested with the following code:

package br.eti.kinoshita.testlinkjavaapi;

import java.net.URL;

public class Test {

    public static void main(String[] args) throws Exception {
        TestLinkAPI api = new TestLinkAPI(new URL("http://localhost:8888/lib/api/xmlrpc/v1/xmlrpc.php"), "280540a10fb8a11561888f963397b3b2");
        System.out.println(api.getProjects());
    }
    
}

And got:

Mar 19, 2017 11:30:31 PM org.apache.commons.beanutils.FluentPropertyBeanIntrospector introspect
INFO: Error when creating PropertyDescriptor for public final void org.apache.commons.configuration2.AbstractConfiguration.setProperty(java.lang.String,java.lang.Object)! Ignoring this property.
[Lbr.eti.kinoshita.testlinkjavaapi.model.TestProject;@456a973f

kinow added a commit that referenced this issue Mar 19, 2017
@jack-qmen
Copy link

Hi,kinow
Where can I find solutions to the questions mentioned by Diptman?
Thx

@ghost
Copy link

ghost commented Apr 11, 2018

@rangercoder There is workaround posted by abogdanovqa above my post, that helped me.

@jack-qmen
Copy link

jack-qmen commented Apr 11, 2018

@diptman Thanks for your reply.I have test it on http://localhost/testlink/lib/api/xmlrpc/v1/xmlrpc.php that jenkins connnect with testlink is ok now.But my qc testlink server is cloud server,such as https://.../lib/api/xmlrpc/v1/xmlrpc.php which is apper your some issue.And you can see #104 which is my issue's details.
Could you sure?(I have use testlink:1.9.16 )
Thx.

@jack-qmen
Copy link

@diptman sorry,it's my cloud server environment error,and I have solve it.

@ghost
Copy link

ghost commented Apr 17, 2018

@rangercoder Thanks for update. Glad to hear that your issue is resolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants