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

read ECONNRESET #13

Closed
brodev3 opened this issue Nov 3, 2023 · 9 comments
Closed

read ECONNRESET #13

brodev3 opened this issue Nov 3, 2023 · 9 comments

Comments

@brodev3
Copy link

brodev3 commented Nov 3, 2023

image
An error occurs when working with a proxy, previously everything worked fine, literally, 2 days ago problems with the connection started, I tried the proxy on a naked playwright, everything works fine

@bablosoft
Copy link
Collaborator

Please attach minimal source code.

@CheshireCaat
Copy link
Owner

@bro-web3-dev can you attach a minimal reproducable example (without fingerprint key).

@brodev3
Copy link
Author

brodev3 commented Nov 3, 2023

plugin.useProfile(`profilesStorage/${worker.name}`, {
  loadProxy: false, //  if set to true the error also occurs
});
if (profile.fingerprint) {
  plugin.useFingerprint(JSON.stringify(profile.fingerprint));
}

if (profile.proxy) {
  plugin.useProxy(
    `https://${profile.proxy.login}:${profile.proxy.pass}:${profile.proxy.ip}:${profile.proxy.port}`,
    {
      changeTimezone: true,
      changeGeolocation: true,
    },
  );
}

let browser = await plugin.launchPersistentContext(
  `profilesStorage/${worker.name}`,
  {
    headless: false,
    // args: [`--proxy-server=${profile.proxy.ip}:${profile.proxy.port}`],
    // proxy:{
    //   server: `http://${profile.proxy.ip}:${profile.proxy.port}`,
    //   username: `${profile.proxy.login}`,
    //   password: `${profile.proxy.pass}`
    // }
  },
);

this code does not work correctly, I open 50 profiles, an error occurs when opening, I changed the proxy, the same thing

@brodev3
Copy link
Author

brodev3 commented Nov 3, 2023

you answer very quickly! thank you for your attention

@CheshireCaat
Copy link
Owner

It seems to me that the problem may be with your proxy server or proxy provider - I tested your code with a fresh IPv4 proxy and was unable to reproduce the issue.

It means there is clearly no error on the plugins side - try testing with a different proxy or on a different machine if possible.

@brodev3
Copy link
Author

brodev3 commented Nov 3, 2023

It seems to me that the problem may be with your proxy server or proxy provider - I tested your code with a fresh IPv4 proxy and was unable to reproduce the issue.

It means there is clearly no error on the plugins side - try testing with a different proxy or on a different machine if possible.

the error occurs spontaneously, sometimes it works, but sometimes it crashes, is there any way to determine what the problem is more specifically? I used proxies from 3 different providers and the same thing, but at the same time everything worked for me for the whole day 3 days ago, the last 2 days I have been having these errors, I used a proxy in playwright, without your plugin, I was able to open 50 profiles, with the plugin I can’t I can do this, an error occurs on some profile and the program crashes

@brodev3
Copy link
Author

brodev3 commented Nov 4, 2023

It seems to me that the problem may be with your proxy server or proxy provider - I tested your code with a fresh IPv4 proxy and was unable to reproduce the issue.

It means there is clearly no error on the plugins side - try testing with a different proxy or on a different machine if possible.

I changed the machine, changed the proxy provider, changed the internet provider, same problem

@CheshireCaat
Copy link
Owner

CheshireCaat commented Nov 4, 2023

Based on the error you indicated, I simply cannot understand the place where it occurs. At the moment, I can advise you to handle errors additionally in this way:

process.on('uncaughtException', (err) => {
  console.error(err);
});

This is not a very good option, but in theory it can help avoid the application crashing. Please try to find out where the error occurs within the plugin, as I cannot reproduce it myself. If you can find it, let me know, I’ll also do some checks a little later. Also please attach the version of NodeJS you are using.

@brodev3
Copy link
Author

brodev3 commented Nov 4, 2023

image

v19.3.0
Thank you again for your prompt response, your advice helped to avoid the program crashing

@CheshireCaat CheshireCaat pinned this issue May 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants