Skip to content
This repository has been archived by the owner on Jun 28, 2024. It is now read-only.

"--set-cookie" does not work #78

Open
tx0b opened this issue Aug 2, 2022 · 10 comments
Open

"--set-cookie" does not work #78

tx0b opened this issue Aug 2, 2022 · 10 comments

Comments

@tx0b
Copy link

tx0b commented Aug 2, 2022

Hi all,

I've a question regarding the "--set-cookie" functionality.

I tried to reproduce your example from the FAQ page by executing the command line "website-evidence-collector --set-cookie "edp_cookie_agree=1" http://edps.europa.eu".

However, from the report resulting from the above command line, I see that the cookie banner still appears in the screenshot - so it failed to assign the consent using --set-cookie "edp_cookie_agree=1".

image

I also tried to use an authenticated session on another website using --set-cookie "ssid=", but that didn't work either for a reason I don't know.

Please for support as soon as possible.

Best regards
nriv

@rriemann
Copy link
Contributor

rriemann commented Aug 3, 2022

Thank you for your feedback!

I have tested the current master version (hence, not the release version) and did not experience this problem with:

website-evidence-collector --no-headless -c edp_cookie_agree=1 --overwrite https://edps.europa.eu
# or
website-evidence-collector --no-headless -c "edp_cookie_agree=1" --overwrite https://edps.europa.eu

After the 2.0.0 release, a fix related to cookies was introduced (0210bb0). I suspect that this fixes your problem. So please update already to master. I will test the current master during August and plan to release 2.1 in September or so.

Screenshot without cookie:

screenshot-top

Screenshot with cookie:

screenshot-top

Please re-open if this does not fix your problem.

@rriemann rriemann closed this as completed Aug 3, 2022
@ZikBurns
Copy link

ZikBurns commented Jan 5, 2023

I installed Website Evidence Collector using this command:
npm install --global https://github.com/EU-EDPS/website-evidence-collector/tarball/master

And then executed the following command:
website-evidence-collector --no-headless -c "edp_cookie_agree=1" --overwrite https://edps.europa.eu

The screenshot I get doesn't have the cookies accepted:
image

The issue persists for me.

@rriemann
Copy link
Contributor

rriemann commented Jan 6, 2023

If nobody else can, I try to reproduce the issue next week

@rriemann rriemann reopened this Jan 6, 2023
@ZikBurns
Copy link

Any news on this?

@rriemann
Copy link
Contributor

I have no issues to simulate the acceptance of the EDPS website cookie banner with the current WEC master branch (in the inspection output called version v2.0.0-36-g3e8c98f).

My command:

website-evidence-collector --output output_auto_accept -c "edp_cookie_agree=1"  http://edps.europa.eu

Log output:

info: cookie parameter is not an existing file; parsing it as key=value pairs {"timestamp":"2023-01-26T15:19:59.744Z"}
info: adding session cookie edp_cookie_agree {"timestamp":"2023-01-26T15:19:59.747Z"}
info: browsing now to http://edps.europa.eu {"timestamp":"2023-01-26T15:20:00.237Z","type":"Browser"}
debug: Error with Permissions-Policy header: Origin trial controlled feature not enabled: 'interest-cohort'. {"timestamp":"2023-01-26T15:20:01.248Z","type":"Browser.Console"}
warn: Potential Tracking Beacon captured via easyprivacy.txt with endpoint https://webanalytics.europa.eu/ppms.js. {"data":{"filter":"/WebAnalytics.$domain=~webanalytics.italia.it","listName":"easyprivacy.txt","query":null,"url":"https://webanalytics.europa.eu/ppms.js"},"stack":[{"fileName":"https://edps.europa.eu/_en","source":"requested from https://edps.europa.eu/_en and matched with easyprivacy.txt filter /WebAnalytics.$domain=~webanalytics.italia.it"}],"timestamp":"2023-01-26T15:20:02.563Z","type":"Request.Tracking"}
warn: Persistant Cookie (JS) set for host edps.europa.eu with key _pk_id.9b49968a-a84a-46f8-adc5-ba3b6a2c7502.d56b. {"data":[{"creation":"2023-01-26T15:20:02.903Z","domain":"edps.europa.eu","expires":"2024-02-23T15:20:02.000Z","key":"_pk_id.9b49968a-a84a-46f8-adc5-ba3b6a2c7502.d56b","path":"/","sameSite":"lax","value":"bf449f04df315a0c.1674746403.0.1674746403.."}],"location":"https://edps.europa.eu/_en","origin":"https://edps.europa.eu","raw":"_pk_id.9b49968a-a84a-46f8-adc5-ba3b6a2c7502.d56b=bf449f04df315a0c.1674746403.0.1674746403..;expires=Fri, 23 Feb 2024 15:20:02 GMT;path=/;SameSite=Lax","stack":[{"columnNumber":24086,"fileName":"https://webanalytics.europa.eu/ppms.js","functionName":"setCookie","lineNumber":12,"source":"    at setCookie (https://webanalytics.europa.eu/ppms.js:12:24086)"},{"columnNumber":32150,"fileName":"https://webanalytics.europa.eu/ppms.js","functionName":"setVisitorIdCookie","lineNumber":12,"source":"    at setVisitorIdCookie (https://webanalytics.europa.eu/ppms.js:12:32150)"}],"timestamp":"2023-01-26T15:20:02.903Z","type":"Cookie.JS"}
warn: Persistant Cookie (JS) set for host edps.europa.eu with key _pk_id.9b49968a-a84a-46f8-adc5-ba3b6a2c7502.d56b. {"data":[{"creation":"2023-01-26T15:20:02.905Z","domain":"edps.europa.eu","expires":"2024-02-23T15:20:02.000Z","key":"_pk_id.9b49968a-a84a-46f8-adc5-ba3b6a2c7502.d56b","path":"/","sameSite":"lax","value":"bf449f04df315a0c.1674746403.0.1674746403.."}],"location":"https://edps.europa.eu/_en","origin":"https://edps.europa.eu","raw":"_pk_id.9b49968a-a84a-46f8-adc5-ba3b6a2c7502.d56b=bf449f04df315a0c.1674746403.0.1674746403..;expires=Fri, 23 Feb 2024 15:20:02 GMT;path=/;SameSite=Lax","stack":[{"columnNumber":24086,"fileName":"https://webanalytics.europa.eu/ppms.js","functionName":"setCookie","lineNumber":12,"source":"    at setCookie (https://webanalytics.europa.eu/ppms.js:12:24086)"},{"columnNumber":32150,"fileName":"https://webanalytics.europa.eu/ppms.js","functionName":"setVisitorIdCookie","lineNumber":12,"source":"    at setVisitorIdCookie (https://webanalytics.europa.eu/ppms.js:12:32150)"}],"timestamp":"2023-01-26T15:20:02.905Z","type":"Cookie.JS"}
warn: Persistant Cookie (JS) set for host edps.europa.eu with key _pk_id.9b49968a-a84a-46f8-adc5-ba3b6a2c7502.d56b. {"data":[{"creation":"2023-01-26T15:20:02.908Z","domain":"edps.europa.eu","expires":"2024-02-23T15:20:02.000Z","key":"_pk_id.9b49968a-a84a-46f8-adc5-ba3b6a2c7502.d56b","path":"/","sameSite":"lax","value":"bf449f04df315a0c.1674746403.1.1674746403.1674746403."}],"location":"https://edps.europa.eu/_en","origin":"https://edps.europa.eu","raw":"_pk_id.9b49968a-a84a-46f8-adc5-ba3b6a2c7502.d56b=bf449f04df315a0c.1674746403.1.1674746403.1674746403.;expires=Fri, 23 Feb 2024 15:20:02 GMT;path=/;SameSite=Lax","stack":[{"columnNumber":24086,"fileName":"https://webanalytics.europa.eu/ppms.js","functionName":"setCookie","lineNumber":12,"source":"    at setCookie (https://webanalytics.europa.eu/ppms.js:12:24086)"},{"columnNumber":32150,"fileName":"https://webanalytics.europa.eu/ppms.js","functionName":"setVisitorIdCookie","lineNumber":12,"source":"    at setVisitorIdCookie (https://webanalytics.europa.eu/ppms.js:12:32150)"}],"timestamp":"2023-01-26T15:20:02.908Z","type":"Cookie.JS"}
warn: Persistant Cookie (JS) set for host edps.europa.eu with key _pk_ses.9b49968a-a84a-46f8-adc5-ba3b6a2c7502.d56b. {"data":[{"creation":"2023-01-26T15:20:02.908Z","domain":"edps.europa.eu","expires":"2023-01-26T15:50:02.000Z","key":"_pk_ses.9b49968a-a84a-46f8-adc5-ba3b6a2c7502.d56b","path":"/","sameSite":"lax","value":"*"}],"location":"https://edps.europa.eu/_en","origin":"https://edps.europa.eu","raw":"_pk_ses.9b49968a-a84a-46f8-adc5-ba3b6a2c7502.d56b=*;expires=Thu, 26 Jan 2023 15:50:02 GMT;path=/;SameSite=Lax","stack":[{"columnNumber":24086,"fileName":"https://webanalytics.europa.eu/ppms.js","functionName":"setCookie","lineNumber":12,"source":"    at setCookie (https://webanalytics.europa.eu/ppms.js:12:24086)"},{"columnNumber":33362,"fileName":"https://webanalytics.europa.eu/ppms.js","functionName":"setSessionCookie","lineNumber":12,"source":"    at setSessionCookie (https://webanalytics.europa.eu/ppms.js:12:33362)"}],"timestamp":"2023-01-26T15:20:02.909Z","type":"Cookie.JS"}
warn: Potential Tracking Beacon captured via easyprivacy.txt with endpoint https://webanalytics.europa.eu/ppms.php. {"data":{"filter":"/WebAnalytics.$domain=~webanalytics.italia.it","listName":"easyprivacy.txt","query":{"_id":"bf449f04df315a0c","_idn":0,"_idts":1674746403,"_idvc":1,"_viewts":1674746403,"action_name":"EDPS Homepage | European Data Protection Supervisor","cookie":1,"gt_ms":36,"h":16,"idsite":"9b49968a-a84a-46f8-adc5-ba3b6a2c7502","m":20,"pv_id":"bXFkeQ","r":469923,"rec":1,"res":"1680x927","s":2,"send_image":1,"url":"https://edps.europa.eu/_en"},"url":"https://webanalytics.europa.eu/ppms.php?action_name=EDPS%20Homepage%20%7C%20European%20Data%20Protection%20Supervisor&idsite=9b49968a-a84a-46f8-adc5-ba3b6a2c7502&rec=1&r=469923&h=16&m=20&s=2&url=https%3A%2F%2Fedps.europa.eu%2F_en&_id=bf449f04df315a0c&_idts=1674746403&_idvc=1&_idn=0&_viewts=1674746403&send_image=1&cookie=1&res=1680x927&gt_ms=36&pv_id=bXFkeQ"},"stack":[{"fileName":"https://edps.europa.eu/_en","source":"requested from https://edps.europa.eu/_en and matched with easyprivacy.txt filter /WebAnalytics.$domain=~webanalytics.italia.it"}],"timestamp":"2023-01-26T15:20:02.911Z","type":"Request.Tracking"}
warn: Protocol error (DOMStorage.getDOMStorageItems): Frame not found for the given storage id {"timestamp":"2023-01-26T15:20:07.940Z","type":"Browser"}

screenshot taken by the WEC (screenshot-top.png):
screenshot-top

As you see, there is cookie banner. The cookie banner is shown when scanning with website-evidence-collector --no-headless --sleep 15000 http://edps.europa.eu.

@ZikBurns
Copy link

ZikBurns commented Feb 1, 2023

I installed again Website Evidence Collector using this command:
npm install --global https://github.com/EU-EDPS/website-evidence-collector/tarball/master

If I execute website-evidence-collector --version I get 2.0.0

If I execute the command:

website-evidence-collector --output output_auto_accept -c "edp_cookie_agree=1"  http://edps.europa.eu

I get from the console:

info: browsing now to http://edps.europa.eu {"timestamp":"2023-02-01T08:35:42.471Z","type":"Browser"}
debug: Error with Permissions-Policy header: Unrecognized feature: 'interest-cohort'. {"timestamp":"2023-02-01T08:35:45.436Z","type":"Browser.Console"}

And the screenshot:
image

@rriemann
Copy link
Contributor

rriemann commented Feb 2, 2023

What WEC version does the inspection.yml file say?

@ZikBurns
Copy link

ZikBurns commented Feb 6, 2023

It says:

version:
    npm: 2.0.0

@rriemann
Copy link
Contributor

Hi @ZikBurns ,

what about the line thereafter?

  version:
    npm: 2.0.0
    commit: v2.0.0-36-g3e8c98f-dirty

@ZikBurns
Copy link

It's empty:

version:
    npm: 2.0.0
    commit: ''

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants