Closed Ludovic33Fr closed 3 years ago
Hi @Ludovic33Fr I usually use httpbin to verify. They have different URL that just echo back the values. https://httpbin.org/cookies will print all cookies on the screen:
bin/sitespeed.js https://httpbin.org/cookies -n 1 --cpu --cookie TEST_PRIVACY=123456
Can you try if it works for you?
Hi @soulgalore ,
Thank you for your response. I try with httpbin and i think that the issue coming from the execution context.
In deed with your command : node bin/sitespeed.js https://httpbin.org/cookies -n 1 --cpu --cookie TEST-PRIVACY=123456
Maybe it is coming from node version : for me v.14.15.4
To add more informations on this issue :
Ok, can you help me how to reproduce it on Linux? Is it that example you showed or another that do not work?
When I tried the dockerized version it also works for me: docker run --rm -v "$(pwd)":/sitespeed.io sitespeedio/sitespeed.io https://httpbin.org/cookies -n 1 --cpu --cookie TEST-PRIVACY=123456 -n 1
Setting a cookie for Chrome uses the CDP protocol. this is the magic: https://github.com/sitespeedio/browsertime/blob/main/lib/chrome/chromeDevtoolsProtocol.js#L131-L141
Hi,
This works for me on Linux, but I also ran into some issues with cookies, especially when I am using --requestheader
option.
For example, httpbin shows cookies but they are not really in the broswer :
Overall I have encountered several issues with special characters especially (=
and :
)
Ex: TEST_COOKIE=a=b
OR TEST_COOKIE=2020-10-12T08:24:23
Moreover we cannot define a custom domain nor a path with the --cookie
option. So the solution for me was to use scripts and the Chrome DevTools Protocol.
Hi @mploquin yep its a limit today that you cannot set domain/path. If you have time I PR I can rewove it. In CDP it would be pretty straightforward, but for Firefox we still use https://github.com/sitespeedio/browsertime-extension to set cookies, that is little bit harder to test.
Thank you @soulgalore for your advice. It helps me to troubleshoot.
Best,
Hello,
It seems there is a regression on the cookie parameter.
how to reproduce your issue
Please find in attchment the Fiddler session exported Sitespeedio-cookie.zip
This parameter --cookie is required to monitor the third party and simulate the consent cookie (GRPD issue)