privatenumber / snap-tweet

Snap a screenshot of a tweet 📸
MIT License
333 stars 19 forks source link

Getting ECONNREFUSED at first try of running snap-tweet #20

Closed Zcehtro closed 2 years ago

Zcehtro commented 2 years ago

Bug description

What did you do? (Provide code in next section) I tried to take a screensnap of a tweet.

What did you expect to happen? For snap-tweet to take a snap of a tweet.

What happened instead? Got a ECONNREFUSED error message.

Do you have an error stack-trace? Don't know what this is, but I can get it if it can be explained to me ;)

Reproduction

  1. snap-tweet https://twitter.com/elonmusk/status/1492227328386154509
  2. How do I do this?
  3. :
C:\>snap-tweet https://twitter.com/elonmusk/status/1492227328386154509
[snap-tweet] Error: connect ECONNREFUSED ::1:53221
× connect ECONNREFUSED ::1:53221: https://twitter.com/elonmusk/status/1492227328386154509

Environment

privatenumber commented 2 years ago

I'm not too familiar with Windows environments but I'll try to help debug.

  1. Do you have Chrome installed? If so, what version?
  2. Based on searching the chrome-launcher and chrome-remote-interface repos, the immediate issues are related to Node v17. Can you see if using a different version helps?
Zcehtro commented 2 years ago

Awesome! Any help is always welcome!

  1. Yes. Version 98.0.4758.102 (Official Build) (64-bit)
  2. You hit it on the nail! The problem was with Node v17.5.0. I uninstalled it and installed Node v16.14.0 LTS and set up everything again.

Now it's working! Tyvm!

Now there's a minor thing I noticed that's working differently but I'll open another ticket for that and keep everything tidy.

Thx again!

jvlianodorneles commented 2 years ago

And how about to run snap-tweet in a headless environment (like a virtual machine)? Is there some way to do this?

My environment:

I'm getting:

[snap-tweet] Error: connect ECONNREFUSED 127.0.0.1:40353
✖ connect ECONNREFUSED 127.0.0.1:40353:
  https://twitter.com/telegram/status/1507356.......

I know that google-chrome have some flags to run headless: --headless --disable-gpu

yusufozcan commented 2 years ago

And how about to run snap-tweet in a headless environment (like a virtual machine)? Is there some way to do this?

My environment:

  • Debian Linux 5.2.9-2 VM
  • Node version 16.15.0
  • Google Chrome version 102.0.5005.61

I'm getting:

[snap-tweet] Error: connect ECONNREFUSED 127.0.0.1:40353
✖ connect ECONNREFUSED 127.0.0.1:40353:
  https://twitter.com/telegram/status/1507356.......

I know that google-chrome have some flags to run headless: --headless --disable-gpu

I have same problem. Did you find a solution for this?

hissatupassenger commented 2 years ago

I have same problem......