Error: undefined is not an object (evaluating 'a.obj')
Stack trace:
Error: undefined is not an object (evaluating 'a.obj') at (https://raw.githubusercontent.com/ampproject/amphtml/1527816702194/build/patched-module/document-register-element/build/document-register-element.node.js:446) at (https://raw.githubusercontent.com/ampproject/amphtml/1527816702194/build/patched-module/document-register-element/build/document-register-element.node.js:99) at (https://raw.githubusercontent.com/ampproject/amphtml/1527816702194/build/patched-module/document-register-element/build/document-register-element.node.js:1009) at getRootNode (https://raw.githubusercontent.com/ampproject/amphtml/1527816702194/src/service/ampdoc-impl.js:350) at (https://raw.githubusercontent.com/ampproject/amphtml/1527816702194/extensions/amp-ad-exit/0.1/filters/click-location.js:82) at (https://raw.githubusercontent.com/ampproject/amphtml/1527816702194/extensions/amp-ad-exit/0.1/amp-ad-exit.js:410) at (https://raw.githubusercontent.com/ampproject/amphtml/1527816702194/src/service/resource.js:668) at buildCallback (https://raw.githubusercontent.com/ampproject/amphtml/1527816702194/src/base-element.js:364)
Sample referrer:
Referrer https://amp-20minutos-es.cdn.ampproject.org/v/s/amp.20minutos.es/noticia/3357093/0/nueva-portada-revista-time-creada-98-drones/?amp_js_v=0.1&usqp=mq331AQECAEoAQ%3D%3D User agent Mozilla/5.0 (iPhone; CPU iPhone OS 11_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/11.0 Mobile/15E148 Safari/604.1 Service default-cdn-1p-canary Version 001527816702194
Is this high volume?
some addt'l stack traces
Error: undefined is not an object (evaluating 'a.obj') at https://raw.githubusercontent.com/ampproject/amphtml/1527816702194/build/patched-module/document-register-element/build/document-register-element.node.js:446:23 at https://raw.githubusercontent.com/ampproject/amphtml/1527816702194/build/patched-module/document-register-element/build/document-register-element.node.js:99:16 at https://raw.githubusercontent.com/ampproject/amphtml/1527816702194/build/patched-module/document-register-element/build/document-register-element.node.js:1009:24 at getRootNode (https://raw.githubusercontent.com/ampproject/amphtml/1527816702194/src/service/ampdoc-impl.js:350:11) at https://raw.githubusercontent.com/ampproject/amphtml/1527816702194/extensions/amp-ad-exit/0.1/filters/click-location.js:82:4 at https://raw.githubusercontent.com/ampproject/amphtml/1527816702194/extensions/amp-ad-exit/0.1/amp-ad-exit.js:410:6 at https://raw.githubusercontent.com/ampproject/amphtml/1527816702194/src/service/resource.js:668:34 at buildCallback (https://raw.githubusercontent.com/ampproject/amphtml/1527816702194/src/base-element.js:364:2) at ?.prototype (https://raw.githubusercontent.com/ampproject/amphtml/1527816702194/src/service/resources-impl.js:529:2) at measuredContentHeight (https://raw.githubusercontent.com/ampproject/amphtml/1527816702194/src/service/resources-impl.js:1195:30) at https://raw.githubusercontent.com/ampproject/amphtml/1527816702194/src/service/history-impl.js:225:11 at onVisibilityChanged (https://raw.githubusercontent.com/ampproject/amphtml/1527816702194/src/service/resources-impl.js:251:4) at https://raw.githubusercontent.com/ampproject/amphtml/1527816702194/src/service/history-impl.js:441:41 at https://raw.githubusercontent.com/ampproject/amphtml/1527816702194/src/service/url-replacements-impl.js:712:33 at service (https://raw.githubusercontent.com/ampproject/amphtml/1527816702194/src/services.js:299:7) at https://raw.githubusercontent.com/ampproject/amphtml/1527816702194/src/service/resources-impl.js:2148:50
@choumx, yes there are few spikes in last 1.5 hrs.
This has a lot of occurrences on the current production, will there be any fix soon? Thank you.
cc@https://cdn.ampproject.org/rtv/001529691528033/v0.js:64:46
P@https://cdn.ampproject.org/rtv/001529691528033/v0.js:62:728
ad@https://cdn.ampproject.org/rtv/001529691528033/v0.js:73:236
https://cdn.ampproject.org/rtv/001529691528033/v0.js:72:102
promiseReactionJob@[native code]
Sooooo many reports. All iOS. This is now a P0.
And another:
cc@https://cdn.ampproject.org/rtv/031530043289240/v0.js:64:46
P@https://cdn.ampproject.org/rtv/031530043289240/v0.js:62:728
jd@https://cdn.ampproject.org/rtv/031530043289240/v0.js:73:807
getVsync@https://cdn.ampproject.org/rtv/031530043289240/v0.js:189:402
onLayoutMeasure@https://cdn.ampproject.org/rtv/031530043289240/v0/amp-ad-exit-0.1.js:11:66
onLayoutMeasure@https://cdn.ampproject.org/rtv/031530043289240/v0/amp-ad-exit-0.1.js:20:548
updateLayoutBox@https://cdn.ampproject.org/rtv/031530043289240/v0.js:229:81
measure@https://cdn.ampproject.org/rtv/031530043289240/v0.js:207:428
ik@https://cdn.ampproject.org/rtv/031530043289240/v0.js:349:504
h@https://cdn.ampproject.org/rtv/031530043289240/v0.js:360:306
setState@https://cdn.ampproject.org/rtv/031530043289240/v0.js:323:495
doPass@https://cdn.ampproject.org/rtv/031530043289240/v0.js:344:45
https://cdn.ampproject.org/rtv/031530043289240/v0.js:326:1224
vc@https://cdn.ampproject.org/rtv/031530043289240/v0.js:134:573
fg@https://cdn.ampproject.org/rtv/031530043289240/v0.js:134:254
https://cdn.ampproject.org/rtv/031530043289240/v0.js:375:759
These are all coming from timers (or Promises), making me suspect that the content window has disappeared. Hence: https://github.com/ampproject/amphtml/pull/16469
fc@https://cdn.ampproject.org/rtv/001530221685242/v0.js:65:46
R@https://cdn.ampproject.org/rtv/001530221685242/v0.js:63:728
dd@https://cdn.ampproject.org/rtv/001530221685242/v0.js:74:236
https://cdn.ampproject.org/rtv/001530221685242/v0.js:73:102
promiseReactionJob@[native code]
Here's an android stack, so it's not just iOS:
TypeError: Cannot read property 'obj' of undefined
at F (https://cdn.ampproject.org/rtv/031530043289240/v0/amp-web-push-0.1.js:3:422)
at G (https://cdn.ampproject.org/rtv/031530043289240/v0/amp-web-push-0.1.js:3:231)
at Q.push.f.f.buildCallback (https://cdn.ampproject.org/rtv/031530043289240/v0/amp-web-push-0.1.js:11:176)
at https://cdn.ampproject.org/rtv/031530043289240/v0.js:227:91
at new Promise (<anonymous>)
at HTMLElement.Jh.b.build (https://cdn.ampproject.org/rtv/031530043289240/v0.js:226:342)
at yh.f.build (https://cdn.ampproject.org/rtv/031530043289240/v0.js:203:145)
at Tj (https://cdn.ampproject.org/rtv/031530043289240/v0.js:335:327)
at Sj (https://cdn.ampproject.org/rtv/031530043289240/v0.js:334:233)
at Lj.f.upgraded (https://cdn.ampproject.org/rtv/031530043289240/v0.js:336:295)
I CAN TRIGGER IT!!!!
- Open iGSA
- Search for something that triggers AMP, eg [america's got talent]
- Open an AMP result
- Close the result
- Search for a new result, eg [trump]
I think this is definitely related to how windows get unloaded. Since it's not a user facing issue (it happens on unload), we can safely downgrade it to p1. Let's hope #16469 filters it.
Even better:
If you put a breakpoint on the error logs, navigate to [trump], then use the back arrow, it always triggers the breakpoint!
Nice find! And thanks for taking this on.
Actually, it comes up every time you do any request with iGSA.
The root cause is https://github.com/ampproject/amphtml/blob/master/src/element-service.js#L229 from the stack traces. But (when this error happens), we only have the following services registered:
- ampdoc
- chunk
- viewer
- performance
- platform
- crypto
- batched-xhr
- documentState
- templates
- timer
- vsync
- xhr
- input
- url
- cid
- documentInfo
- viewport
- history
- resources
- url-replace
- action
- standard-actions
- storage
- navigation
- global-history-binding
- preconnect
It's the trying to get amp-consent on this page. amp-consent is element defined, so it tries to get the extensions service to wait for the amp-consent element. But, extensions hasn't been registered yet.