How to Solve UNKNOWN_EXCEPTION Errors
On rare occasions a site may receive an UNKNOWN_EXCEPTION from CopyStorm. In CopyStorm’s log, the error will look like:
10-Feb-17 09:02:11: [UnexpectedErrorFault [ApiFault exceptionCode=’UNKNOWN_
exceptionMessage=’An unexpected error occurred. Please include this ErrorId if you contact support: 303701882-51722 (1187285824)’
This error is generated by Salesforce’s server when it encounters a problem that Salesforce code does not know how to handle. Most of the time the issue will resolve itself after a couple days as Salesforce fixes their own internal problems. If the problem does not clear up automatically then this article may help you resolve the issue.
In Capstorm’s experience, to get Salesforce support to pay attention to UNKOWN_EXCEPTION issues a problem has to be reproduced in an application supplied totally by Salesforce. When this error is being given by Salesforce we need to:
- Isolate the SOQL query in CopyStorm that is causing the problem.
- Run the query in the Salesforce console to prove that the query is causing the issue.
- Submit a case to Salesforce.
Step 2: Isolate the SOQL Query in CopyStorm
- Start CopyStorm from a command line window with the “-debug” command line switch.
- CopyStorm.bat -debug
- sh CopyStorm.sh -debug
- On the Advanced tab, select “Debug Mode” under “Misc Options”.
- You may have to select “Show All Options” to see the “Debug Mode” option.
- Start a copy. The SOQL query causing the issue will appear in the command line window.
- Copy the SOQL and save it to a file.
Step 2: Run the SOQL Query in the Salesforce Console
- Login to the the Salesforce GUI.
- Choose “Developer Console” in the menu that appears when you click on your name.
- Paste the SOQL query into the editor.
- Press the execute button.
- Copy the error text and save it.
- The error should appear in the lower part of the screen.
Step 3: Submit a Support Case to Salesforce
- Describe what you did in Step 3.
- Include the problem SOQL and the error text from Step 3.
First level support can rarely solve this sort of issue and you should expect a request to grant access to your system so Salesforce engineers can reproduce the error.
Why Does This Type of Error Happen?
Though we do not see this error often, it has appeared a few times when Salesforce index corruption of their Oracle database caused the issue. Truthfully we cannot know the precise root cause unless Salesforce exposes it — to any application it is only exposed as a type of error that Salesforce does not expect to occur.