Huh...
addState
ignores state rates, so I think State Resist is the only relevant trait here.
Just to make sure: are you are using any plugins? If you have recently added, disabled, or removed any plugins, remember to save your project to apply Plugin Manager changes before testing.
For testing purposes, give the state an icon: that way you can be certain exactly when the state is present. Doing so will let you see if it's a problem with a State Resist trait or the actual state's traits.
- If the state is getting added, a screenshot of its page in the database might help.
- If the state is not getting added, check all trait sources for the user. For an actor, that means checking the Actor, Class, State, Weapon, and Armor database tabs. If any of those have a "State Resist: 21" trait then the actor will not be able to have that state.
Another thing to try: make another skill, Scope: User, that just adds state 21 through its Effects list. I guess that will have the same result as this one, i.e. the state will not be added, but it may be worth checking.