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
SennahSennah 

More Smart Follow trouble

Hey ho,

 

I am striving problems while trying to install Smart Follow. I enabled chatter and then tried to install the app via the AppExchange.

 

The installer fails with this error:

 

 

Problem:

1. Apex Classes(01p20000000TZcU) chatterfollowrules.testFollowDepartment();
chatterfollowrules.testFollowEveryone();
chatterfollowrules.testFollowManagerHierarchy();
chatterfollowrules.testFollowProfile();
chatterfollowrules.testFollowRole();
chatterfollowrules.testTeamfollowRule()
System.DmlException: Insert failed. First exception on row 0; first error: DUPLICATE_VALUE, duplicate value found: SetupOwnerId duplicates value on record with id: 00D200000000NNy: []
Class.chatterFollowRules.testFollowDepartment: line 819, column 13 External entry point;
System.DmlException: Insert failed. First exception on row 0; first error: DUPLICATE_VALUE, duplicate value found: SetupOwnerId duplicates value on record with id: 00D200000000NNy: []
Class.chatterFollowRules.testFollowEveryone: line 627, column 13 External entry point;
System.DmlException: Insert failed. First exception on row 0; first error: DUPLICATE_VALUE, duplicate value found: SetupOwnerId duplicates value on record with id: 00D200000000NNy: []
Class.chatterFollowRules.testFollowManagerHierarchy: line 474, column 13 External entry point;
System.DmlException: Insert failed. First exception on row 0; first error: DUPLICATE_VALUE, duplicate value found: SetupOwnerId duplicates value on record with id: 00D200000000NNy: []
Class.chatterFollowRules.testFollowProfile: line 759, column 13 External entry point;
System.DmlException: Insert failed. First exception on row 0; first error: DUPLICATE_VALUE, duplicate value found: SetupOwnerId duplicates value on record with id: 00D200000000NNy: []
Class.chatterFollowRules.testFollowRole: line 667, column 13 External entry point;
System.DmlException: Insert failed. First exception on row 0; first error: DUPLICATE_VALUE, duplicate value found: SetupOwnerId duplicates value on record with id: 00D200000000NNy: []
Class.chatterFollowRules.testTeamfollowRule: line 403, column 13 External entry point

2. Apex Classes(01p20000000TZcO) chatterfollowbatchcaller.testchatterFollowBatchCaller()
System.DmlException: Insert failed. First exception on row 0; first error: DUPLICATE_VALUE, duplicate value found: SetupOwnerId duplicates value on record with id: 00D200000000NNy: []
Class.chatterFollowBatchCaller.updateSettings: line 58, column 4
Class.chatterFollowBatchCaller.testchatterFollowBatchCaller: line 128, column 3 External entry point



Validation Errors While Saving Record(s)

There were custom validation error(s) encountered while saving the affected record(s). The first validation error encountered was "00D200000000NNy: APEX_TEST_FAILED [01p20000000TZcU: chatterfollowrules.testFollowDepartment();
chatterfollowrules.testFollowEveryone();
chatterfollowrules.testFollowManagerHierarchy();
chatterfollowrules.testFollowProfile();
chatterfollowrules.testFollowRole();
chatterfollowrules.testTeamfollowRule(): System.DmlException: Insert failed. First exception on row 0; first error: DUPLICATE_VALUE, duplicate value found: SetupOwnerId duplicates value on record with id: 00D200000000NNy: []
Class.chatterFollowRules.testFollowDepartment: line 819, column 13 External entry point;
System.DmlException: Insert failed. First exception on row 0; first error: DUPLICATE_VALUE, duplicate value found: SetupOwnerId duplicates value on record with id: 00D200000000NNy: []
Class.chatterFollowRules.testFollowEveryone: line 627, column 13 External entry point;
System.DmlException: Insert failed. First exception on row 0; first error: DUPLICATE_VALUE, duplicate value found: SetupOwnerId duplicates value on record with id: 00D200000000NNy: []
Class.chatterFollowRules.testFollowManagerHierarchy: line 474, column 13 External entry point;
System.DmlException: Insert failed. First exception on row 0; first error: DUPLICATE_VALUE, duplicate value found: SetupOwnerId duplicates value on record with id: 00D200000000NNy: []
Class.chatterFollowRules.testFollowProfile: line 759, column 13 External entry point;
System.DmlException: Insert failed. First exception on row 0; first error: DUPLICATE_VALUE, duplicate value found: SetupOwnerId duplicates value on record with id: 00D200000000NNy: []
Class.chatterFollowRules.testFollowRole: line 667, column 13 External entry point;
System.DmlException: Insert failed. First exception on row 0; first error: DUPLICATE_VALUE, duplicate value found: SetupOwnerId duplicates value on record with id: 00D200000000NNy: []
Class.chatterFollowRules.testTeamfollowRule: line 403, column 13 External entry point, 01p20000000TZcO: chatterfollowbatchcaller.testchatterFollowBatchCaller(): System.DmlException: Insert failed. First exception on row 0; first error: DUPLICATE_VALUE, duplicate value found: SetupOwnerId duplicates value on record with id: 00D200000000NNy: []
Class.chatterFollowBatchCaller.updateSettings: line 58, column 4
Class.chatterFollowBatchCaller.testchatterFollowBatchCaller: line 128, column 3 External entry point]".

 

 

 

And when I choose to install the app with "Ignore Tests" I cannot create follow rules;

 

 

Visualforce Page: /apex/chatterFollow



caused by: System.DmlException: Insert failed. First exception on row 0; first error: DUPLICATE_VALUE, duplicate value found: SetupOwnerId duplicates value on record with id: 00D200000000NNy: []

Class.chatterFollowBatchCaller.updateSettings: line 58, column 4 External entry point

 

We are on EMEA. I can send my org. ID via PM if needed.

 

 

So, looks like I am not taking Chatter live today :(

 

Cheers,

Hannes

ReidCReidC

Hannes,


Thanks for the email -- sorry you're having trouble.  I just installed into a new DE and it worked as expected so I'm not sure what the error might be.  Can you test in a blank DE org that Chatter has been turned on it to see if you still get this?  Just trying to isolate the issue.

 

Thanks!

Reid

 

SennahSennah

Hi Reid,

 

this works also in my Chatter DEV...

Do I need to enable any objects feeds for it to work?

 

Cheers,

//Hannes

ReidCReidC

Hi Hannes,

 

No, it should work with default configuration as long as chatter is turned on.

 

Looking through the errors, it looks to me like the messages are coming out of the validation rules.  If you hit the records outlined in the error message 00D200000000NNy for example and look at the field SetupOwnerId -- is that a custom field that's an external ID no duplicates allowed?  I ask b/c if so it is likely that the pre-install test is attempting to insert a record with that blank, which would cause that kind of "duplicate value" error.

 

Since it installs safely in a clean DE, it's safe to check the install ignore apex errors and give that a shot if you want to.

 

HTH.

 

Reid

 

SennahSennah

Hey Reid,

 

We have no validation Rules on user records.

We don't have a field called SetupOwnerId in our setup.

 

I tried installing with "ignore tests" and that caused the second error which I posted initially.

 

Best,

//Hannes

SennahSennah

Any update on this?

SennahSennah

Gave it a second try today...

 

System.DmlException: Insert failed. First exception on row 0; first error: LICENSE_LIMIT_EXCEEDED, license limit exceeded: []

 

 

... I don't see any chance to free more licenses.

Any ideas?

I thought the license limit has already been removed for apex tests...!? Am I wrong?

ReidCReidC

Hm.  Will check this out.  Thanks for the follow up.

EBeachEBeach

We are also getting the "license limit exceeded" error message.  We do not get this error message in our sandbox.  Any ideas?:

 

Problem:

1. Apex Classes(01p30000000IXzT) chatterfollowlistbatch.testchatterFollowListBatch()
System.DmlException: Insert failed. First exception on row 0; first error: LICENSE_LIMIT_EXCEEDED, license limit exceeded: []
Class.chatterFollowListBatch.testchatterFollowListBatch: line 71, column 6
External entry point

2. Apex Classes(01p30000000IXzS) chatterfollowbatchcaller.testchatterFollowBatchCaller()
System.DmlException: Insert failed. First exception on row 0; first error: LICENSE_LIMIT_EXCEEDED, license limit exceeded: []
Class.chatterFollowBatchCaller.testchatterFollowBatchCaller: line 156, column 9
External entry point

3. Apex Classes(01p30000000IXzV) chatterfollowrules.testFollowDepartment();
chatterfollowrules.testFollowManagerHierarchy();
chatterfollowrules.testFollowProfile();
chatterfollowrules.testFollowRole();
chatterfollowrules.testTeamfollowRule()
System.DmlException: Insert failed. First exception on row 0; first error: LICENSE_LIMIT_EXCEEDED, license limit exceeded: []
Class.chatterFollowRules.testFollowDepartment: line 743, column 9
External entry point;
System.DmlException: Insert failed. First exception on row 0; first error: LICENSE_LIMIT_EXCEEDED, license limit exceeded: []
Class.chatterFollowRules.testFollowManagerHierarchy: line 492, column 9
External entry point;
System.DmlException: Insert failed. First exception on row 0; first error: LICENSE_LIMIT_EXCEEDED, license limit exceeded: []
Class.chatterFollowRules.testFollowProfile: line 683, column 9
External entry point;
System.DmlException: Insert failed. First exception on row 0; first error: LICENSE_LIMIT_EXCEEDED, license limit exceeded: []
Class.chatterFollowRules.testFollowRole: line 616, column 13
External entry point;
System.DmlException: Insert failed. First exception on row 0; first error: LICENSE_LIMIT_EXCEEDED, license limit exceeded: []
Class.chatterFollowRules.testTeamfollowRule: line 420, column 9
External entry point

4. Apex Classes(01p30000000IXzU) chatterfollowlists.testToBeFollowedRule()
System.DmlException: Insert failed. First exception on row 0; first error: LICENSE_LIMIT_EXCEEDED, license limit exceeded: []
Class.chatterFollowLists.testToBeFollowedRule: line 91, column 9
External entry point



Validation Errors While Saving Record(s)

There were custom validation error(s) encountered while saving the affected record(s). The first validation error encountered was "00D30000000UzEL: APEX_TEST_FAILED [01p30000000IXzT: chatterfollowlistbatch.testchatterFollowListBatch(): System.DmlException: Insert failed. First exception on row 0; first error: LICENSE_LIMIT_EXCEEDED, license limit exceeded: []
Class.chatterFollowListBatch.testchatterFollowListBatch: line 71, column 6
External entry point, 01p30000000IXzS: chatterfollowbatchcaller.testchatterFollowBatchCaller(): System.DmlException: Insert failed. First exception on row 0; first error: LICENSE_LIMIT_EXCEEDED, license limit exceeded: []
Class.chatterFollowBatchCaller.testchatterFollowBatchCaller: line 156, column 9
External entry point, 01p30000000IXzV: chatterfollowrules.testFollowDepartment();
chatterfollowrules.testFollowManagerHierarchy();
chatterfollowrules.testFollowProfile();
chatterfollowrules.testFollowRole();
chatterfollowrules.testTeamfollowRule(): System.DmlException: Insert failed. First exception on row 0; first error: LICENSE_LIMIT_EXCEEDED, license limit exceeded: []
Class.chatterFollowRules.testFollowDepartment: line 743, column 9
External entry point;
System.DmlException: Insert failed. First exception on row 0; first error: LICENSE_LIMIT_EXCEEDED, license limit exceeded: []
Class.chatterFollowRules.testFollowManagerHierarchy: line 492, column 9
External entry point;
System.DmlException: Insert failed. First exception on row 0; first error: LICENSE_LIMIT_EXCEEDED, license limit exceeded: []
Class.chatterFollowRules.testFollowProfile: line 683, column 9
External entry point;
System.DmlException: Insert failed. First exception on row 0; first error: LICENSE_LIMIT_EXCEEDED, license limit exceeded: []
Class.chatterFollowRules.testFollowRole: line 616, column 13
External entry point;
System.DmlException: Insert failed. First exception on row 0; first error: LICENSE_LIMIT_EXCEEDED, license limit exceeded: []
Class.chatterFollowRules.testTeamfollowRule: line 420, column 9
External entry point, 01p30000000IXzU: chatterfollowlists.testToBeFollowedRule(): System.DmlException: Insert failed. First exception on row 0; first error: LICENSE_LIMIT_EXCEEDED, license limit exceeded: []
Class.chatterFollowLists.testToBeFollowedRule: line 91, column 9
External entry point]".

ReidCReidC

You can safely ignore Apex errors when you install this app -- these are test methods that we have verified on other orgs.  They are failing here due to the way your org is configured.  This will only fail with the tests, not the production version.  HTH

jhittlemanjhittleman

We are not able to deploy any new Apex Triggers or Classes because of the following error: System.DmlException: Insert failed. First exception on row 0; first error: LICENSE_LIMIT_EXCEEDED, license limit exceeded: [] as a result of this Installed Package. How do we work around this short of removing the package?

manojpandeymanojpandey

Hi,

I have also faced this type of problem when I am trying to inactivate the trigger on Product this this will give me following type of error in Production :

20:12:09.841|FATAL_ERROR|System.DmlException: Insert failed. First exception on row 0; first error: LICENSE_LIMIT_EXCEEDED, license limit exceeded: []

Class.ActionPlansTestUtilities.createTestUser: line 87, column 6

Class.ActionPlansTestUtilities.createTestUser: line 62, column 15

Class.ActionPlansUtilitiesTest.apptask: line 133, column 22

Class.ActionPlansUtilitiesTest.APUtestSaveMasiveMethod: line 81, column 23

 

For Resolving this error We modified ActionPlansTestUtilities Test Class . In this Test Class there is a method createTestUser which creates user for Dummy Data. Now we are fetching the user from System by SOQL Query  and then insert the 1st User in the List  retrieved from query if the size of list is zero then it will go for the existing code.

 

Like this :

List<User> lstU = [Select ID, Email, Username, LastName, Alias, ProfileId, LanguageLocaleKey, LocaleSidKey, TimeZoneSidKey, EmailEncodingKey from User where ProfileId = : P.Id LIMIT 1];
      if(lstU.size() > 0){
        
        return lstU[0];
      }
      String namePrefix = this.createRandomWord();
    
      User testUser = new User();
      testUser.Email         = 'test@test.com';
      testUser.Username       = namePrefix + '@testuser.com';
      testUser.LastName       = 'test';
      testUser.Alias         = 'test';
      testUser.ProfileId       = p.Id;
      testUser.LanguageLocaleKey   = 'en_US';
      testUser.LocaleSidKey     = 'en_US';
      testUser.TimeZoneSidKey   = 'America/Chicago';
      testUser.EmailEncodingKey   = 'UTF-8';
      
      insert testUser;

 

I think This will help you.

 

Thanks 

Manoj Pandey