Problems saving Visualforce page changes in Force.com IDE due to new “sf_com_apps” package

Is anyone else out there encountering problems with the “Salesforce clients connected apps” package (namespace: sf_com_apps) that is being automatically installed into orgs since the Winter ’14 release? This package gets automatically installed if you use “officially supported” connected apps to connect to your org (Salesforce Workbench being one of these apps). Once this package is installed, we keep encountering problems any time we try to save Visualforce pages or components to the server using the Force.com IDE. The following “packagedVersion” reference automatically gets inserted into the meta.xml file for the page or component:

<?xml version="1.0" encoding="UTF-8"?>
<ApexPage xmlns="http://soap.sforce.com/2006/04/metadata">
    <apiVersion>23.0</apiVersion>
    <label>My Visualforce Page</label>
    <packageVersions>
        <majorNumber>1</majorNumber>
        <minorNumber>0</minorNumber>
        <namespace>sf_com_apps</namespace>
    </packageVersions>
</ApexPage>

Any subsequent attempt to save changes to the Visualforce page or component results in the following save error:

Save error: The specified Package Version number does not exist for that Package: sf_com_apps, 1.0

The installed version of this package is actually 1.5. However, changing the minorNumber to 5 and attempting to save doesn’t resolve the problem. It simply reverts back to 0 and fails with the same save error upon saving again. The only way to work around the issue is to remove the “packageVersions” element entirely and save. It will save, but it will re-insert the offending “packageVersions” element again, at which point your next save attempt will fail with the same error, unless you remember to remove this element from the meta.xml file first, before saving.

This is wreaking havoc with our Continuous Integration environment, because if a developer commits a meta.xml file containing the “packageVersions” element referencing sf_com_apps, the deployment to the integration org fails with the same error, even though the package is installed in that org too.

Answer

Well all organisations which have this package installed prevent saving visualforce page. There is no workaround as its metadata is not sync with actual compiled version. Latest information it have is of package 1.0, So it always resets to it.

Uninstall this package if you are not using its any of the following components from winter ’14:

  • Dataloader_Partner
  • Forcecom_IDE // No negative effect on Eclipse Force.com IDE after uninstall
  • Forcecom_Migration_Tool
  • Salesforce_Mobile_Dashboards
  • Salesforce_Touch
  • Salesforce_for_Outlook
  • Workbench
  • Dataloader_Bulk

I believe there should not be negative impact on features except the provided features associated with this package because one of my Winter `14 dev org don’t have this package and it is functioning normal. I can use Eclipse, Bulk API is working, Dataloader working etc. But new features may be impacted, didn’t test those.

Right now the only thing can be do is open the associated meta xml file, remove <package> node and save all by cmd+shift+S / ctrl+shift+S . And this is not a good as direct save

Attribution
Source : Link , Question Author : tlfu , Answer Author : Ashwani

Leave a Comment