+ Start a Discussion
prabhutumprabhutum 

Deployment Error - An error occurred on your page

Hello,

 

I am trying to deploy some VF controller which has 89% of coverage.. The VF page runs fine on sandbox when I try to deploy the controller get blunt message "An error occurred on your page."

 

Has anyone seen the error before and have an idea of what could be wrong?

 

Thanks!

Pr@sh...

 

JonPJonP
This is usually caused by a missing file, resulting in an unmet dependency on your Visualforce page that prevents it from being deployed.  Make sure that all classes, VF components, static resources, schema objects, etc. are included in your deployment set (or already exist in your target environment).
Saurabh_RawaneSaurabh_Rawane
Is there any way to Identify which components are missing,  i am finding it really hard to know which are getting missed in my deployement, with the above error message.. ?
JonPJonP

Our developers are working to replace that error message with something more useful.  I don't have a specific ETA for you.

 

In the meantime, if you are deploying to a non-production organization, pasting the controller code into the browser-based Apex editor will pop up Quick Fix messages for each missing reference to another class or page, allowing you to create those missing components on the fly.  But the browser-based Apex editor is not available in production organizations (and until the server returns the name of the broken dependency in the Save Error, the Force.com IDE is unable to offer a similar Quick Fix feature).

 

Otherwise the only workaround is trial and error, in order to figure out what component is missing or fails to save.

 

Jon

salesforce.com Product Manager

Saurabh_RawaneSaurabh_Rawane

Thanks Jon for the info.

 

I was able to fix the problem, here's more information into what was the issue and what resolution i went for,

 

In my VF code i was declaring my PageReference like this PageReference pg = Page.SomePage, so the MD API was not able to pick it up even though i was passing SomePage in same deploy, so i changed the PageReference declaration to PageReference pg = new PageReference('/apex/SomePage') and i was successfully able to deploy things to production.

 

Adding more message to the current Error message will be just about idle, thanks for looking into this.

sparkysparky

Just wanted to revive this thread to say that I just got this same error.  Dear Salesforce, it's been 8 months.  Please improve this error message.