-
Notifications
You must be signed in to change notification settings - Fork 3.9k
🚨 Error: Cannot read property '__AMP_TOP' of null #28264
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
Comments
👀 |
I found two related changes.
|
After some investigation. I think it's most likely due to #28069. Reason being we have:
If there's a race condition, the Services.urlReplacementsForDoc(this.element_) should throw the same error before.I can add additional check to this.win_ != null if that's helpful.
Add @choumx @jridgewell for fixing ideas. |
Nice catch and thanks for the quick debugging and response. What's the race condition? |
Read from Lines 85 to 89 in c985e34
My understanding is that element.ownerDocument.defaultView is null and the race condition is that the document is disconnected.
My guess on the error above: amphtml/extensions/amp-analytics/0.1/amp-analytics.js Lines 234 to 236 in c985e34
With the analytics-chunk experiment, the document somehow is disconnected before we call loadConfig ?
|
Ah ok, it's the same issue. The root fix is probably removing |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions. |
Details
Error report: link
First seen: May 4, 2020
Frequency: ~ 1,167/day
Stacktrace
Notes
@cramforce
modifiedsrc/service.js:325-325
in #23767 (Aug 7, 2019)@choumx
modifiedsrc/service.js:193-202
in #10131 (Jun 28, 2017)@rsimha
modifiedsrc/service.js:378-381
in #21212 (May 16, 2019)@choumx
modifiedsrc/service.js:246-255
in #16328 (Jun 29, 2018)@calebcordry
modifiedextensions/amp-analytics/0.1/variables.js:448-449
in #22300 (May 17, 2019)@zhouyx
modifiedextensions/amp-analytics/0.1/config.js:60-62
in #28174 (May 4, 2020)@zhouyx
modifiedextensions/amp-analytics/0.1/amp-analytics.js:235-239
in #27605 (Apr 20, 2020)Seen in:
Possible assignees:
@cramforce
,@calebcordry
/cc @ampproject/release-on-duty
The text was updated successfully, but these errors were encountered: