How to resolve "Unable to deserialize the response" error in Studio logs while trying to get ML skills of an On-Prem AIC in the dropdown of ML extractor activity while the endpoints for same ML Skills (when made public in On-Prem AIC) work while using endpoint+API key .
If the dropdown of ML extractor activity does not get populated and below error can be seen in Studio logs at %localappdata%/UiPath/Logs, the following steps outlined below
An error occurred while trying to create the ML Skills Service: Microsoft.Rest.SerializationException: Unable to deserialize the response. ---> Newtonsoft.Json.JsonReaderException: Unexpected character encountered while parsing value: <. Path '', line 0, position 0.
- Install fiddler and configure the uipath.config as per this KB article - How To Use Fiddler As A Proxy For The Robot Service To Collect Information
- Once the traffic capture is started, click on refresh button in the studio and observer the request going to AIC.
- Notice the URL of the request. Check if it starts with "ai-deployer/v1/robot/mlskills" or not.
- Incase there are some other characters before above mentioned string (refer to screenshot below for example), it means the requests is being sent to wrong URL which is causing the root cause. This is caused if the AIC URL is incorrectly configured in orchestrator config file. (uipath.orchestrator.config.dll)
- In above screenshot, it is seen that there is "/ai-app" infront of "ai-deployer/v1/robot/mlskills" which is causing the issue. In this case, the FQDN of AIC is configured as <AIC-FQDN>/ai-app in Orchestrator config file. Ref - AI Center: Standalone Single Node - Configuring Orchestrator
- Open the Orchestrator config file in Orchestrator server and edit the values of AiFabric keys to contain only the FQDN of AIC and remove any additional characters. In above example, remove the /ai-app in the values of AiFabric keys and ensured only FQDN of AIC is present
- Perform an iisreset in Orchestrator server from elevated CMD
- Verify that Orchestrator and AIC are up and running
- Now click on the dropdown of ML extractor activity and check if the ML Skills are seen.
If the ML skills are still not visible in the Studio, collect fiddler traces, support bundle & Studio logs and share these files with the UiPath Product Support engineer.