Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

appendSpy: TypeError: undefined is not a function #560

Closed
macbre opened this issue Oct 2, 2015 · 1 comment
Closed

appendSpy: TypeError: undefined is not a function #560

macbre opened this issue Oct 2, 2015 · 1 comment
Labels
Milestone

Comments

@macbre
Copy link
Owner

macbre commented Oct 2, 2015

$ phantomas "http://poznan.wikia.com/wiki/Koszary_Huzar%C3%B3w?noexternals=1" --phone --webkit2 --verbose

15:38:21.651 recv: HTTP 200 <http://mercury.nocookie.net/mercury-static/vendor/main-244f9429.js> [application/javascript]
15:38:21.652 Event recv emitted
15:38:21.697 Event domQuery emitted
15:38:21.697 DOM query: by selector - "script[src*="webcomponents.js"]" (using querySelectorAll) in #document
15:38:21.805 Event domQuery emitted
15:38:21.814 JS error: TypeError: undefined is not a function (evaluating 'destNodePath.indexOf('DocumentFragment')')
15:38:21.814 Event jserror emitted
15:38:21.815 TypeError: undefined is not a function (evaluating 'destNodePath.indexOf('DocumentFragment')')
15:38:21.815 Backtrace: appendSpy(): phantomjs://webpage.evaluate() @ 70 / unknown fn: /home/macbre/github/phantomas/core/scope.js @ 216 / insertBefore(): http://mercury.nocookie.net/mercury-static/vendor/main-244f9429.js @ 1 / unknown fn: http://mercury.nocookie.net/mercury-static/vendor/main-244f9429.js @ 3

with --skip-modules domQueries:

15:42:17.617 Spying disabled - counting global variables (injecting an empty iframe)
15:42:17.637 JS error: TypeError: null is not an object (evaluating '(document._currentScript || document.currentScript).ownerDocument')
15:42:17.638 Event jserror emitted
15:42:17.638 TypeError: null is not an object (evaluating '(document._currentScript || document.currentScript).ownerDocument')

@rogatty

@macbre macbre added the bug label Oct 2, 2015
@macbre macbre added this to the v1.13 milestone Oct 2, 2015
@rogatty
Copy link

rogatty commented Oct 2, 2015

This site uses:

"polymer": "1.1.3",
"webcomponentsjs": "~0.7.12",

and has a following snippet of code in header:

<script>
    window.Polymer = window.Polymer || {};
    window.Polymer.dom = 'shadow';
</script>
<link rel="import" href="/front/vendor/wikia-style-guide/dist/components/import-built.html">

where the import comes from https://github.com/Wikia/style-guide/blob/dev/dist/components/import-built.html

Using --skip-modules=domQueries,globalVariables fixes the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants