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: a.target.animate is not a function. (In 'a.target.animate(a.keyframes,a.timing)', 'a.target.animate' is null) #29746

Closed
ampprojectbot opened this issue Aug 7, 2020 · 3 comments
Assignees
Labels
Type: Error Report An error reported by AMP Error Reporting

Comments

@ampprojectbot
Copy link
Member

Details

Error report: link
First seen: May 1, 2020
Frequency: ~ 110/day

Stacktrace

Error: a.target.animate is not a function. (In 'a.target.animate(a.keyframes,a.timing)', 'a.target.animate' is null)
    at request (extensions/amp-animation/0.1/runners/native-web-animation-runner.js:86:39)
    at request (extensions/amp-animation/0.1/runners/native-web-animation-runner.js:80:40)
    at extensions/amp-animation/0.1/amp-animation.js:438:8

Notes

@rsimha modified extensions/amp-animation/0.1/runners/native-web-animation-runner.js:85-86 in #23417 (Jul 19, 2019)
@renovate-bot modified extensions/amp-animation/0.1/runners/native-web-animation-runner.js:80-80 in #27350 (Mar 30, 2020)
@aghassemi modified extensions/amp-animation/0.1/amp-animation.js:436-444 in #10818 (Aug 15, 2017)

Seen in:

  • 08-07 Nightly (0238)

Possible assignees: @rsimha, @aghassemi

/cc @ampproject/release-on-duty

@ampprojectbot ampprojectbot added the Type: Error Report An error reported by AMP Error Reporting label Aug 7, 2020
@rcebulko
Copy link
Contributor

rcebulko commented Aug 7, 2020

Release on-duty isn't feeling well atm, and I saw this come up in error monitoring.
@ampproject/wg-ui-and-a11y This appeared in the latest Nightly (First seen date above is a mislead). Looks like Ali owned most of this file, but IIRC he's no longer active on AMP so someone else should take a look.

@rcebulko
Copy link
Contributor

/cc @calebcordry

@kristoferbaxter kristoferbaxter self-assigned this Aug 10, 2020
@kristoferbaxter
Copy link
Contributor

I modified this recently, can take a look.

jridgewell added a commit to jridgewell/amphtml that referenced this issue Aug 10, 2020
The `target` property points to a DOM element, which is not structured clonable (a requirement for `postMessage`). We used to `delete entry.target`, to get around this.

But when native `IntersectionObserver`, the `IntersectionObserverEntry`s has no own properties. Instead, the properties are getters that exist on the prototype. `delete` doesn't work for prototype-inherited properties, so this workaround stopped working. Now, we'll just create a new object with the properties we care about, which is honestly cleaner (you shouldn't mutate objects you don't own).

Fixes ampproject#29746
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Error Report An error reported by AMP Error Reporting
Projects
None yet
Development

No branches or pull requests

3 participants