ampproject / amphtml

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

Viewer#sendMessageAwaitResponse returning odd promises #6631

Closed jridgewell closed 7 years ago

jridgewell commented 7 years ago
TypeError: Failed to read storage: a.c.loadBlob(...).then(...).catch is not a function
    at zh (https://cdn.ampproject.org/rtv/001481323099490/v0.js:260:103)
    at xh.f.get (https://cdn.ampproject.org/rtv/001481323099490/v0.js:259:873)
    at https://cdn.ampproject.org/rtv/001481323099490/v0/amp-user-notification-0.1.js:13:84

From the error messages, we get to https://github.com/ampproject/amphtml/blob/master/src/service/storage-impl.js#L111-L113. Specifically, the #catch method is undefined.

There are only two bindings, and I'm trusting LocalStorageBinding#loadBlob's returned Promise will behave correctly. So that leaves ViewerStorageBinding's new call to Viewer#sendMessageAwaitResponse.

jridgewell commented 7 years ago

Browsers are a random assortment of Android devices, all coming from Google domains.

Request 
  https://cdn.ampproject.org/v/www.gazzetta.it/Calcio/Serie-A/Roma/02-12-2016/roma-salah-rientrera-febbraio-infortunio-poi-coppa-d-africa-dieci-partite-1701082583820_amp.html?amp_js_v=6  
Referrer    
  https://www.google.it/ 
User agent  
  Mozilla/5.0 (Linux; Android 6.0.1; SM-G920F Build/MMB29K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.85 Mobile Safari/537.36 
jridgewell commented 7 years ago

Seeing some 600 errors in the last hour with this, it's now our 9th largest error.

/cc @muxin, @lannka

jridgewell commented 7 years ago

Also found some iOS devices with the issue.

jridgewell commented 7 years ago

Reproducible at https://www.google.com/amp/parma.repubblica.it/sport/2016/10/31/news/dal_parma_al_pisa_corrado_riprova_la_scalata_nel_calcio-151014019/amp/