Cannot deregister application because of invalid cookie

Item Value
SQLCODE -785
Constant SQLE_DEREG_APP_NOT_FOUND
SQLSTATE 5RW24
Sybase error code 13795
ODBC 2 State 42000
ODBC 3 State 42S02

Probable cause 

Application has not been registered successfully or it has already been deregistered previously.