levz0r / gmail-tester

A simple Node.js Gmail client which checks the inbox for message existence
MIT License
256 stars 68 forks source link

check_inbox - Cannot destructure property 'HTTP2_HEADER_CONTENT_ENCODING' of 'http2.constants' as it is undefined. e #129

Closed chaozek closed 1 year ago

chaozek commented 1 year ago

Hello, Iam getting following error:

image

> Cannot destructure property 'HTTP2_HEADER_CONTENT_ENCODING' of 'http2.constants' as it is undefined.

`  23 | const process = require("process");
  24 | const common_1 = require("gaxios/build/src/common");
> 25 | const { HTTP2_HEADER_CONTENT_ENCODING, HTTP2_HEADER_CONTENT_TYPE, HTTP2_HEADER_METHOD, HTTP2_HEADER_PATH, HTTP2_HEADER_STATUS, } = http2.constants;
     |        ^
  26 | const DEBUG = !!process.env.HTTP2_DEBUG;
  27 | /**
  28 |  * List of sessions current in use.

code:

 it.only('07_A_FORMS- Verify if form "SIGN IN NEWSLETTER" is redirected on correct page', () => {
    cy.task("gmail:check", {
      from: "no-reply@domain.com",
      to: "FA",
      subject: "Confirm your account",
    }).then((email) => {
      assert.isNotNull(email, `Email was not found`);
    });
  });

I've tried latest 1.3.8 & previous 1.3.5. No success.

Also node_modules reinstall didn't do anything.

If iIam running get_messages() api, everything's good. Any ideas? Running on node 19.4.0 (Currently using 64-bit executable) Thank you!

chaozek commented 1 year ago

SOLVED: Problem was I've never visited my site so you have to cy.visit("/some-url") first

levz0r commented 1 year ago

Glad you solved it :)