Sitespeed.io: Backend request doesn't contains cookie when cookie configured in browsertime

Created on 17 Oct 2018  路  9Comments  路  Source: sitespeedio/sitespeed.io

Hi,
I trying to use browsertime's cookie parameter in order to send all the requests with this cookie.
The problem is, when printing the request at the server side, I'm not getting the cookie information.

the config.json looks like this:

{
  "browsertime": {
               ...
               "cookie": "blabla=1",
               ...
   }
   ...
}
  • i'm testing it locally (macOS)
  • in my Node.js package.json using version "^7.3.4"
  • browser: chrome Version 69.0.3497.100 (Official Build) (64-bit)

any idea what went wrong?

bug

Most helpful comment

Found the issue with Liran: The option browsertime.cacheClearRaw cleared the cookies set previously.
Is this considered expected behaviour or would you consider a "fix" for this @soulgalore ?

All 9 comments

Hi @liranGlik but you see it in the HAR? Let me try to reproduce it tonight.
Best
Peter

Hi @liranGlik this seems to work for me:
docker run --shm-size=1g --rm -v "$(pwd)":/sitespeed.io sitespeedio/sitespeed.io:7.6.3 https://httpbin.org/cookies -n 1 --browsertime.cookie apa=hepp

Best
Peter

Found the issue with Liran: The option browsertime.cacheClearRaw cleared the cookies set previously.
Is this considered expected behaviour or would you consider a "fix" for this @soulgalore ?

Thanks @omrilotan then it is a bug, the extension (that both clear the cache and add the cookie) does things in the wrong order then. I'll make a fix for this later today. Sorry!

Best
Peter

I checked the code and that's the problem. For Firefox we do a promise.all on all things that need to be done in the extension (but that's wrong) we should of course clear the cache first. For Chrome we just use the old callbacks instead of promises. I wanna clean this up with the fix, so it will take some time. I'll start tonight.

Sounds good. LMK if you want help

Moving this issue to the extension repo https://github.com/sitespeedio/browsertime-extension/issues/12

I've pushed a new version in master, thank you @omrilotan for the fix!

Released this early this morning in 7.7.0! I'll close the issue but please let me know if you still have a problem.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jangrewe picture jangrewe  路  7Comments

pixlab picture pixlab  路  5Comments

julrich picture julrich  路  7Comments

gfoxCartrawler picture gfoxCartrawler  路  4Comments

soulgalore picture soulgalore  路  6Comments