Skip to content

Cannot read property 'getAttribute' of undefined #8

@jdmremi

Description

@jdmremi

When running the following code with multiple different queries to get stream links of a given show:

const anime = require('@justalk/anime-api');
anime.stream('attack').then((g) => console.log(g));

The following error is thrown:

(node:50704) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'getAttribute' of undefined
    at Object.scrap_stream (C:\Users\User\Documents\Projects\Tests\node_modules\@justalk\anime-api\src\chia-anime\search.js:19:40)
    at Object.stream (C:\Users\User\Documents\Projects\Tests\node_modules\@justalk\anime-api\src\chia-anime\search.js:31:41)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
    at async Promise.all (index 1)
    at async Object.stream (C:\Users\User\Documents\Projects\Tests\node_modules\@justalk\anime-api\src\index.js:35:13)
(node:50704) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:50704) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

Node v12.18.1.

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