deeptihariharan

error.eslx.inputValidation.documentPreverifyError

1 votes
Hi, I am unable to create a package with the JAVA sdk for the attached document. I am getting an eslServerException with a technical message ' error.eslx.inputValidation.documentPreverifyError'. I saw a post on the same topic and based on the reply I uploaded my document through he Web UI and I am still getting an error saying 'Document may be locked' but there are no security restrictions on the document. PFA screenshot of the settings. Please check the document and let me know why we are not able to upload it. Thanks

Approved Answer

Reply to: error.eslx.inputValidation.documentPreverifyError

0 votes
I was able to upload the document using PHP 7.1. Here's the sample code I used:
 'PACKAGE',
            'status' => 'DRAFT',
            'roles' => array(
                array(
                    'id' => 'Signer1',
                    'type' => 'SIGNER',
                    'signers' => array(
                        array(
                            'email' => '[email protected]',
                            'firstName' => 'John',
                            'lastName' => 'Smith',
                            'id' => 'Signer1',
                        )
                    ) ,
                ) ,
                array(
                    'id' => 'Sender1',
                    'type' => 'SIGNER',
                    'signers' => array(
                        array(
                            'email' => '[email protected]',
                            'firstName' => 'Mike',
                            'lastName' => 'Smith',
                            'id' => 'Sender1',
                        )
                    ) ,
                ) ,
            ) ,
            'name' => 'PHP Application Example',
            'documents' => array(
                        array(
                            'name' => 'Sample Contract',
                            'id' => 'contract'  
                        )
                    )
        );
 
 
 
    $postdata = "--" . MULTIPART_BOUNDARY . "\r\n";
    $postdata .= "Content-Disposition: form-data; name=\"file\"; filename=\"test_application.pdf\"\r\n\r\n";
    $postdata .= file_get_contents("documents/test_application.pdf");
    $postdata .= "\r\n\r\n";
    $postdata .= "--" . MULTIPART_BOUNDARY . "\r\n";
    $postdata .= "Content-Disposition: form-data; name=\"payload\"\r\n\r\n";
    $postdata .= json_encode($json);
    $postdata .= "\r\n\r\n";
    $postdata .= "--" . MULTIPART_BOUNDARY . "--\r\n";
 
    $curl = curl_init(API_URL);
    curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
    curl_setopt($curl, CURLOPT_POST          , true);
    curl_setopt($curl, CURLOPT_POSTFIELDS    , $postdata);
    curl_setopt($curl, CURLOPT_HTTPHEADER    , $api_headers);
    curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, false);
    curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
    curl_exec($curl);
    $response = curl_multi_getcontent($curl);
    curl_close($curl);
 
    echo mb_convert_encoding(print_r(json_decode($response, true), true), 'CP932', 'UTF-8');
 
?>
Haris Haidary OneSpan Technical Consultant

Reply to: error.eslx.inputValidation.documentPreverifyError

0 votes
I am using PHP to interact with esignlive API, and I just started getting this same error when I upgraded from PHP5.6 to PHP7.1 I've narrowed it down in the process to where it tries to send up the PDF document, that is where the error appears to be occuring. I narrowed my SendRequest code (using CURL) down to the barebones needed to work, and it will work fine on PHP5.6, but throws the error on PHP7.1. I went back and re-generated the same PDF file using both versions of PHP, and then did a differential comparision on the files, and except for the create time, the files unicode are identical, so it's not that the PDF generated using v7 is encoded differently. Please advise. Thanks! Chris

Reply to: error.eslx.inputValidation.documentPreverifyError

0 votes
You're getting the documentPreverifyError error that is listed in the title of this post? And the PDF file is actually created with PHP libraries? So, you have one PDF file that isn't working and one that is? Or your code to create a transaction is working on one version of PHP and not another?

- Michael

Director, Partner and Developer Technologies, OneSpan

Facebook - Twitter - LinkedIn


Reply to: error.eslx.inputValidation.documentPreverifyError

0 votes
Hi Michael, Yes, I'm getting the same error message: {"messageKey":"error.internal.default","technical":"error.eslx.inputValidation.documentPreverifyError [#190b20cc-bc7d-450b-baca-653474e73421]","message":"Unexpected error. We apologize for any inconvenience this may have caused you, please try again. If the problem persists, please contact our support team.","code":500,"name":"Unhandled Server Error"} The code that I am using to create the transaction works on PHP 5.6 but not on PHP 7.1. Or I should say the code runs, it's just that the response I get back from the REST API is successful on the old version, and gives me the error on the new version. Below is a snip of the code that is running, and when I print the error is the same as above. private function sendRequestNEW($type, $json, $document) { $postfields = array("file" => $document,"payload" => $json); $headerOptions = array('Authorization: Basic ' . $this->key); $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, "https://sandbox.esignlive.com/api". $type); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_FAILONERROR, false); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); curl_setopt($ch, CURLOPT_POSTFIELDS, $postfields); curl_setopt($ch, CURLOPT_HTTPHEADER, $headerOptions); $response = curl_exec($ch); $err = curl_error($ch); curl_close($ch); if($err) return $err; else return $response; } The PDF's are created using PHP (FPDF), but regardless of which version I use to create them, they are identical, so it's not that the PDF file is getting generated differently based on the different PHP versions. Thanks! Chris

Reply to: error.eslx.inputValidation.documentPreverifyError

0 votes
Hi Chris, What about the curl requests are they both identical using PHP 5.1 and 7.1 in terms of headers, body, etc.? Can you make successful requests with any other documents with PHP 7.1?
Haris Haidary OneSpan Technical Consultant

Reply to: error.eslx.inputValidation.documentPreverifyError

0 votes
Hi Haris, Yes they are both the same. (below is a snip). private function sendRequestNEW($type, $json, $document) { $postfields = array("file" => $document,"payload" => $json); $headerOptions = array('Authorization: Basic ' . $this->key); $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, "https://sandbox.esignlive.com/api". $type); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_FAILONERROR, false); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); curl_setopt($ch, CURLOPT_POSTFIELDS, $postfields); curl_setopt($ch, CURLOPT_HTTPHEADER, $headerOptions); $response = curl_exec($ch); $err = curl_error($ch); curl_close($ch); if($err) return $err; else return $response; } I'm not sure if I can work with other documents, tomorrow I will try and see if I can use the code to download evidence summary file from a previously completed one. Thanks! Chris

Reply to: error.eslx.inputValidation.documentPreverifyError

0 votes
Sure. Try with other documents and let me know the results. As for the requests, try using Fiddler to monitor the requests going out to eSignLive using PHP 5.6 and 7.1 and see if the requests are identical. I will install PHP 7.1 on my computer and get back to you with my results. Can you send that document to [email protected] so I can test it out?
Haris Haidary OneSpan Technical Consultant

Reply to: error.eslx.inputValidation.documentPreverifyError

0 votes
Harris, I tested your code on our server and it does seem to work using PHP7.1. That being said, I see that the example you gave me is doing everything for the package in 1 single CURL with everything in the package (including the document) being part of the POSTdata. Our system has been using something based of the example you created a while back with the "PackageCreation" class that builds the package, documents, and sign in different segments. The error we are seeing on PHP7.1 is occuring directly in the CURL request where it tries to build the document. Can you try out that code that you used in your example with the PackageCreation package on your PHP7.1 setup and see if you get the error that I am getting? Or do you have any idea what the error message is trying to convey? It seems like it might not like the PDF document that I'm uploading, but it's the same document, so perhaps its something with how 7.1 is encoding it as compared to 5.6? Thanks! Chris

Reply to: error.eslx.inputValidation.documentPreverifyError

0 votes
Hi Chris, Sure, I'll test with the other sample code I wrote. I'll get back to you with my results. In the mean time, can you try with another PDF document that you are sure uploads fine.
Haris Haidary OneSpan Technical Consultant

Reply to: error.eslx.inputValidation.documentPreverifyError

0 votes
I'm getting the same error as you. I'm not sure what the cause is. I used Fiddler to monitor the request going out and it looks alright to me. I would suggest modifying your application to use the working code I posted above if you're planning on staying on PHP 7.
Haris Haidary OneSpan Technical Consultant

Reply to: error.eslx.inputValidation.documentPreverifyError

0 votes
Ok thanks for trying it, at least it's not just us getting that error. We'll look at our application and see what needs to be done to make those changes. Chris

Reply to: error.eslx.inputValidation.documentPreverifyError

0 votes

Hi arun, Can you create packages with your PDF in WebUI? If can't, there's highly possibility that the issue is on your PDF file. In that way, you can send your PDF to [email protected] or refer to this thread. Hope this could help you! Duo

Duo Liang OneSpan Evangelism and Partner Integrations Developer


Reply to: error.eslx.inputValidation.documentPreverifyError

0 votes

Thanks for the quick response. I tried to trigger the package creation REST API using the same PDF and package created successfully. So I guess there is no issue with the PDF. Probably I did something wrong when i tried to create the equivalent java sdk code. You can refer to my other post as well: https://community.onespan.com/forum/api-request-equivalent-sdk-code please guide me.


Reply to: error.eslx.inputValidation.documentPreverifyError

0 votes
Hi Deepti, I've done some test on the PDF for example Save-as your document through Bullzip printer and then the PDF can be uploaded successfully. So I guess there's still some issues with the PDF. So I made a ticket with our support team on your behalf and will let you know once I got any feedback. Hope this could help! Duo

Duo Liang OneSpan Evangelism and Partner Integrations Developer


Reply to: error.eslx.inputValidation.documentPreverifyError

0 votes
Hi. Is there any update on this?

Reply to: error.eslx.inputValidation.documentPreverifyError

0 votes
Hi Deepti, While I am still waiting for R&D team's response, I do found something interesting to share with you. In Adobe Acrobat Pro DC, the forms in PDF seems can't be automatically detected until I clicked "Prepare Form"(attachment 1) and have pdf scanned(attachment 2). Then, when you save your pdf and upload again, the doc can be uploaded successfully. Duo

Duo Liang OneSpan Evangelism and Partner Integrations Developer


Attachments
10-19-2.png66.91 KB
10-19-3.png91.91 KB

Reply to: error.eslx.inputValidation.documentPreverifyError

0 votes
Hi Duo, Thank you for your response and for confirming that the document can be fixed. These PDF documents are generated as base64 streams in our APIs, as part of our workflows, so I would like to understand what we could do programmatically to fix the document. Thanks Deepti

Reply to: error.eslx.inputValidation.documentPreverifyError

0 votes

Hi Deepti, After deeper detection, I think my previously reply is a noise. I just found your PDF's version is 1.7(Adobe Extension Level 11) as the attachment shows and once I saved as your pdf in another version, the issue disappears. And in previous thread, the same issue was reported. I will add this in the ticket. Hope this could help! Duo

Duo Liang OneSpan Evangelism and Partner Integrations Developer


Attachments
10-19-4.png26.42 KB

Reply to: error.eslx.inputValidation.documentPreverifyError

0 votes
Hi Duo, Can you tell me the root cause of of this issue and when it will be fixed? Thanks, Deepti

Reply to: error.eslx.inputValidation.documentPreverifyError

0 votes
Hi Deepti, This is the reply I got from our R&D team: "The system generates an error if the library used to manipulate PDFs cannot support a document's PDF version and Adobe Extension Level. Currently that error is not being passed all the way to the Front End or API, so the error that appears is generic. OneSpan's PDF library is upgraded periodically. We are checking whether we can support a higher level soon. I will add another comment when we know. Meantime, if you can save the document with a lower extension level, do so." So is there a way that you can save your PDF with a lower extension level with your currently using library? Duo

Duo Liang OneSpan Evangelism and Partner Integrations Developer


Hello! Looks like you're enjoying the discussion, but haven't signed up for an account.

When you create an account, we remember exactly what you've read, so you always come right back where you left off