Skip to content
This repository has been archived by the owner on Nov 29, 2018. It is now read-only.

Unable to load nodeConfig files that worked in 2.43.1 in 2.44 #8125

Closed
lukeis opened this issue Mar 4, 2016 · 3 comments
Closed

Unable to load nodeConfig files that worked in 2.43.1 in 2.44 #8125

lukeis opened this issue Mar 4, 2016 · 3 comments

Comments

@lukeis
Copy link
Member

lukeis commented Mar 4, 2016

Originally reported on Google Code with ID 8125

Trying to load a nodeConfig file that works fine in selenium 2.43.1, but does not work
in 2.44.0. The nodeConfig is attached.

This is the exception received when trying to load the file:
 org.openqa.grid.common.exception.GridConfigurationException: Error with the JSON of
the config : Wrong format for the JSON input : com.google.gson.stream.MalformedJsonException:
Expected name at line 1 column 729 path $.configuration.hubHost
         at org.openqa.grid.common.RegistrationRequest.loadFromJSON(RegistrationRequest.java:575)
         at org.openqa.grid.common.RegistrationRequest.build(RegistrationRequest.java:385)
         at org.openqa.grid.selenium.GridLauncher.main(GridLauncher.java:113)
Caused by: org.openqa.grid.common.exception.GridConfigurationException: Wrong format
for the JSON input : com.google.gson.stream.MalformedJsonException: Expected name at
line 1 column 729 path $.configuration.hubHost
         at org.openqa.grid.common.JSONConfigurationUtils.loadJSON(JSONConfigurationUtils.java:81)
         at org.openqa.grid.common.RegistrationRequest.loadFromJSON(RegistrationRequest.java:551)
         ... 2 more
Caused by: com.google.gson.JsonSyntaxException: com.google.gson.stream.MalformedJsonException:
Expected name at line 1 column 729 path $.configuration.hubHost
         at com.google.gson.internal.Streams.parse(Streams.java:56)
         at com.google.gson.JsonParser.parse(JsonParser.java:84)
         at com.google.gson.JsonParser.parse(JsonParser.java:59)
         at com.google.gson.JsonParser.parse(JsonParser.java:45)
         at org.openqa.grid.common.JSONConfigurationUtils.loadJSON(JSONConfigurationUtils.java:79)
         ... 3 more
Caused by: com.google.gson.stream.MalformedJsonException: Expected name at line 1 column
729 path $.configuration.hubHost
         at com.google.gson.stream.JsonReader.syntaxError(JsonReader.java:1572)
         at com.google.gson.stream.JsonReader.doPeek(JsonReader.java:507)
         at com.google.gson.stream.JsonReader.hasNext(JsonReader.java:416)
         at com.google.gson.internal.bind.TypeAdapters$25.read(TypeAdapters.java:666)
         at com.google.gson.internal.bind.TypeAdapters$25.read(TypeAdapters.java:667)
         at com.google.gson.internal.bind.TypeAdapters$25.read(TypeAdapters.java:642)
         at com.google.gson.internal.Streams.parse(Streams.java:44)
         ... 7 more



Reported by royarnon on 2014-11-02 15:01:39


- _Attachment: [nodeConfig.json](https://storage.googleapis.com/google-code-attachments/selenium/issue-8125/comment-0/nodeConfig.json)_
@lukeis
Copy link
Member Author

lukeis commented Mar 4, 2016

I think I found the issue...
It seems I have a trailing comma, which causes gson to fail reading the file.
Maybe an issue with the latest version of gson if it was updated?
Anyway, if anyone has this issue, removing the trailing comma seems to fix the file.

Reported by royarnon on 2014-11-02 22:17:30

@lukeis
Copy link
Member Author

lukeis commented Mar 4, 2016

A training comma is a json syntax error. So a bug was fixed, not introduced :)

Reported by barancev on 2014-11-04 10:57:33

  • Status changed: WontFix

@lukeis
Copy link
Member Author

lukeis commented Mar 4, 2016

Reported by luke.semerau on 2015-09-17 18:24:45

  • Labels added: Restrict-AddIssueComment-Commit

@lukeis lukeis closed this as completed Mar 4, 2016
@SeleniumHQ SeleniumHQ locked and limited conversation to collaborators Mar 4, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant