ampproject / amphtml

The AMP web component framework.
https://amp.dev
Apache License 2.0
14.89k stars 3.89k forks source link

amp-subscription: Entitlement failed for local / No messaging channel errors #34693

Open rlsmileg opened 3 years ago

rlsmileg commented 3 years ago

Description

We are noticing that the Google News App (iOS) does NOT call our auth / pingback service endpoints and existing users have to click the login button on every article to bypass. Have you had or are you having a similar issue with your implementation? I believe I have tracked down the cause of the issue but do not have a solution. The issue is related to the “#webview=1” parameter that amp-subscription adds. The app/browser is supposed to create a messaging channel to call the service endpoints but fails to.

Reproduction Steps

-Launch page in Chrome... (URL that Google News App uses.) https://www-dallasnews-com.cdn.ampproject.org/v/s/www.dallasnews.com/business/autos/2021/05/15/car-shopping-isnt-likely-to-get-easier-as-chip-shortages-deplete-auto-dealers-lots/?outputType=amp&amp_js_v=0.1#webview=1&cap=swipe

Relevant Logs

Chrome Console log...
error.js:59 Uncaught (in promise) Error: fetch entitlements failed for local: timeout
    at ya (error.js:59)
    at wb.g.createError (log.js:365)
    at timer-impl.js:145
    at timer-impl.js:86
error.js:59 Uncaught (in promise) Error: No messaging channel: initMessagingChannel timeout
    at ya (error.js:59)
    at wb.g.createError (log.js:365)
    at timer-impl.js:145
    at timer-impl.js:86

Browser(s) Affected

Chrome

OS(s) Affected

IOS

Device(s) Affected

No response

AMP Version Affected

No response

ChrisAntaki commented 3 years ago

Hey @rlsmileg, thanks for this detailed report! I reached out to the iOS app team, and we'll keep you posted with updates here

rlsmileg commented 3 years ago

@ChrisAntaki Thanks. Is this a amphtml bug/issue or an app implementation issue? Since I can replicate the same behavior in Mac OS Chrome as the IOS Google News App I was not sure.

ChrisAntaki commented 3 years ago

So I think it's an app issue. You'll see the same behavior if you open the link directly in any web browser, since the web browser won't proactively do an AMP viewer handshake

rlsmileg commented 2 years ago

@ChrisAntaki What is the latest on this? Looks like Google news still does not work with Login / Subscribe links presented via the amp-subscriptions framework.

ChrisAntaki commented 2 years ago

Hey @jpettitt ! Any chance you could help answer this question ?

jpettitt commented 2 years ago

I'm pretty sure this is a Google News bug. the webview=1 param tells the runtime that it's isa viewer and the viewer will provide a number of services. The error message indicate that the gnews is setting the webview flag but not initializing the corresponding messaging handler (or AMP isn't detecting it). Reaching out to gnews team for. more info.

stale[bot] commented 1 year ago

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.