Comments (17)
As it looks like geckodriver hasn't received the new session command. Could you maybe run a tool like Wireshark to record the network requests as made by curl? It seems like that this might indeed be a network issue.
Btw. does Hotspot shield actually allow exclude local addresses so that you can still connect to eg. your router interface? Maybe try with 127.0.0.1
instead?
from geckodriver.
Could you please attach a trace-level log from geckodriver? Read more about reporting actionable bugs in our contribution guidelines.
from geckodriver.
No reply from reporter in 2 weeks. Closing issue as incomplete.
from geckodriver.
Sorry to be late. Here is the sample code :
`
namespace ConsoleApp
{
using System;
using OpenQA.Selenium;
using OpenQA.Selenium.Chrome;
using OpenQA.Selenium.Firefox;
using OpenQA.Selenium.Internal.Logging;
using OpenQA.Selenium.Remote;
internal class Program
{
static void Main(string[] args)
{
string url = "https://www.google.fr";
try
{
Log.Handlers.Add(new FileLogHandler(Environment.ExpandEnvironmentVariables(@"%TEMP%\HotspotShield.log")));
Log.SetLevel(LogEventLevel.Trace);
Log.SetLevel(typeof(RemoteWebDriver), LogEventLevel.Trace);
Log.SetLevel(typeof(SeleniumManager), LogEventLevel.Trace);
var options = new FirefoxOptions();
options.SetPreference("webdriver.gecko.driver", @"D:\geckodriver.exe");
options.SetLoggingPreference(LogType.Browser, LogLevel.All);
options.SetLoggingPreference(LogType.Driver, LogLevel.All);
options.SetLoggingPreference(LogType.Performance, LogLevel.All);
Console.WriteLine($"Init Firefox driver.");
using IWebDriver driver = new FirefoxDriver(options);
Console.WriteLine($"Go to URL : {url}");
driver.Navigate().GoToUrl(new Uri(url));
driver.Navigate().Refresh();
}
catch (Exception ex)
{
Console.WriteLine($"ERROR : {ex}");
}
Console.WriteLine("Press any key to exit.");
Console.ReadKey();
}
}
}
`
And here are the log with the VPN opened (non working code) and closed (working code)
HotspotShield_error.log
HotspotShield_ok.log
.
from geckodriver.
I still don't see on which port geckodriver is running. Also please attach the trace level logs from geckodriver and not some logs from Selenium. Maybe use plain HTTP requests via curl
to check the connection to geckodriver.
from geckodriver.
:/ I need a bit more help to generate logs.
Is there a way to make a .BAT to run geckodriver (using param -vv for the logs ?) and open firefox to www.google.fr ? This way we are not using C# & Selenium.
Meanwhile I made another try. I ran the program with VPN opened. It was stuck on first line. Firefox not launched.
Then I close the VPN and immediatly I got the other lines.
from geckodriver.
There is always a way to create your own bat file. Just pass the right arguments to the Firefox binary.
For further investigation more logs from geckodriver would be great to have. Otherwise it's hard to figure out what's wrong.
PS: Maybe you could use a tool like Wireshark to also check if some network request is stalled waiting for a reponse that doesn't get send. But again it's hard to say.
from geckodriver.
Looks very hard to get logs :/
I tried this batch but it doesn't reproduce the problem :
start /B "" "geckodriver.exe" -vv %* >c:\Temp\gecko.log
timeout /t 5 /nobreak
"C:\Program Files\Mozilla Firefox\firefox.exe" "--marionnette" -no-remote -url "www.google.Fr"
echo Appuyez sur une touche pour fermer Geckodriver et quitter.
pause > nul
taskkill /f /im geckodriver.exe
Nobody seems to use a BAT to do this :(
from geckodriver.
Maybe use plain HTTP requests via
curl
to check the connection to geckodriver.
I would then suggest to use the above to check outside of VSCode as well. That should also give proper logs in case the problem is reproducible. Here the steps:
- Make sure to have
curl
installed - Start geckodriver with the
-vvv
argument in a command line - Run the command
curl -H 'Content-Type: application/json' -d '{"capabilities": {"alwaysMatch": {}}}' http://localhost:4444/session
Run step 3 with and without your VPN enabled. The log output I'm interested should be visible in the command line where geckodriver is running.
from geckodriver.
I tried your command and get errors :
curl: (6) Could not resolve host: application
curl: (3) unmatched brace in URL position 1:
{alwaysMatch:
^
from geckodriver.
Looks like you accidentally removed one or more quotes. Make sure that you run exactly what I added above. application
is part of a string that is passed as extra HTTP header.
from geckodriver.
Here is the code I copy / paste :
from geckodriver.
Maybe your shell doesn't understand single quotes? Please try other variations.
from geckodriver.
Closing as incomplete because of a missing reply from the reporter, but happy to reopen if more details are provided, which demonstrate that this is an issue with geckodriver or Firefox.
from geckodriver.
I was able to run the command. :)
Batch file :
start /B "" "geckodriver.exe" -vvv %* >c:\Temp\gecko.log
timeout /t 1 /nobreak
curl -H "Content-Type: application/json" --data-binary "@request.json" http://localhost:4444/session
JSON file :
{
"capabilities": {
"alwaysMatch": {
"browserName": "firefox",
"moz:firefoxOptions": {
"binary": "C:\\Program Files\\Mozilla Firefox\\firefox.exe",
"log": { "level": "trace" },
"args": ["https://www.google.fr"],
"prefs": {
"browser.startup.homepage": "https://www.google.fr"
}
}
}
}
}
I check all is working without the VPN :
gecko OK.log
Then I opened the VPN
gecko Error.log
I see 1 line. and in the console I have a message :
"curl: (55) Send failure: Connection was aborted"
from geckodriver.
You last suggestion was the good one.
Hotspot shield don't let access to LAN by default. I check the option and all is working now. Thanks for help :)
from geckodriver.
Fantastic! Good that we got it solved.
from geckodriver.
Related Issues (20)
- Failed to download geckodriver archive HOT 1
- Session cannot be started while doing "System.setProperty("webdriver.gecko.driver", "geckodriver.exe");" with geckodriver V: 0.34.0 HOT 1
- Geckodriver can't start Firefox 122 on Mac HOT 2
- Execute_(async_)script JS input not available in debugger/sources tab. HOT 4
- selenium.common.exceptions.WebDriverException: Message: Invalid Host header localhost:50047 exception with selenium and gecko HOT 10
- Exceptions When Switching Frames in Firefox 102.0 ESR with GeckoDriver v0.32 HOT 3
- Hi please help me I'm having trouble getting a Python script to work with Firefox and Selenium I ran the command with pytest and this comes out please help me I use VPS Linux Ubuntu to start this script HOT 2
- Invalid domain character when specifying port HOT 4
- Connection attempts to Marionette fail due to missing configuration file for Firefox (Linux lepotato 6.1.50-current-meson64) HOT 8
- SeleniumManager Exception managing firefox HOT 1
- please add some install directions to readme HOT 2
- Robot Framework with Firefox hangs on browser startup with specified alternate profile path given. HOT 2
- Hovering doesn't work when latent state is already "hover" HOT 7
- set permissions webdriver command doesn't work HOT 1
- Unable to launch Firefox with geckodriver 0.34.0 on Windows 11 HOT 2
- moz/addon/install not success
- moz/addon/install not success HOT 3
- selenium error: OpenQA.Selenium.WebDriverArgumentException: 'binary is not a Firefox executable' HOT 4
- Firefox is already running, but is not responding. The old Firefox process must be closed to open a new window. HOT 8
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 geckodriver.