browserstack / browserstack-local-csharp

CSharp bindings for BrowserStack Local
https://www.browserstack.com
MIT License
3 stars 12 forks source link

Problem when browserstack.exe gets updated #14

Open TraGicCode opened 7 years ago

TraGicCode commented 7 years ago

It looks like everytime this library downloads a new version of browerstack.exe from amazon and then tried to run it it fails to connect to browserstack when the file is downloaded. Below is the message that the browserstack.exe command line spits out when it fails

Failed to connect to browserstack

Here is the command line arguments this library is formulating to start the executable

"C:\Users\<Myuser>\.browserstack\BrowserStackLocal.exe"  -d start <mykey> -onlyAutomate -forcelocal -force -logFile C:\Users\<Myuser>\AppData\Local\JetBrains\Installations\ReSharperPlatformVs14_000\local.log -daemonInstance```
vedharish commented 7 years ago

@TraGicCode Can you share the contents of the local.log file? C:\Users\AppData\Local...\local.log ?

TraGicCode commented 7 years ago

@vedharish Hee is what the log shows

BrowserStackLocal v6.5


Setting the --only-automate parameter will stop local testing via command line from working with BrowserStack Live and BrowserStack Screenshots. To enable local testing via the command line for Live and Screenshots, rerun BrowserStackLocal without --only-automate.



Updating BrowserStackLocal...

Updated to 6.6

Updated Binary

Note: A new version of BrowserStackLocal v6.6, is available, but the auto-upgrade failed due to a slow connection.

Please download the latest version of BrowserStackLocal from https://www.browserstack.com/local-testing#command-line

Continuing with existing version v6.5

You can now access your local server(s) in our remote browser.

Press Ctrl-C to exit

TraGicCode commented 7 years ago

@vedharish I have more information regarding our issue

If no browserstacklocal executable exists it will download the latest from s3. This works everytime perfectly!

if there is already an existing browserstacklocal executable that is outdated. It will download the latest from s3 and then try and run it and connect and throw an exception containing the folllowing message "failed to connect to browserstacklocal".

There has to be other reports on this or am i the only customer using this :/

pulkitsharma07 commented 7 years ago

Hi @TraGicCode, There is a timeout of 100 seconds when the BrowserStackLocal binary updates itself. The update failed because of that. I do not think this is an issue with the C# bindings. When you remove the BrowserStackLocal binary from that location, the C# BrowserStackLocal bindings will download the latest version and place it there. Since there is no timeout to download the fresh binary, it is downloaded without any errors. Look like a network issue for me. Closing this for now.

pulkitsharma07 commented 7 years ago

Reopening the issue for now, @TraGicCode are you still facing this ?

TraGicCode commented 7 years ago

I will get back to you in the morning on this!

TraGicCode commented 7 years ago

Good Morning,

Yes we are still facing this issue. We have ended up resorting to a nasty hack, which is not ideal. Before each run we are deleting the BrowserStackLocal.exe in order to force a fresh download, which works everytime.

Our server is located in AWS if that helps at all on your end.

Do you have any recommendations?

pulkitsharma07 commented 7 years ago

Can you share the contents of the local log file again ? it will be helpful to us if you can provide the following information too:

gawicks commented 6 years ago

Having this problem with version 6.9 . In my experience this only happens when BrowserStackLocal is run as a daemon , and when it tries to update to 7 it prints out this error. But on on flip side the instance seems to update and run properly. So the error is spurious.

The only problem that I'm having with this is that my CI script seems to think that an error has occurred and exits prematurely.