facebook/php-webdriver exception Failed to read marionette port (Firefox 109.0.1 - GeckoDriver 0.32 Debian-10) - firefox

I am trying to use php-webdriver with Laravel 8 on an AWS LigthSail instance that comes with Debian 10 installed.
I am using Firefox(109.0.1) and Geckodriver(0.32). The code that needs to run will represent a Job that will be scheduled to run daily, for scraping certain information from a public site.
For testing purposes I have put the code in a controller that runs based on a certain route.
$desiredCapabilities = DesiredCapabilities::firefox();
$desiredCapabilities->setCapability('acceptSslCerts', false);
$firefoxOptions = new FirefoxOptions();
$firefoxOptions->addArguments(['-headless']);
$firefoxOptions->setOption("binary", "/usr/bin/firefox");
$desiredCapabilities->setCapability(FirefoxOptions::CAPABILITY, $firefoxOptions);
$serverUrl = 'http://localhost:4444';
//$driver = RemoteWebDriver::create($serverUrl, $desiredCapabilities);
$driver = Firefox\FirefoxDriver::start($desiredCapabilities);
$driver->get('https://example.com');
Once the information is collected the code will send them by e-mail to a certain e-mail address. I think the code is fine, as one my local development environment it does to job it suppose to do. However when I placed it on the server it fails at this line $driver = Firefox\FirefoxDriver::start($desiredCapabilities); raising the following exception: Facebook\WebDriver\Exception\TimeoutException: Failed to read marionette port
The funny thing is if am starting the firefox and geckodriver manually on the server, and use $driver = RemoteWebDriver::create($serverUrl, $desiredCapabilities); it works just fine. But this means that firefox and geckodriver needs to run permanently even if i close my ssh session. I have made firefox to run permanently (with bg and disown commands), but geckodriver stop running when I shut the terminal.
Anyway, I wish WebDriver to be able to start the geckodriver and firefox, and not to keep them alive permanently. I have tried to install firefox either with apt install or from mozilla official repository or downloading and extracting the FirefoxSetup.tar.bz but the error is still present.
It seems that somehow Geckodriver does not know on which port Marionette is running. What I do not understand is why when I manually start firefox and gecko there is no problem, but when webdriver start them suddenly geckodriver cannot connect to marionette?
Seems that the problem maybe related with this bug https://bugzilla.mozilla.org/show_bug.cgi?id=1421766. But according with that thread the bug was fixed 1 year ago by making geckodriver to read Marionette port from MarionetteActivePort file within the Firefox profile directory.
However in .mozilla/firefox directory there is no such MarionetteActivePort file. There are some directory related to a certain profile (default one which is full of files and directories) and one that has only one file, respectively times.json. I do not know how exactly to pass such profiles to the webdriver and nor if this will solve the problem.
Can anyone shed some light on how am I suppose to tell GeckoDriver on which port Marionette is running?

Related

How to stop supabase which is running on localhost 3000?

I wanted to know what supabase is so I installed it using this local development guide enter link description here
it was few weeks back, i was simply checking port 3000 and supabase is running i have removed all supabase related folder but still its running. can someone help me understand why its still running and how to stop it.
To stop running supabase, you can use the CLI stop command:
supabase stop
Deleting folders without stopping will keep the current instance running.
You can always use htop (linux) and of follow this guide (macOS) to stop the process.
Hi guys i found the solution. it was cache in the browser which was loading. I deleted history, cache and cookies. now if i open my browser and go to localhost:3000 i can see 'This site can’t be reached' message.
thanks #Mansueli and #ahmad

Im getting reset on every http/s session after removing windivert64.sys and reboot

I installed netspark on my computer and tried to remove it by removing every file and registery belongs to the program and windivert64.sys
Now Im getting reset for every http/s session, what can I do?
How can I find the driver that sends the reset?
I have win10
After I tried to manually search the services list in services.msc I found nothing.
I tried to look for SysInternalSuite programs and found autoruns.
This tool shows every driver loaded on boot.
the list of the driver was very short and I easily found the driver by the publisher description.

Can't kill YARN apps using ResourceManager UI after HDP 3.1.0.0-78 upgrade

I recently upgraded HDP from 2.6.5 to 3.1.0, which runs YARN 3.1.0, and I can no longer kill applications from the YARN ResourceManager UI, using either the old (:8088/cluster/apps) or new (:8088/ui2/index.html#/yarn-apps/apps) version. I can still kill them using the shell in RHEL 7 with yarn app -kill {app-id}
These applications are submitted via Livy. Here is my workflow:
Open the ResourceManagerUI, open the Application, click Settings and choose Kill Application. Notice, the 'Logged in as:' is set to UNKNOWN_USER:
Confirm that I want to kill the Application:
I get the following error in the UI:
Opening the console in Chrome, I see a 401 (Unauthorized) error.
If I try this from the old UI I am able to expand the error message and it shows the following:
{"RemoteException":{"exception":"AuthorizationException","message":"Unable to obtain user name, user not authenticated","javaClassName":"org.apache.hadoop.security.authorize.AuthorizationException"}}
I've read lots of posts, verified and changed several settings to try to fix this with no luck. Here are some of the settings I checked or changed as a result of my research:
hadoop.http.filter.initializers=org.apache.hadoop.security.HttpCrossOriginFilterInitializer,org.apache.hadoop.http.lib.StaticUserWebFilter
hbase.security.authentication=simple
hbase.security.authorization=false
yarn.nodemanager.webapp.cross-origin.enabled=true
yarn.resourcemanager.webapp.cross-origin.enabled=true
yarn.resourcemanager.webapp.delegation-token-auth-filter.enabled=false
yarn.resourcemanager.webapp.ui-actions.enabled=true
yarn.timeline-service.http-authentication.simple.anonymous.allowed=true
yarn.timeline-service.http-authentication.type=simple
yarn.webapp.api-service.enable=true
yarn.webapp.ui2.enable=true
ranger.add-yarn-authorization=false
Some of these seem way off base to me, like the hbase stuff, since I don't think that has anything to do with what I'm seeing. However, some users, in other situations, had it work for them so I wanted to try it.
Digging through the documentation it seems like you need to be authenticated before you can call the API. However, that same language was in the documentation for 2.6.5, which is the version of YARN I was running before where this worked.
Hopefully someone can point me to documentation that more clearly outlines what I can do to resolve the issue.
Thanks in advance.
Hey I know this isn't solution (I'm experiencing the same issue post-upgrade), but I found adding "?user.name=" at the end of the url to the old resource manager url will log you in as that user on both pages. I've found the old RM page as the only way to kill jobs though.

Unable to use activator on my Mac - get a timeout exception when I try and make an app from template

So I'm following this tutorial:
https://www.playframework.com/documentation/2.3.x/Installing
It all seems installed - i.e. all the commands work but when I try and call:
activator new my-first-app play-scala
I get the following:
Fetching the latest list of templates...
Could not fetch the updated list of templates. Using the local cache.
Check your proxy settings or increase the timeout. For more details see:
http://typesafe.com/activator/docs
OK, application "another-app" is being created using the "play-scala" template.
akka.pattern.AskTimeoutException: Ask timed out on [Actor[akka://default/user/template-cache#1575831997]] after [10000 ms]
at akka.pattern.PromiseActorRef$$anonfun$1.apply$mcV$sp(AskSupport.scala:333)
at akka.actor.Scheduler$$anon$7.run(Scheduler.scala:117)
at scala.concurrent.Future$InternalCallbackExecutor$.unbatchedExecute(Future.scala:599)
at scala.concurrent.BatchingExecutor$class.execute(BatchingExecutor.scala:109)
at scala.concurrent.Future$InternalCallbackExecutor$.execute(Future.scala:597)
at akka.actor.LightArrayRevolverScheduler$TaskHolder.executeTask(Scheduler.scala:467)
at akka.actor.LightArrayRevolverScheduler$$anon$8.executeBucket$1(Scheduler.scala:419)
at akka.actor.LightArrayRevolverScheduler$$anon$8.nextTick(Scheduler.scala:423)
at akka.actor.LightArrayRevolverScheduler$$anon$8.run(Scheduler.scala:375)
at java.lang.Thread.run(Thread.java:744)
And nothing happens.
I just installed it on a PC in my house under the same network so I don't think my connection is the issue. I'm not using a proxy either..
Got any ideas? I've been trying to get this working for over a day now.
I'm on OSX Yosemite by the way.
I sometimes have timeouts too, especially while working in the university on some sloppy WLAN.
There are two types of activator, the usual light-weight one and the offline version. In the second, all repositories are present so the activator does not need to gather anything from the internet.
When you go to https://www.playframework.com/download ... look for the offline distribution (around 400MB) and install it like the normal activator.
If this solves your problem, there was something wrong with the activator trying to get something from a repository (you said that you can run the project but get server timeouts).
[EDIT]: You can also set the timeout to 30 seconds and see if this helps
activator -Dactivator.timeout=30s new "project name"

Local host not displaying file correctly then page crashes, then works (Pictures)

I am running my jeykll website on my local host. This is my terminal
jekyll --server $4000 --auto
Although the some reason when i type localhost:4000 into my browser it doesnt work, i have to go to 337. Does anyone know why?
Anyway when i first load it up it displays as it should.
http://cl.ly/image/390e033s160I
Then i refresh the page
http://cl.ly/image/11470G2z1s15
Another refresh brings this
http://cl.ly/image/3G2m0O3w1Y3x
And it will carry on in a circle everytime.
The website can be found here:
joshhornby.co.uk
Ok a quick look in the chrome dev tools told me this: Failed to load resource http://localhost:337/stylesheets/style.css
But why? It loads some of the time? Very confused.
The immediate solution is that the command line should be
jekyll --server 4000 --auto
4000 is not an environment variable, so no $ is needed.
I usually put the port in the _config.yml - likely that is where the 337 comes from. The other problems could be permissions related - using a port number under 1000 means needing admin access, which can cause problems when regenerating files.

Resources