Error "XERCES error (Reason: invalid multi-byte sequence, Code:78)" is observed when attempting to retrieve credentials
119
Created On 11/10/26 11:03 AM - Last Modified 11/10/26 16:06 PM
Symptom
The following error is observed within the Credential Provider (CP) APPTrace log when attempting to retrieve credentials from a CP installed on a Linux machine hosting a .NET Core Application (v3.1):
"XERCES error (Reason: invalid multi-byte sequence, Code:78)"
Environment
12.0 Privileged Access Manager (PAM, self-hosted) Credential Provider
Credential Provider Unix/Linux
Cause
There are potentially unknown/additional characters contained within the original application code, which can cause XERCES errors to appear when attempting to retrieve credentials using CP. These unknown/additional characters may have appeared if the .NET application code was copied from somewhere else prior to being compiled and run.
To confirm that this is the cause, temporarily replace your application code with one of the examples outlined within the documentation link below (for example, use "Example 1: Request a password"):
https://docs.cyberark.com/Product-Doc/OnlineHelp/AAM-CP/Latest/en/Content/CP%20and%20ASCP/Net-Standard-EgsSyntax.htm?tocpath=Developer%7CCredential%20Provider%7CApplication%20Password%20SDK%7C.NET%20Application%20Password%20SDK%7C_____1
If the credentials are successfully retrieved after using an example from the link above, this helps to confirm that unknown/additional characters contained within the application code are the cause here.
Resolution
For successful retrieval of credentials, ensure all unknown/additional characters are removed from the .NET Core application code. The usage of a notepad editor can sometimes help to remove these unwanted unknown/additional characters.