TestProject Forum

Add cookie domain error

I am trying to add a cookie and have all the information set up correctly using the Add Cookie action. Recently I have been getting a “Cookie ‘domain’ mismatch” error. I checked the domain and it is correct, but the step keeps failing.

I have tried using the “Get Cookie” action to retrieve that same cookie and when I check the results I see the same domain returned, but with following at the end of the domain “;secure;”. I tried entering the retrieved domain into the add cookie action under the domain section, but am still getting the domain mismatch error. Any ideas why this is happening?

I believe what may be occurring is it won’t accept still active cookies from another login section. Because during a recording session when I generated the cookie and added it again it passed, but if I tried entering the previous cookie from the other session which is still active(hasn’t expired) it fails on domain mismatch. Could this be this issue?

Hi,
Note you don’t need to add “;secure;" in your domain, using the Domain from get cookie should provide the correct value.
In the case you are still encountering issues, please share with us the URL you are using while performing the step, also the Domain input you are using in the step Add cookie.
In case it’s secured please contact us via support chat on app.testproject.io
image