Javascript Errors with Digital Signature
Copy link to clipboard
Copied
Hi,
Attached are the 2 javascript-related error messages that pop up when digitally signing a document in Adobe DC Standard (tried 2015 and continuous, both had the issue). Usually error 1 pops up than error 2 right after, but sometimes only 1 appears. When this happens, the PDF gets curropted, so the user has to close/reopen the unsigned file to sign again.
We do have a document manager. I've tested digitally signing when the document manager is closed, and Adobe does trigger its own "save-as" by opening file explorer to save the signed copy with a new name. However, when the document manager triggers this same thing (just offers the option to save in the DM), these errors appear.
I've tried repairing Adobe, uninstall/reinstall, removing and re-adding the digital signature, and most recently, disabling the "save-as optimizes for fast web view" option in Preferences>Documents in Adobe.
Is there an Adobe option that can fix this? I think it's basically being told to "save-as" the signed document which causes Javascript errors and curropts the document. Any suggestions for options to bypass this? We can't turn off the document manager.
Copy link to clipboard
Copied
If you're the creator of the source PDF you need to open the javascript console and see what exactly is the error(s) when the script execute.
You should also share this javascript code so that the developers in the community forums can assist you better.
Something is throwing an exception in the jscript when the Save As action is applied.
See if this is also related to an exception that you may be able to fix by manually setting a breakpoint in that script or a conditional break.
See pages 108-109 of the Acrobat Javascript Scripting Reference Guide, "Dbg Methods".
- From the way it looks, if you go to page 273 of the Adobe JavaScript Scripting Reference Guide, "Field Methods", you may need to check if your jscript is specifying the appropriate security handler with parameters.
See in that page the oSig, oInfo, cDIPath, parameters.
Also verify if your script is a document or folder level script with a defined "this.saveAs " event object.
I suspect this is the problem when you use this PDF with the DM.
If the parameters that are currently used when the signature is applied indicate to save to a particular path, or lack specification of a path, it will create a conflict because part of the script is expecting to find the user's directory path before the save as action. Whereas if it doesn't specify it will take the current user preferences as the default to save the file as.
In addition, See page 66, "execMenuItem"
The NOTES in red, the second paragraph specifically says, "If the user preferences are set to "Save As creates Fast View Adobe PDF Files", do not expect a form object to survive a "Save As"; Field Objects are no longer valid, and an exception may be thrown when trying to access a fiels object immediately after "Save As".
Copy link to clipboard
Copied
Thanks for the detailed reply! I admit that I'm not familier with debugging javascript, but as this error only appears when I "save as a new file" in the document manager (instead of replacing the unsigned file), I've contacted them. Interestingly, this doesn't happen on a different PC using the same PDF, so it's a difficult issue to track.
Save-as optimizes for fast web view doesn't affect the error whatsoever. Also, if this is a file-lock issue (one of the errors say that the file is open elsewhere), I've already disabled file preview in file explorer and the DM....any other places to check for this?
Copy link to clipboard
Copied
Yes, it would be helpful if you can open the event viewer and see what is triggered there as additional errors, and/or sharing an Acrobat log file.
In windows 7 or later, all Acrobat logs are found here:
C:\Users\--\AppData\Local\Temp
But I am curious if you are able to sport anything here: C:\Users\--\AppData\Local\Temp\AcrobatSaveAs
Copy link to clipboard
Copied
I am also wondering, since you mention that it works in other computers, then this must (or may ) be an issue of reapplying updates or repair the Acrobat application in the misbehaving computer .
But before you do any of this, see if you can find discrepancies in those logs.
Can you please verify what is the last version update that was applied to the Acrobat product in the misbehaving computer, the operating system, and compare this info with the computer(s) that the PDF doesn't act out?
Copy link to clipboard
Copied
I think it's related to the DM, as Adobe without the DM involved always applies the digital signature properly. The DM is just supposed to trigger the regular Adobe save-as, but they are investigating it.
I'll check the logs and attach one on Monday. Should I just attempt the save-as, and when it fails, copy and attach the latest log file? Do they have any personal information in them that I need to scrub?
This user's PC is Adobe 2015 with latest updates (win10X64, 1909). I've tried repairing the install, uninstall/reinstall, and tried installing the latest Adobe DC (continuous) just to test. None of these worked.
The other PC where it DOES sign properly is using a test digital signature PFX, and Adobe 2017, but I doubt 2017 is a special snowflake in this...
Copy link to clipboard
Copied
Sorry for this late reply.
I'll check the logs and attach one on Monday. Should I just attempt the save-as, and when it fails, copy and attach the latest log file? Do they have any personal information in them that I need to scrub? --- Yes please do. Normally the logs show identifiable information about the computer sytem used. The name of the computer I would scrub or if it reveals any network domain name for example , I would remove that too.
Copy link to clipboard
Copied
Sounds good - which log file names should I attach? This is Adobe 2015 on Win10x64. Thanks. Oh, and will Adobe generate a log file if I open Adobe>replicate the error>close Adobe? Should I clean the temp folder first so that the log file is "clean"?
Copy link to clipboard
Copied
Here is more appropriate guidance on how to collect these logs:
Verify release notes again: https://helpx.adobe.com/acrobat/kb/collect-logs-crash-freeze.html
And manually verify if these updates, as you've mentioned are actually logged. Here is the proper guidance: https://community.adobe.com/t5/acrobat-reader/can-arm-folders-be-deleted/td-p/5141447?page=1
Then proceed with these steps:
- If your user has Creative Cloud in the misbehaving computer(s) see here for install logs and downloads: https://helpx.adobe.com/creative-cloud/kb/troubleshoot-install-logs-cc.html
- Using the log collector Tool: https://helpx.adobe.com/creative-cloud/kb/cc-log-collector.html
- Collecting logs for crashes or freezes: https://helpx.adobe.com/acrobat/kb/collect-logs-crash-freeze.html
Copy link to clipboard
Copied
Also, I don't think you've ever told us the actual versions of 2015 and DC which fail, and the actual version of 2017 that succeeds. (Not "latest" please, something like 2016.123.34344 in each case).
Copy link to clipboard
Copied
I forgot to ask what is the DM software that you're using?
I think I answered a thread for another user long time ago. They were using a DM software that was acting out, but it resulted in configuration settings that had to be modified for a specific client computer.
Have you been able to find any troubleshooting literature on that software?
Copy link to clipboard
Copied
The version of 2015 on the user's PC is "Version 2015.006.30518", and the test PC (which also has 2015, but it's Pro not Standard, my mistake) is the same version. I was just able to replicate the issue on the test PC as well, using a different Windows profile and test digital signature.
I jumped on the test PC to test signing - the signature worked once, so I closed Adobe and tested again, and now it has the same error. The original PC had the issue before updating to 30518, so I don't think it's the update. This issue has been notorious for randomly popping in and out. I've tried removing and re-adding the user's digital signature in case it was a file-lock issue, but not sure where the issue is coming from on the test PC (which appeared to work fine last week).
The DM is Worldox GX4. The tech support thinks that the "Save-as" the DM is invoking might be causing the issue - they think it might not be doing the same "save-as" as when you sign without the DM, but maybe "save-as extended PDF". They are looking into it. If this is the DM using the wrong save type, is there a way I can test this on my end while the DM is closed?
I've attached a file that shows a glitch on the form when the error happens when digitally signing - it adds blue "form fields" to the corners of the document for some reason. Not sure if this helps. This is why the user has to close/reopen the unsigned version when the error appears.
Copy link to clipboard
Copied
With the document opened in Acrobat, Right-click and select from the context menu "Document Properties", see what was the source program that was use to crteate this PDF?
Copy link to clipboard
Copied
Here are the properties of the unsigned document (before attempting any signing)
Copy link to clipboard
Copied
Is Citrix involved in the administration of clients using this software?
Copy link to clipboard
Copied
Nope, no Citrix environment.
Copy link to clipboard
Copied
OK,
So far this is what I've found. You may need to have IT recheck the cabinet card and client profile for those two misbehaving computers.
The tutorial here https://www.youtube.com/watch?v=Pw7r0WDCiBo is using MS Word application as an example, but it is very straight forward in what may need to be done with the PDF document that you're troubleshooting.
I think this is where the problem is.
Also, see here: https://www.worldox.com/GX4Help/whnjs.htm Click on "Index" then click on the letter "S" and see under "Save As Dialog"
Copy link to clipboard
Copied
Here is the user guide for download:
ftp://ftp.worldox.com/TRANSFER/FTP/Worldox_GX4_Pro_User_Guide_Basic.pdf
Look in page 10 Saving a file with profile information.
And here for the End User Manual: https://robinsongray.com/wp-content/uploads/2014/01/Worldox-GX4-End-User-Training-Manual.pdf
Copy link to clipboard
Copied
Thanks for this! I've already contacted their tech support, and they're looking into debugging logs on the DM's end. The cabinet is already created and populated with files, but saving this one as a new file (the signed copy) generates this issue. Replacing the unsigned copy of the file actually saves properly, so they are currently looking into this. Thanks.
I just wanted to see if I could troubleshoot the Adobe side....I actually tried calling Adobe's tech support, but wow. Didn't get anything from them lol.
Copy link to clipboard
Copied
That's no good. Too many customers saying the same.
Well, I hope your IT support can resolve the issue. Can you share the javascript code?
Maybe the developers in the community can assist in spotting discrepancies in the code.
If you can enable the javascript console in Acrobat, hit Ctrl+J in your keyboard to open it up and see if there are errors. Post a screenshot.
Copy link to clipboard
Copied
Hi,
How do I use the javascript debugger? It seems to get frozen when I execute a command in Adobe.
The issue is replicated WITHOUT the document manager by doing the following:
1. Apply a digital signature and save the file with a new name
2. On the signed file, clear the digital signature.
This creates the form-field artifacts and when you attempt to save the document or reapply the digital signature, it causes the error messages.
I attempted to run the javascript debugger but had no success in getting it to run in the background. Which icons do I click to have it track? The green circle or the arrows?
Are there any Adobe settings I can modify to fix this issue?
Copy link to clipboard
Copied
Go to Edit, Preferences, "Javascript".
In the section "JavaScript Debugger" tick the following checkboxes: "Enable Javascript debugger after Acrobat is restarted" and "Enable Interactive console".
Click OK restart the application. You can use the "JavaScript" to run the debugger after you do this.
Also , with the JavaScript Toll open, check "Document Javascripts" and check if there is any document level javascript code.
If there are document-level jscript please share it here (if you can) so that the developers can assist you.
Copy link to clipboard
Copied
I enabled the debugger from Preferences, but how do activate the debugger to run before I apply the digital signature? Screenshot of the debugger console is attached. Ignore the message saying it's not enabled - this is a Google Search image. Also, I'm heading out but will reply tomorrow morning if I can get it working. Thanks again!
Copy link to clipboard
Copied
Ctrl+J.
Copy link to clipboard
Copied
Hi,
I opened the debugger and ran the digital signature, but like I mentioned, the debugger doesn't appear to be running properly. Here's what I got. See the red circle at the top? Does that need to be green or red? WHat other UI elements do I need to click to have it log in the background?


-
- 1
- 2