ferrum icon indicating copy to clipboard operation
ferrum copied to clipboard

Use Java ProcessBuilder for JRuby process launch

Open jemelyah opened this issue 2 years ago • 17 comments

References https://github.com/rubycdp/ferrum/issues/400.

For the JRuby implementations, use Java ProcessBuilder to redirect Chrome process output to a specific file instead of stdout.

jemelyah avatar Sep 13 '23 11:09 jemelyah

For JRuby implementation we need to add it to matrix, I wouldn't merge just one bit of the process I believe it's much harder than this. Can you add it to matrix?

route avatar Sep 14 '23 12:09 route

@route

Can you add it to matrix?

Sorry, I missed the reference. Do you mean their communications channel on Matrix?

jemelyah avatar Sep 18 '23 07:09 jemelyah

Oh I meant to https://github.com/rubycdp/ferrum/blob/main/.github/workflows/tests.yml Let's see how it's failing on CI

route avatar Sep 18 '23 11:09 route

Oh I meant to https://github.com/rubycdp/ferrum/blob/main/.github/workflows/tests.yml Let's see how it's failing on CI

@route I have added jruby to the tests.yml, but it seems it needs approval to run.

jemelyah avatar Sep 26 '23 13:09 jemelyah

Looks like at some point connection to browser crashes and then after that all tests failing

route avatar Sep 27 '23 12:09 route

@jemelyah could you please rebase against latest main branch?

route avatar Nov 09 '23 06:11 route

@route just pushed the merged changes

jemelyah avatar Nov 16 '23 08:11 jemelyah

@route would you mind taking a look at the current PR, if it is ok, then I'll try to handle the original issue described here: Issue 402

jemelyah avatar Jan 02 '24 09:01 jemelyah

On it

route avatar Jan 15 '24 18:01 route

@route I've updated the code to reflect latest changes in Process class; however, my local tests are still failing, so I'll need to figure out how to handle the problems.

jemelyah avatar Jan 16 '24 14:01 jemelyah

Added JRuby to the matrix once again, lost it somewhere.

jemelyah avatar Jan 16 '24 14:01 jemelyah

@route I was finally able to get the tests going locally, by redirecting the process output to the buffered reader instead of a file. Is it possible to run the test suite once again on the matrix?

jemelyah avatar Jan 30 '24 15:01 jemelyah

@jemelyah how long does it take to tests to pass locally?

route avatar Mar 03 '24 10:03 route

I cannot test it on windows but I cannot even install gems on jruby 9.4.5.0 (3.1.4) 2023-11-02 1abae2700f Java HotSpot(TM) 64-Bit Server VM 19.0.1+10-21 on 19.0.1+10-21 +jit [arm64-darwin] on my mac. It's failing.

route avatar Mar 03 '24 10:03 route

@route, sorry for the delay; we are solving some issues with our solution to this; I hope to update this PR when we are done.

jemelyah avatar Jun 04 '24 07:06 jemelyah

@route, unfortunately, it fails and hangs with Exception handling servers: #<IOError: closed stream> in the test environment for jruby-9.4. Locally, the tests pass, so I'll try to replicate and investigate the closed stream issue.

jemelyah avatar Jun 14 '24 15:06 jemelyah

This looks very familiar to me, as I faced it long ago https://github.com/rubycdp/ferrum/issues/15 It works much slower in github actions.

route avatar Jun 15 '24 08:06 route