cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Error on MAC when inserting to the collection

We have the JAMF integration and I've tested the settings and they are still valid.  When a machine is inserted to the collection the CasperCollectionInsert.log and the Request log have the following error.  Is this something with our set up on the Global tab of the catalog ite having 'Remove from Collection when Complete' checked or is this caused by something else?

Exception Message: Object reference not set to an instance of an object.. StackTrace: at AppPortal.Infrastructure.Repositories.CasperRepository.RemoveMachineFromCollection(Int32 collectionID, String machineName)
at CallSite.Target(Closure , CallSite , Object , Int32 , String )
at AppPortal.Infrastructure.Repositories.DeploymentRepository`1.RemoveMachineFromCollection(Int32 collectionID, String machineName)
at AppPortal.Infrastructure.Services.DeploymentService`1.RemoveMachineFromCollection(Int32 collectionID, String machineName)
at ESDService.Casper.InsertMachineIntoCasper(DataTable pendingInserts, String centralSite)

(1) Solution
CharlesW
By Level 12 Flexeran
Level 12 Flexeran
I can see an issue in the code where this might occur if you did not select the option "create uninstall policy" when adding your casper package. Not sure if it enabled for you or not, but try creating an uninstall policy when you add your casper package to the catalog item, to see if the issue persists..

View solution in original post

(2) Replies
CharlesW
By Level 12 Flexeran
Level 12 Flexeran
I can see an issue in the code where this might occur if you did not select the option "create uninstall policy" when adding your casper package. Not sure if it enabled for you or not, but try creating an uninstall policy when you add your casper package to the catalog item, to see if the issue persists..

I checked the deployment details and it did have an uninstall policy created.  It was trying to insert to the collection every 2 minutes so I removed the deployment package form the catalog item, added it back on, set the status on the original deployment to failed, and then clicked reinstall and it is working.  I'm not sure what may have happened but it's good to know that if there is no uninstall policy it will fail to do the insert.