Skip to content

6.0.0: Hangs for 30 seconds after it's done #406

@garyking

Description

@garyking

Bug description

Using v6.0.0 and above, use any API method, such as getting a single task. It gets the task in about 1 second, but then it hangs for 30 seconds or so, before completing. This didn't happen in 5.9.0.

I also have Jest tests (that use nock to mock requests to the Todoist API), and even with lockdown mode enabled in nock (to disable all live HTTP requests, and only use local fixtures), there's still a timeout of about 10 seconds, where nothing happens, forcing Jest to kill the tests early.

This bug was likely introduced in #377.

Expected behaviour

It should finish immediately.

Is reproducible

Yes, every time.

To reproduce

Use any API method, such as getting a single task.

Steps taken to try to reproduce

Code:

import { TodoistApi } from '@doist/todoist-api-typescript';

async function main(): Promise<void> {
  const api = new TodoistApi('xxx');

  const items = await api.getTasks();

  console.log(items);
}

main();

Version information:

  • Package version: 6.0.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions