Open HesterLyons opened 5 years ago
Additional info: It appears the error is occurring due to an issue with my browserstack local (although it says it is enabled, I can't visit local pages manually either). For this I have submitted a support request. However, the error is confusing. It should report back that the local test environment is disconnected, which it doesn't do. I attach a screenshot showing the fact it's disconnected.
State of connection:
I am seeing the same issue when I ran the example Class as well separately just as a Java class: Exception in thread "main" org.json.JSONException: JSONObject["message"] is not a JSONObject. at org.json.JSONObject.getJSONObject(JSONObject.java:640) at com.browserstack.local.Local.start(Local.java:80) at BrowserStackLocalExample.main(BrowserStackLocalExample.java:36)
For the following lines: l = new Local(); HashMap<String, String> options = new HashMap<String, String>(); options.put("key", access_key); l.start(options); //Above mentioned error is thrown at this line
I have tried with the following browserstack local versions: 1.0.3,1.0.2, 1.0.1, 1.0.0 My Browserstack access credentials are correct and non-local tests ran without any connectivity issues.
1) Maven - 3.3.9 2) Browsertack local dependency added in POM:
When I tried with Browserstack Local version 0.3.0, then the following error message is thrown: Exception in thread "main" com.browserstack.local.LocalException: Disconnected at com.browserstack.local.Local.start(Local.java:78)
After careful debugging, I found there is some issue at these lines inside the Local.class:
protected LocalProcess runCommand(List
Maybe the right list of commands is not passed to the processbuilder.
After some more analysis, I found the following method in Local.class file to run the command , even when we ran it manually from command line it throws the same error:
private void makeCommand(Map<String, String> options, String opCode) {
command = new ArrayList
In the above method if we remove the two lines and run then I think the local test might get enabled (though not sure what else might break)
manually running this command from source directory:
Just by running- BrowserStackLocal.exe -- key yourAccessKeyValue
The local connection is established without issues.
I am seeing the same issue. Any updates on this?
@artemklimenkov-qa could you confirm if you are encountering the same error with browserstack local v8.0
I get the same error even with the latest release v8.0.1. I am starting Browserstack Local in a linux container running in OpenShift. This issue appears since 25. May. before we had no problems.
here is the error :
| at org.json.JSONTokener.syntaxError(JSONTokener.java:433) ~[json-20160212.jar!/:na]
| at org.json.JSONObject.
What about this issue: https://github.com/browserstack/browserstack-local-java/issues/29
It seems to be related!
Expected Behavior
Given that I have a correct access key When I start browerstack local Then the browserstack local object should start successfully
Actual Behavior
At
l.start(options)
(line 33 in BrowserStackLocalTest.java) an error is thrown:org.json.JSONException: JSONObject["message"] is not a JSONObject.
This behaviour is repeated across the project and also in different projects in which the library is used.
Steps to Reproduce the Problem
mvn test
or run from within the IDE.browserstack local arguments
I have run the repository out of the box and changed no settings. I know that my Browserstack access credentials are correct and non-local tests run OK.
Platform details
Details
the command Local.start() does not appear to function correctly and throws an error when invoked. The function new Local(); works OK and returns an object. The hashmap contains the correct elements.