Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🚨 Error: qc(...).finally is not a function #27956

Closed
ampprojectbot opened this issue Apr 22, 2020 · 9 comments · Fixed by #28001
Closed

🚨 Error: qc(...).finally is not a function #27956

ampprojectbot opened this issue Apr 22, 2020 · 9 comments · Fixed by #28001

Comments

@ampprojectbot
Copy link
Member

Details

Error report: link
First seen: Apr 8, 2020
Frequency: ~ 2,383/day

Stacktrace

Error: qc(...).finally is not a function
    at (https://raw.githubusercontent.com/ampproject/amphtml/2004172112280/extensions/amp-next-page/1.0/service.js:230)
    at build (https://raw.githubusercontent.com/ampproject/amphtml/2004172112280/extensions/amp-next-page/1.0/amp-next-page.js:42)
    at buildCallback (https://raw.githubusercontent.com/ampproject/amphtml/2004172112280/src/custom-element.js:478)
    at (https://raw.githubusercontent.com/ampproject/amphtml/2004172112280/src/custom-element.js:475)
    at build (https://raw.githubusercontent.com/ampproject/amphtml/2004172112280/src/service/resource.js:336)
    at resource (https://raw.githubusercontent.com/ampproject/amphtml/2004172112280/src/service/resources-impl.js:539)
    at buildResourceUnsafe_ (https://raw.githubusercontent.com/ampproject/amphtml/2004172112280/src/service/resources-impl.js:474)
    at buildOrScheduleBuildForResource_ (https://raw.githubusercontent.com/ampproject/amphtml/2004172112280/src/service/resources-impl.js:592)
    at upgraded (https://raw.githubusercontent.com/ampproject/amphtml/2004172112280/src/custom-element.js:384)

Notes

@wassgha modified extensions/amp-next-page/1.0/service.js:230-235 in #26841 (Feb 28, 2020)
@wassgha modified extensions/amp-next-page/1.0/amp-next-page.js:42-45 in #25636 (Dec 10, 2019)
@zhouyx modified src/custom-element.js:477-479 in #14306 (Apr 3, 2018)
@rsimha modified src/custom-element.js:475-475 in #21212 (May 16, 2019)
@rsimha modified src/service/resource.js:336-338 in #21212 (May 16, 2019)
@lannka modified src/service/resources-impl.js:537-542 in #23345 (Jul 17, 2019)
@choumx modified src/service/resources-impl.js:474-474 in #27657 (Apr 9, 2020)
@mkhatib modified src/service/resources-impl.js:592-592 in #4476 (Aug 12, 2016)
@jridgewell modified src/custom-element.js:384-384 in #8229 (Mar 28, 2017)

@rcebulko
Copy link
Contributor

@wassgha for awareness/in case there's an obvious culprit you recognize here. Frequency is pretty low though, so if nothing stands out this can probably be backlogged

@wassgha wassgha self-assigned this Apr 23, 2020
@wassgha
Copy link
Contributor

wassgha commented Apr 23, 2020

From a quick investigation, it seems like Promise.finally() is not available in some old version of Firefox, I'll defer to @ampproject/wg-runtime to check our polyfills (or whether we should ban usage of .finally if necessary).

@wassgha
Copy link
Contributor

wassgha commented Apr 23, 2020

@jridgewell feel free to reassign

@jridgewell
Copy link
Contributor

I think we should ban use of finally, it's an ES2019 feature. The polyfill we have is just to polyfill ES2015 to ES5, not the more recent features.

@jridgewell
Copy link
Contributor

In fact, it's already banned:

requirement: {
type: BANNED_NAME
error_message: 'Promise.prototype.finally is not allowed'
value: 'Promise.prototype.finally'
}

@wassgha
Copy link
Contributor

wassgha commented Apr 23, 2020

@jridgewell how is that enforced? the PRs seem to pass

@jridgewell
Copy link
Contributor

I think I made a mistake, it should be BANNED_PROPERTY_CALL. Looking into it now.

@wassgha
Copy link
Contributor

wassgha commented Apr 23, 2020

Sounds good and I'll send a PR to remove usages

@rcebulko
Copy link
Contributor

Thanks for fixing and preventing this y'all!

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

Successfully merging a pull request may close this issue.

4 participants