-
Notifications
You must be signed in to change notification settings - Fork 11
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
Status update: Puppeteer "ERR_CONNECTION_REFUSED" #9
Comments
I think it's worth mentioning that over the past two days I've checked out every single branch of the cli just to verify if there's something up in my code and I'm almost certain there's not, since I remember these working okay a while back. Maybe this is rooted in https://github.com/GoogleChrome/puppeteer/releases/tag/v1.19.0 (23rd July)? |
Posted: puppeteer/puppeteer#4776 |
Status update: Came across some promising workarounds today, and have been trying to convert to node env directly. Will keep this thread updated. |
Still debugging, I'm basically refactoring the whole library for this "browser-env" to work and resolve all of the errors popping out of it. Exhausted. |
Also waiting for the folks at puppeteer to respond to this issue. No comments yet. 😕 |
Aww this looks very frustrating!! I'm sorry! Could it have anything to do with the chrome chromedriver problem were working on in plots2? With the bump to chrome 76 now that 74 is no longer supported? publiclab/plots2#6095 |
@jywarren Running Chrome instance with the modified options in the PR above, i.e., changing this, to this, Will keep this thread updated. |
|
Sorry, forgot to mention here. Have been working on a NON-puppeteer implementation of this, which might render most of Will continue to update here. |
The best thing being one library for both browser and node envionments, obviously. Just thought I'd point this out. Working. |
Focusing on:
These should be more that enough to allow me to send and recieve packets over a port. Let's see. |
@jywarren Axios, native fetch, or any HTTP/2 services won't be of any use since the results are being uploaded and fetched back from a localhost port on the user's machine! That's why I was getting the connection refused error! After a bit of thought on how to send and recieve data over the same port, it clicked me that socket programming was made for this! Below is a simple node implementation for the same that (if everything goes well 🤞 ) I'll modify heavily and incorporate into this library! |
Hi, should this really be in the For reference, see how Sockets are interesting, but what exactly are you trying to achieve here? The basic |
Is the issue the local loading of images in node? Perhaps |
@jywarren The recent commits were to update the main with PRs you had already reviewed, and solve a few merge conflicts here and there,, since a while back, you suggested to pass commits through PRs, and I've been following that ever since. I also did a sweep and removed all the unnecessary branches from this library. There have been no new pushes since, and if there were, I would definitely submit those through PRs.
The heart of this algorithm uses canvas.getdata (along with window, requestAnimationFrame, and other browser-specific apis) to operate on the image data in a 'browser' environment, therefore I had no problem integrating this with LDI (a browser app). But for node purposes I used puppeteer (in |
Just leaving this here: puppeteer/puppeteer#1401 (comment) |
Ah ok that makes sense, thanks! Yeah, actually that's one reason we didn't
base image-sequencer on canvas, although that would've been easiest! In
this case, I think the puppeteer or headless browser approach makes sense.
But it's probably worth looking at what parts of the system absolutely
require canvas sometime in the future. Not urgent at all but there may be
possibilities for pure js, non canvas ways to do this that'd make node
usage easier. Thanks for the clarification!
As to the PRs, just checking, as you'd mentioned refactoring here and I saw
a commit that seemed to reference refactoring in the past couple days. But
glad to hear it, and thanks for your working with this flow, I appreciate
it!
I hope the puppeteer approach or another similar one works out... headless
browsers seem to be a bit less stable than I'd hoped based on the PR in
plots2 I linked to, but they sure do allow for some impressive cross
environment possibilities.
Don't worry, Pranshu I'm sure you'll crack this issue!
…On Sat, Aug 3, 2019, 1:26 PM Pranshu Srivastava ***@***.***> wrote:
Just leaving this here: puppeteer/puppeteer#1401 (comment)
<puppeteer/puppeteer#1401 (comment)>
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#9?email_source=notifications&email_token=AAAF6JYBC4DJUVVWQ5ZRPCDQCVMK5A5CNFSM4IIADNYKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD3PL4XA#issuecomment-517914204>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAAF6J4ULNXVQEATZFWRS73QCVMK5ANCNFSM4IIADNYA>
.
|
@jywarren I'M SO CLOSE! It's as if I just can't avoid incorporating puppeteer into this lib, or maybe I can do the same with phantomJS? Anyway, as you can see below things are working pretty good, with the side effect that chrome has to launch atleast once on the user's machine to instantiate a browser instance to parse all the frontend apis. This is the last stage, if I can just get a headless browser to sent POST requests to my server's port without actually opening a chrome instance, that'd be just pure joy for me atm.
I've tried to eliminate this headless deployment not now but several times in the past as well, and what I've learnt through all of those unseccessful attempts is the fact that some frontend apis are just not meant to be parsed by node. From creating a so-called browser env inside node to spending days experimenting with the npm's "window" package for node to trying to implement individual features in node, I have tried almost everything, which takes me back to the headless implementation I did in the first place. Not so while back I used to make several PRs in the same day in LDI, but now I'm just spending several days on the same PR. |
matcher-cli
uses a puppeteer env to serve results through node. This error (in puppeteer) would mean that the cli will not be able to fetch results when used in a node environment (this also goes for all matcher integrations that "require" it instead of including the min files in the <script> tags. I've been trying to fix this and/or find a workaround to this issue for the past few days and nothing seems to resolve this issue, so I guess the best thing to do right now is open an issue there and see if we can fix this quickly.Will update here.
@jywarren To sum it all up, the library currently integrates and works fine when the minified version is included in the
head
. But due to the aforementioned puppeteer issue, I'm unable to deploy the core in a virtual env and thus, I'm unable to collect any results off of the virtual webpage. Linking to the corresponding issue @ puppeteer in a bit.The text was updated successfully, but these errors were encountered: