Getting "Part of the cookie is invalid when tried from UiPath HTTP activity"

Hi team, I’m trying to perform an HTTP activity. I used a curl from a website and it is working fine from Postman, after testing it multiple times. But, when I tested the same with UiPath, I’m getting an error “part of the cookie is invalid”. I’m not sure if there is any encoding that is stopping it.

My cookie looks something similar to this:

cookie= .AspNet.Cookies=P7vdGgRECZeBT6VfCnhJFjtXruTBfmRgU; ARR==dfdf832d704cf8a856df6f137; Samesite==dfdf832d704cf8a856

hi,

can you send a screenshot of how the activity is configured also could you check if you are using the cookie field in the properties section of the http request, each cookie needs to be set separately

Hi, thanks for the response!

I’m passing each value of cookie as a separate argument. I’m unable to share a screenshot as its in a secured env. But, here is the details of properties:

  1. Request type: Get

  2. Accept format: Any

  3. Request URL: “https://abc.xyz.org/api/search/quick

  4. Cookies:
    .AspNet.Cookies : value
    ARR : value
    Samesite : value

  5. Parameter:
    query : abc123

Upon executing the activity, I’m getting an error saying “part of the cookie is invalid”. I tried even removing cookie one by one. But, it is running into a business exception “sign in to your account”, since mandatory cookie is removed.

And, I’m able to get valid response from postman when tested with same data.

could you check if postman is sending some hidden headers or cookies which might be necessary

also each of your cookie should be separate value in collection.

Team, quick update! I’m able to resolve the issue. It is due to some encoding issue. The solution is:

I broke down the cookie into separate string variables and passed the variables to the cookie parameters instead of sending it as a single string or hardcoded values directly.

And that worked!

Thanks,
Aswin Sridhar

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.