-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
Extension reload breaks waitForExtension #25436
Comments
cc @choumx @jridgewell @i-like-robots also tracked in Google b/143942489 force fail example https://github.com/i-like-robots/broken-amp-versions-test-case |
Got repro. I'm fixing this right now. |
I'm moving this to P0. |
/cc @erwinmombay |
The race condition indicated by @jpettitt is also an issue, but less likely to occur. Will be fixed in the same pull request. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When an extension depends on another extension for a service it ends up in
waitForExtension
if the provider hasn't yet loaded. We've been seeing timeouts fromwaitForExtension
that shouldn't be happening.This problem is that if v0.js detects a version mismatch (v0.js version differs from an extension version) it automatically loaded the correct version of the extension to match v0 9
getExtensionScript_
). When it does this it creates a new extension holder which leaveswaitForExtension
waiting on a load that will never happen.This only happens on publisher sites due to the AMP cache automatically syncing versions and it only happens if the extension in cache mismatches v0.js.
See deletion of the extension holder https://github.com/ampproject/amphtml/blame/40fa29d8daacd92fbbcfda825f4b7f89dab25a34/src/service/extensions-impl.js#L255
The text was updated successfully, but these errors were encountered: