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

Jest warns of potential open handles #1298

Closed
arboleya opened this issue Sep 27, 2023 · 3 comments · Fixed by #1333
Closed

Jest warns of potential open handles #1298

arboleya opened this issue Sep 27, 2023 · 3 comments · Fixed by #1333
Assignees
Labels
bug Issue is a bug

Comments

@arboleya
Copy link
Member

According to suspicions, it was likely introduced by this PR:


error

@arboleya arboleya added bug Issue is a bug tests labels Sep 27, 2023
@arboleya arboleya changed the title Jest can't exist due to potential open handles Jest can't exit due to potential open handles Sep 27, 2023
@Dhaiwat10
Copy link
Member

Dhaiwat10 commented Sep 29, 2023

Been seeing this warning with this failing test consistently on my branch for #1303

 FAIL  packages/providers/test/provider.test.ts (6.772 s)
  ● Provider › throws TimeoutError on timeout when calling an operation

    expect(received).toMatchObject(expected)

    - Expected  - 5
    + Received  + 1

    - Object {
    -   "code": 23,
    -   "message": "The operation was aborted due to timeout",
    -   "name": "TimeoutError",
    - }
    + [Error: Failed to parse "TransactionId": Invalid character 'w' at position 0: {"response":{"data":null,"errors":[{"message":"Failed to parse \"TransactionId\": Invalid character 'w' at position 0","locations":[{"line":2,"column":19}],"path":["transaction"]}],"status":200,"headers":{}},"request":{"query":"query getTransaction($transactionId: TransactionId!) {\n  transaction(id: $transactionId) {\n    ...transactionFragment\n  }\n}\n\nfragment transactionFragment on Transaction {\n  id\n  rawPayload\n  gasPrice\n  receipts {\n    ...receiptFragment\n  }\n  status {\n    ...transactionStatusFragment\n  }\n}\n\nfragment receiptFragment on Receipt {\n  contract {\n    id\n    bytecode\n    salt\n  }\n  pc\n  is\n  to {\n    id\n    bytecode\n    salt\n  }\n  toAddress\n  amount\n  assetId\n  gas\n  param1\n  param2\n  val\n  ptr\n  digest\n  reason\n  ra\n  rb\n  rc\n  rd\n  len\n  receiptType\n  result\n  gasUsed\n  data\n  sender\n  recipient\n  nonce\n  contractId\n  subId\n}\n\nfragment transactionStatusFragment on TransactionStatus {\n  type: __typename\n  ... on SubmittedStatus {\n    time\n  }\n  ... on SuccessStatus {\n    block {\n      id\n    }\n    time\n    programState {\n      returnType\n      data\n    }\n  }\n  ... on FailureStatus {\n    block {\n      id\n    }\n    time\n    reason\n  }\n}","variables":{"transactionId":"will fail due to timeout"}}}]

      686 |     });
      687 |
    > 688 |     expect(error).toMatchObject({
          |                   ^
      689 |       code: 23,
      690 |       name: 'TimeoutError',
      691 |       message: 'The operation was aborted due to timeout',

Maybe working on #1293 might fix this? Just wildly guessing here.

@arboleya
Copy link
Member Author

@Dhaiwat10 also having this.

@nedsalk
Copy link
Contributor

nedsalk commented Sep 29, 2023

@Dhaiwat10 @arboleya
Can you run nvm use and also check if pnpm node --version is 18.18.0? I had this error as well after checking out #1303, but after sorting out the used node versions and rebuilding, it passed. Also keep in mind that multiple CI pipelines passed with this test active, which strengthens the case that this might just be a local configuration thing.

@nedsalk nedsalk self-assigned this Sep 30, 2023
@nedsalk nedsalk changed the title Jest can't exit due to potential open handles Jest warns of potential open handles Sep 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue is a bug
Projects
None yet
3 participants