Skip to content

Remote error: TypeError: Cannot read property '_ownerDocument' of undefined #8

Open

Description

@gaara87

I have two nested scraping calls, and this is thrown on the second one. Unfortunately, this seems to be happening only recently.

Would be great if you can find out whats happening.

To start of with, i can tell you the execution does not cross line 59:scraper.js because $(body) throws the error that i've pasted as the title. (Again, this happens only in the second nested call, not in the first one)

Activity

  1. kaikuehne commented on Aug 17, 2011

    @kaikuehne

    Hi, I encountered a similar issue. I don't get an error message, but the second scraping call only gets executed once and somehow too late. I'm new to both javascript and node.js and I don't understand this behaviour.

    Example:

    scraper(url, function (e, $) {
        // find links
        $('x').each(function (i, el) {
            scraper(detail, function (e, $) {
                // this gets only called once
                // after the each iteration completed
                // instead, I wanted it to be called
                // for every link
            });
        });
    });

    Why is that? Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions