Question

1
Replies
43
Views
NaimChau Member since 2017 11 posts
Infosys Ltd
Posted: March 7, 2018
Last activity: March 12, 2018
Closed
Solved

Error "Invalid Configuration object passed. Code: 1" for DocumentViewer

Hi

I am using DocumentViewer in a script to download PDF's url in a custom mobile app for 7.2.

I have 2 environments, dev and stg. In dev the script works. When I click on a button, it will pass the URL to the script and your device will ask you how to open the file. When I move it to stg, I get this message "FAILURE! Invalid Configuration object passed. Code: 1"

Does anyone know what that means? Is there a list of code with information about them?

This is my code

<script>
var openCallbacks = {
onProgress: function (progress) {
},
onSuccess: function () {
},
onFailure: function (error) {
alert('FAILURE! ' + error.description + ' code: ' + error.code);
}
}
function DownloadURL1(url)
{
if(pega.mobile.isHybridClient)
{
alert("Downloading... Press Ok to continue and wait");
window.launchbox.DocumentViewer.open(url, openCallbacks);
}
}
</script>
Thanks
Mobile
Moderation Team has archived post
Share this page LinkedIn