Amphtml: Lazy gulp doesn't build ww.js when amp-bind.js detected

Created on 12 Oct 2019  路  7Comments  路  Source: ampproject/amphtml

What's the issue?

When gulp is used to start a localhost server with lazy-loaded AMP components, AMP pages that depend on amp-bind do not work correctly. The web worker ww.js is never built, so bind initialization and attempts to set states all fail.

How do we reproduce the issue?

  1. gulp clean
  2. gulp
  3. Open http://localhost:8000/examples/bind/basic.amp.html
  4. Tap the "Click me" button at the bottom of the page -- nothing happens.

You can confirm ww.js is the culprit by putting a breakpoint in initialize_(root) in extensions/amp-bind/0.1/bind-impl.js before this.ww_() as well as inside the subsequent .then().

What browsers are affected?

Chrome 78 on Ubuntu 19.04

Which AMP version is affected?

Confirmed on master branch at commit a9b947b4cb740d9805ca916bc3a9b1ad5f0e1231.

Bug infra

All 7 comments

/CC @estherkim

It looks like amp-loader-0.1.js and amp-auto-lightbox-0.1.js (both are loaded by the runtime and not found in the <head> of AMP documents) also fail to build on-demand.

Nice catch, @mattwomple. I believe this is related to one of the items listed in #24226. Will work on it this week. Meanwhile, as a workaround, I think you can run gulp build --noextensions before you launch the gulp server.

Thanks @rsimha (especially for the build --noextensions workaround). You've capture the issue reported here and more in your existing issue #24226. I'll close this and follow there.

Let's keep this issue open, since it adds some useful details. I've sent out a fix for all the points you raised. #25155 is ready for review.

@mattwomple This should be fixed. Let me know if you see anything amiss.

Thanks @rsimha . I saw your PR merge. Sorry I wasn't able to provide a review earlier, but I appreciate and look forward to the changes!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mrjoro picture mrjoro  路  3Comments

sryze picture sryze  路  3Comments

choumx picture choumx  路  3Comments

aghassemi picture aghassemi  路  3Comments

gmajoulet picture gmajoulet  路  3Comments