You need to sign in to do that
Don't have an account?
How do you debug package install script failures?
We're using the new Apex Install Script feature and we're getting an error on package install.
When the attempt to install the package fails we receive the following email from Salesforce:
The package installation failed. Please provide the following information to the publisher:
Organization Name: [org name] Organization ID: [org id]
Package: [package name]
Version: 6.2
Error Message: The post install script failed.
Thank You,
salesforce.com
That doesn't really give us much to go on. Does anyone know of a way to get more details about the failure? Ideally we want to know what line number of the install handler or the exception that caused the problem.
You need to make sure your package has a user specified in the Nofiy on Apex Error field in the managed package dev org. The email address of that user should receive the details (unless this is a sandbox org).
All Answers
You need to make sure your package has a user specified in the Nofiy on Apex Error field in the managed package dev org. The email address of that user should receive the details (unless this is a sandbox org).
Hi Andrew,
Thanks, that was it. I just wasn't patient enough to wait for the email to come through.
How can I confirm that the "Notify on Apex Error" address is working properly? I definitely have it sent, and I have tested deliverability of the email address, but am not receiving any errors when the Install Script fails. Is there anything else I need to do on either the dev org side or in the target org?
It may take a couple times for the change to populate. You won't receive notifications from sandbox orgs. I also don't believe you receive notifications from beta packages, but don't hold me to it.
It's extremely difficult to debug this if we don't get notifications from beta packages (and I'm not) when the post install script fails. The only feedback I'm getting is the e-mail to the installer stating the the install failed because the post install script failed with no further details.
In my case it passes my fresh install unit tests without issue, yet fails during install. I can't upload a release version of the package yet as that will lock in all object changes, VF page API names, etc...
What is the reasoning behind no notifications from sandbox orgs? We often install our package in sandbox orgs first for customer testing before installing in production. If we can't find out why our script fails in the sandbox, how can we know it's all good to install in prod? Is there another way to find out what the actual install script error is?