New issue
Advanced search Search tips

Issue 666320 link

Starred by 1 user

Issue metadata

Status: WontFix
Owner:
Closed: Feb 2017
Components:
EstimatedDays: ----
NextAction: 2017-02-13
OS: Windows
Pri: 2
Type: Bug



Sign in to add a comment

Sometimes the caches.open browser method doesn't return a .then promise

Reported by pe...@younow.com, Nov 17 2016

Issue description

UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.98 Safari/537.36

Steps to reproduce the problem:
1. Run caches.open (with a string matching a cache id)
2. It does not return a .then style promise.

What is the expected behavior?
It should return a promise no matter what was passed in.

What went wrong?
It simply didn't.

Did this work before? N/A 

Does this work in other browsers? Yes

Chrome version: 54.0.2840.98  Channel: stable
OS Version: 10
Flash Version: Shockwave Flash 23.0 r0

I know this is a hard one to reproduce. Out of all of our users only <2% of them are experiencing this. Here's some information that may come in handy. I just want to make sure nothing is slipping through the cracks:

- Happens only on windows machines
- Affects only Chrome (any version under 53)

Here is the error itself:

Object [object Object] has no method 'then'
 

Comment 1 by phistuck@gmail.com, Nov 17 2016

Looks like the only way to get to this state is when the service worker terminates -
https://cs.chromium.org/chromium/src/third_party/WebKit/Source/modules/cachestorage/CacheStorage.cpp?l=235
But that does not make a lot of sense here (it is calling the code... Or maybe it is calling the code exactly when Chrome terminates it? But then you will not have a scripting execution environment to know about that, since it has terminated, I guess).

Comment 2 by pe...@younow.com, Nov 17 2016

I've tried to get into that state but it isn't easy. Seems like an edge case. I've tried incognito and disabling my cache but no go. Maybe there is deeper place in the settings to disable cache that I'm not familiar with?
Labels: Needs-Triage-M54 M-54 Needs-Feedback
Would you mind providing us a sample test case for the ease of finding regression?

Comment 4 by falken@chromium.org, Dec 15 2016

Owner: falken@chromium.org
Status: Started (was: Unconfirmed)
Investigating...

Comment 5 by falken@chromium.org, Dec 15 2016

Components: -Blink>ServiceWorker Blink>Storage>CacheStorage
Status: Assigned (was: Started)
I don't see how this could happen. Could you share any example code?

CacheStorage::open returns a ScriptPromise which would have a .then method.

In the error case phistuck@ mentioned, when we return an empty ScriptPromise, the effect in JS-land would be to return undefined. So the error message would be "Cannot read property 'then' of undefined".

Anymore feedback or clues would be appreciated.

Comment 6 by phistuck@gmail.com, Dec 15 2016

I realize this is a different issue, but perhaps the fix is related - see  issue 617539 .

Comment 7 by falken@chromium.org, Dec 15 2016

Yeah, that looks like an unrelated problem/fix. I suspect something is wrong with the script... pedro@ are you sure the value directly returned by caches.open() is an Object without a .then method? Are you using any intermediate libraries or code to invoke caches.open()?

Comment 8 by jsb...@chromium.org, Jan 30 2017

NextAction: 2017-02-13

Comment 9 by falken@chromium.org, Feb 14 2017

Status: WontFix (was: Assigned)
Please re-open if there is a repro or strong clues on how to repro.

Sign in to add a comment