function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
DevonDevon 

Chatter APEX Error from Milestone1_Task_Chatter_Tst

I tried to deploy a change set to production today and I hit the following error on the following piece of APEX which came from a SFDC Labs app.

Milestone1_Task_Chatter_Tst 

Milestone1_Task_Chatter_Tst.testChatterTaskReassignment 
System.DmlException: Update failed. First exception on row 0 with id a1b40000000JGYIAA4; first error: FIELD_CUSTOM_VALIDATION_EXCEPTION, Insert failed. First exception on row 0; first error: INVALID_CROSS_REFERENCE_KEY, This user cannot follow any other users or records: []: []
Class.Milestone1_Task_Chatter_Tst.testChatterTaskReassignment: line 95, column 9 External entry point

I do not understand this error and believe it has something to do with Chatter. Additionally, the debug log seemed to imply that a Portal User was being used for the execution of the test. I think the APEX is using the portal user, who of course does not have access to Chatter, and that's causing the failure.

This error is now preventing us from deploying code and changes sets to production.  Premiere support suggested uninstalling the app which of course means I lose all the data.  I was hoping a patch could be deployed to the app so I can fix the issue directly in prod.  Otherwise we'll have to uninstall and frankly probably won't bother putting it back.

 

Please advise.

ReidCReidC

Weird.

Did it give you a specific user ID?

If you can send me a user ID and your org ID I can do a bit more sluthing for you.

One more option you have is to install a patch to disconnects Milestones and Chatter -- it's in Github, a fork / pull request, but not in the app itself.

labs at salesforce dot com

 

Thx Reid

 

DevonDevon

Can you please confirm if I have the correct steps:

- Go to Github for the patch

- Put the code into eclipse

- Use eclipse to deploy to production

????

If this is the case won't I be blocked from deploying to prod because my test coverage isn't even passing right now??  If I cannot install a change set into prod because of this error how would I be able to push new code from Eclipse?

 

Please advise.

pdostpdost

I am also running into this issue.  Did the above work to resolve it?

GregMcGregMc

I am getting the same error, and it is preventing me from making any changes to my org.  What is the name of the patch?  Or, what did you find to resolve the issue?  Thanks.

@altius_rup@altius_rup

Hi,
We ran into this problem.
One of the Milestone PM tests is (was) not precise enough.

In our case, deactivating our Salesforce Sites fixed the problem :
- deactivate your Salesforce Sites
- run tests, install, etc.
- reactivate your Salesforce Sites

Rup