Lighthouse command not working when i set multiple cookies.

372 views
Skip to first unread message

anil kumar

unread,
Jun 1, 2019, 2:03:52 AM6/1/19
to pagespeed-insights-discuss
HI All,

can some one help here on why lighthouse command not working when i set multiple cookies. And also noticed cookies are not being set to browser when i set single cookie.


lighthouse  --port=9222 --throttling-method=devtools --throttling.rttMs=150 --throttling.throughputKbps=1.6*750 --output html --output-path ./lighthousecss.html https://www.walmart.com/search/?query=tvs --extra-headers "{\"Cookie\":\"SENV=prodb\", \"searchEnv=app-search.stage2.electrode-search.polaris.glb.prod.walmart.com\", \"enableSpeedProfile=true\", \"speed=slow\"}"


Following error is returned in console.


SyntaxError: Unexpected token , in JSON at position 128

    at JSON.parse (<anonymous>)

    at Object.begin (/Users/apothal/.nvm/versions/node/v10.13.0/lib/node_modules/lighthouse/lighthouse-cli/bin.js:109:34)

    at Object.<anonymous> (/Users/apothal/.nvm/versions/node/v10.13.0/lib/node_modules/lighthouse/lighthouse-cli/index.js:9:21)

    at Module._compile (internal/modules/cjs/loader.js:688:30)

    at Object.Module._extensions..js (internal/modules/cjs/loader.js:699:10)

    at Module.load (internal/modules/cjs/loader.js:598:32)


As per the documentation following is the syntax to set.


lighthouse <url> --extra-headers "{\"Cookie\":\"monster=blue\", \"x-men\":\"wolverine\"}"


Thanks,

Anil.

Reply all
Reply to author
Forward
Message has been deleted
0 new messages