With onCPayUserStateChange the User parameter should be set to Automatic and Access set to Everybody. Please ensure this is the case. Are you trying to Add, Replace, or Remove usergroups? You said only some of them are failing. Is there anything about the ones that are failing that is similar to one another? You can revert the API usage with the below change to see if that solves it.
IN: components/com_comprofiler/plugin/user/plug_cbautoactions/models/usergroup.php
ON: Line 38
FROM:
Code:
$myGroups = Application::User( $user->get( 'id', 0, GetterInterface::INT ) )->getAuthorisedGroups( false );
TO:
Code:
$myGroups = $user->get( 'gids', array(), GetterInterface::RAW );
If that doesn't fix it it's not the API doing it and you'll need to use the debug mode as suggested earlier to try and see where it's failing.
I have left the Reload User on. Would I need to switch it off again?
Shouldn't matter.