Amphtml: WindowMessenger code not included in amp-web-push-helper-frame.html and amp-web-push-permission-dialog.html

Created on 3 Jun 2019  路  22Comments  路  Source: ampproject/amphtml

What's the issue?

Getting the error:

amp-web-push-helper-frame.html?parentOrigin=https://localhost:8080:7 Uncaught ReferenceError: module$build$all$amp_web_push_0_1$window_messenger is not defined
    at new p (amp-web-push-helper-frame.html?parentOrigin=https://localhost:8080:7)
    at amp-web-push-helper-frame.html?parentOrigin=https://localhost:8080:18
    at amp-web-push-helper-frame.html?parentOrigin=https://localhost:8080:18

I have checked the source code and figured out that module$build$all$amp_web_push_0_1$window_messenger should be included in the code as WindowMessenger code.
I checked the actual source code in https://github.com/ampproject/amphtml/blob/master/extensions/amp-web-push/0.1/amp-web-push-helper-frame.js
And it seems like some build issue

How do we reproduce the issue?

Just create a simple AMP with amp-web-push. Follow this: https://amp.dev/documentation/components/amp-web-push

What browsers are affected?

Google Chrome v74.0.3729.169

Which AMP version is affected?

v0

Stale Bug components

All 22 comments

i have same problem

@nawazMoEngage @albirrkarim

Thank you very much for bringing up this issue! 馃槃

cc @aghassemi @kristoferbaxter

I don't know which working group this would fall under 馃

any update on this?
is anybody solving it or not?

@nawazMoEngage Bumped this to the team 馃槃

/to @jasonpang

Looks like this was broken on May 14 in 1905091827220.

Likely a bundling/compile issue. My current guess is #22125 based on: https://github.com/ampproject/amphtml/blame/1905091827220/build-system/tasks/dist.js

/to @rsimha

Nice catch, @choumx. Fix sent out in #23093.

@rsimha maybe need to update here too?
https://cdn.ampproject.org/v0/amp-web-push-helper-frame.html

Following the documentation, I still get error:
https://amp.dev/documentation/components/amp-web-push

AMP Version 1907022322580

Screenshot from 2019-07-12 13-11-34

The last PR to touch that code was #22839.

There were some complications with buildExperiments, buildLoginDone, and buildWebPushPublisherFiles calls since they move they're files into the build directory to be processed by closure way later into the process (in their individual methods) so i had to separate this file move step into a pre${method} invocation that needed to be executed before the babel preprocessing. In buildWebPushPublisherFiles case it also had a post process step.

@erwinmombay Can you take a look?

looking

@nawazMoEngage Were you able to resolve this ?

@gustavopaes @nawazMoEngage @himanshu-myupchar can any of you give me a live link to replicate the code. appreciate it

@erwinmombay here:
https://www3.uol.com.br/gpaes/amp-web-push/index.htm

Both helper-iframe.html and permission-dialog.html files I got here:
https://amp.dev/documentation/components/amp-web-push

@gustavopaes could you update the amp-web-push-helper-frame html file (looks like it is https://www3.uol.com.br/gpaes/amp-web-push/helper-iframe.html in your case) with the latest from view-source:https://cdn.ampproject.org/v0/amp-web-push-helper-frame.html and see if that fixes the problem?

it looks like there is a bit of disconnect here since the html source is supposed to be copied. I'll talk to @rsimha to see if theres anything we can do about this

@erwinmombay updated and now working.

@nawazMoEngage @himanshu-myupchar could you ya'll also try and update the helper frame html and see if it works?

No still not working

@himanshu-myupchar do you have a live page i can debug?

Can you check this:
https://www.myupchar.com/en/tips/immunity-boosting-foods-in-hindi.amp

And also is there a way by which the user automatically gets asked for notifications, rather than clicking on Subscription button, like in Non-Amp Pages.

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.

Was this page helpful?
0 / 5 - 0 ratings