New issue
Advanced search Search tips

Issue 908133 link

Starred by 2 users

Issue metadata

Status: Started
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug



Sign in to add a comment

Illegal invocation error for CookieStore API when valid origin trial token is provided

Project Member Reported by cha...@chromium.org, Nov 23

Issue description

Chrome Version: 70.0.3538.102
OS: Linux, Mac (likely happens on all OSes)

What steps will reproduce the problem?
(1) Navigate to https://jpchase.github.io/origintrials/cookiestore-validtoken.html
(2) Open the DevTools console
(3) Run the following code snippet: await cookieStore.get('cookie-name')

What is the expected result?
The DevTools console is initially empty, and running the script should result in the 'cookie-name' being displayed.

What happens instead?
The console has this error:
Uncaught (in promise) TypeError: Illegal invocation
    at go (cookiestore-validtoken.html:6)
    at cookiestore-validtoken.html:8


This only occurs when an origin trial token valid for the page and Cookie Store is provided. If there is no token, or the token is not valid for the page (e.g. a different origin), there is no illegal invocation error. For examples, try:
https://jpchase.github.io/origintrials/cookiestore-invalidtoken.html
https://jpchase.github.io/origintrials/cookiestore-notoken.html

The result on the other pages depends on the state of  chrome://flags/#enable-experimental-web-platform-features.

When enabled, the cookie is created/read successfully (i.e. the expected result above). When disabled, the following error occurs (as expected):
Uncaught (in promise) ReferenceError: cookieStore is not defined
    at go (cookiestore-invalidtoken.html:5)
    at cookiestore-invalidtoken.html:7

 
Status: Started (was: Untriaged)

Comment 2 by cha...@chromium.org, Jan 18 (4 days ago)

Labels: -Pri-1 Pri-2
Lowering priority as CookieStore trial has ended.

Sign in to add a comment