Comments (17)
I'll update the readme if you can confirm that it's working with an older version :)
from nickjs.
@wbelk possibly, it is similar to this?
Cannot connect to the target: connect ECONNREFUSED 127.0.0.1:9222
from nickjs.
Well...when I deploy to production environment I am getting the same error.
There are no google-chrome instances running and so I have no idea what to do next.
node: v8.12.0
npm: 6.4.1
google-chrome: 69.0.3497.100
from nickjs.
I figure this out, but, this is really weird for me.
Before, start taking about how I figure this out, nodejs and pm2 are installed globally.
The reason why I have pm2 is that I used to have nodejs based API with nickjs.
■Steps to figure this out.
① Execute my old nodejs based API with 1 process.
② Create HTTP request to API from 1.
Note: nickjs should be used by the API
③The process from ① should be kept all the time in order to run nickjs, otherwise, I get the same error.
I do not know why I have to keep running my old API.
Also, I tried restaill nodejs, pm2 and Google Chrome.
But, this dose not work.
Of course, when I get this error, chrome is not up and running.
If you have any idea, please let me know.
from nickjs.
If I understand correctly, your NickJS script, for some reason, cannot start the chrome subprocess in your environment. But in older Heroku environments, it does work like it should.
Can you please add debug: true
to your NickJS' constructor options? And report back with what it shows
In containerized/dockerized environments, starting chrome can be a pain. A simple google search shows many people having difficulties. For example chrome must be started with --no-sandbox
(which NickJS does), the container should have a big shm
size, etc... Maybe the newer Heroku has stricter container settings?
from nickjs.
I have the same error on Ubuntu 16.04, I tried node v8 and v11.6, chromium, chrome 70, 71,72,73(unstable).. I specified export CHROME_PATH="/usr/bin/google-chrome";
, also tried /opt/google/chrome/...
Edit: I solved it by starting chrome 71 like this: google-chrome --remote-debugging-port=9222 --no-first-run, --no-default-browser-check, and --user-data-dir
from nickjs.
@elhenro are you starting chrome by hand alongside NickJS?
from nickjs.
affirmative, the only way for me right now is to quit chrome completely and then start it with those options
from nickjs.
Can you please add debug: true
to your NickJS' constructor options? And report back with what it shows? (do not start chrome by hand, I just want to see what happens on NickJS' side when it fails)
from nickjs.
Sorry for late reply.
Currently, my app is running on production and I can not stop it right now.
So, when I have a chance for it, I will add debug: ture
to see what happen to Nickjs.
Regards.
from nickjs.
I'm having the same issue on windows ubuntu wsl here's the output of the debug
CHROME STDOUT: Starting ChromeDriver 74.0.3729.6 (255758eccf3d244491b8a1317aa76e1ce10d57e9-refs/branch-heads/3729@{#29}) on port 9515 Only local connections are allowed. Please protect ports used by ChromeDriver and related test frameworks to prevent access by malicious code. ERROR: could not connect to chrome debugger after 8 tries (10s): Error: connect ECONNREFUSED 127.0.0.1:9222
from nickjs.
@bbathel12
I guess you have to give the permission to Windows.
from nickjs.
@paps
Ubuntu 16.04.5 LTS
I got following errors.
CHROME STDERR: [0412/123550.772631:ERROR:gpu_process_transport_factory.cc(980)] Lost UI shared context.
CHROME STDERR:
DevTools listening on ws://127.0.0.1:9222/devtools/browser/935baa40-9193-42d8-8709-06b781803ec7
Something went wrong: could not connect to chrome debugger after 24 tries (10s): Error: connect ECONNREFUSED ::1:9222
from nickjs.
I am still getting the same error and so I have to do the follow the steps that I mentioned.
By the way, I am getting error on Ubuntu machine and I do not know what to do next.
If you can help me out, I will give you more details.
from nickjs.
It might be because it's a too recent version of Chrome. Can you try with Chrome 65? I know it's old but it might do the trick
from nickjs.
@paps when I have a chance for that, I will switch to chrome 65.
Can it downloaded from here?
https://launchpad.net/ubuntu/+archive/primary/+sourcefiles/chromium-browser/65.0.3325.181-0ubuntu0.16.04.1/chromium-browser_65.0.3325.181.orig.tar.xz
from nickjs.
Then, I guess you had better to write what chrome version supported, otherwise, people get stacked like me.
from nickjs.
Related Issues (20)
- Is it possible to change userAgent? HOT 1
- Running NickJs in node:9-alpine HOT 1
- Features that would be nice HOT 2
- calling nick.exit() closes chrome process and node process HOT 2
- Cannot open two node instances HOT 1
- Independent tabs with PhantomJS HOT 1
- I have a question for many requests HOT 3
- Acessing frame elements HOT 1
- Phantombuster api-store source removed? HOT 2
- Trying to save content with fs.writeFile HOT 2
- could not list chrome tabs: Error: connect ECONNREFUSED 127.0.0.1:9222 HOT 12
- Help request: Struggling to do what feels like fairly basic push 'show more' button and scroll HOT 3
- Setting environment variables on PHP / Ubuntu HOT 8
- Using jQuery instead of querySelector on Tab HOT 1
- Error: timeout: load event did not fire after xxx ms HOT 1
- I have a lot of same error[you may have forgotten to catch a Promise rejection] HOT 3
- Ability to set custom Chrome flags on NickJS constructor
- Drivers/browser
- site data
- Question about this project HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nickjs.