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

ERR_INTERNAL_ASSERTION #50895

Closed
slendertaker opened this issue Nov 24, 2023 · 3 comments
Closed

ERR_INTERNAL_ASSERTION #50895

slendertaker opened this issue Nov 24, 2023 · 3 comments
Labels
duplicate Issues and PRs that are duplicates of other issues or PRs. net Issues and PRs related to the net subsystem.

Comments

@slendertaker
Copy link

Version

v20.9.0

Platform

Windows

Subsystem

No response

What steps will reproduce the bug?

const Imap = require('imap');

async function checkEmail(index, logColor, email, emailPass) {
let emailStatus;
let emailStatusCount;

console.log(logColor(`[${index}]`, 'Checking email'));

do {
    try {
        let imapConfig = {
            user: email,
            password: emailPass,
            host: 'imap.outlook.com',
            port: 993,
            tls: true,
        };

        const imap = new Imap(imapConfig);

        function openInbox(cb) {
            imap.openBox('INBOX', true, cb);
        }

        imap.connect();

        await new Promise((resolve, reject) => {
            imap.once('ready', () => {
                openInbox((err) => {
                    if (err) {
                        emailStatus = 'Blocked';
                        // console.error(logColor(`[${index}]`, 'Failed login IMAP!'));
                        imap.end();
                        resolve();
                    } else {
                        emailStatus = 'Successful';
                        console.log(logColor(`[${index}]`, 'Success login IMAP!'));
                        imap.end();
                        resolve();
                    }
                });
            });

            imap.once('error', (err) => {
                emailStatus = 'Error';
                // console.error(logColor(`[${index}]`, 'Login email failed, retrying'));
                imap.end();
                reject(err);
            });
        });
    } catch (error) {
        // console.error(logColor(`[${index}]`, 'Error processing account for:', error));
        emailStatus = 'Error';
    }

    emailStatusCount++;
} while(emailStatus !== 'Successful' && emailStatusCount <= 10)

return emailStatus;

}

module.exports = { checkEmail };

How often does it reproduce? Is there a required condition?

around 5/100

What is the expected behavior? Why is that the expected behavior?

Login to imap

What do you see instead?

Error [ERR_INTERNAL_ASSERTION]: This is caused by either a bug in Node.js or incorrect usage of Node.js internals.
Please open an issue with this stack trace at https://github.com/nodejs/node/issues

at new NodeError (node:internal/errors:406:5)
at assert (node:internal/assert:14:11)
at internalConnectMultiple (node:net:1118:3)
at Timeout.internalConnectMultipleTimeout (node:net:1687:3)
at listOnTimeout (node:internal/timers:575:11)
at process.processTimers (node:internal/timers:514:7) {

code: 'ERR_INTERNAL_ASSERTION'
} uncaughtException

Additional information

Error [ERR_INTERNAL_ASSERTION]: This is caused by either a bug in Node.js or incorrect usage of Node.js internals.
Please open an issue with this stack trace at https://github.com/nodejs/node/issues

at new NodeError (node:internal/errors:406:5)
at assert (node:internal/assert:14:11)
at internalConnectMultiple (node:net:1118:3)
at Timeout.internalConnectMultipleTimeout (node:net:1687:3)
at listOnTimeout (node:internal/timers:575:11)
at process.processTimers (node:internal/timers:514:7) {

code: 'ERR_INTERNAL_ASSERTION'
} uncaughtException

@lpinca lpinca added the net Issues and PRs related to the net subsystem. label Nov 24, 2023
@lpinca
Copy link
Member

lpinca commented Nov 24, 2023

Related to #44731, duplicate of #50893.

@tniessen tniessen added the duplicate Issues and PRs that are duplicates of other issues or PRs. label Dec 2, 2023
@tniessen
Copy link
Member

tniessen commented Dec 2, 2023

Duplicate of #48763, which is due to #44731. cc @ShogunPanda

@tniessen tniessen closed this as not planned Won't fix, can't repro, duplicate, stale Dec 2, 2023
@ShogunPanda
Copy link
Contributor

This should have been fixed in #51045. Once it gets in 21.x or 20.x please let me know if you have additional problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate Issues and PRs that are duplicates of other issues or PRs. net Issues and PRs related to the net subsystem.
Projects
None yet
Development

No branches or pull requests

4 participants