SolaWing / xcode-build-server

a build server protocol implementation for integrate xcode with sourcekit-lsp
MIT License
424 stars 19 forks source link

json.decoder.JSONDecodeError: Extra data: line 19 column #71

Closed wojciech-kulik closed 1 month ago

wojciech-kulik commented 1 month ago

When I run:

xcode-build-server config -project XYZ.xcodeproj -scheme "XYZ Dev"

I get this error:

find root: /Users/wkulik/Library/Developer/Xcode/DerivedData/XYZ-gpmdmkkdwesporflxvnrnqbsyoll
Traceback (most recent call last):
  File "/opt/homebrew/bin/xcode-build-server", line 109, in <module>
    main()
  File "/opt/homebrew/bin/xcode-build-server", line 76, in main
    main(subcommand_argv())
  File "/opt/homebrew/Cellar/xcode-build-server/1.1.0/libexec/config/cmd.py", line 92, in main
    config = ServerConfig.shared()
             ^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/xcode-build-server/1.1.0/libexec/config/config.py", line 59, in shared
    return ServerConfig(ServerConfig.default_path)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/xcode-build-server/1.1.0/libexec/config/config.py", line 65, in __init__
    self.data = json.load(f)
                ^^^^^^^^^^^^
  File "/nix/store/ybnf7k6i9p244bbhsbxizqk65z58cwyr-python3-3.12.6/lib/python3.12/json/__init__.py", line 293, in load
    return loads(fp.read(),
           ^^^^^^^^^^^^^^^^
  File "/nix/store/ybnf7k6i9p244bbhsbxizqk65z58cwyr-python3-3.12.6/lib/python3.12/json/__init__.py", line 346, in loads
    return _default_decoder.decode(s)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/nix/store/ybnf7k6i9p244bbhsbxizqk65z58cwyr-python3-3.12.6/lib/python3.12/json/decoder.py", line 340, in decode
    raise JSONDecodeError("Extra data", s, end)
json.decoder.JSONDecodeError: Extra data: line 19 column 2 (char 456)

I installed xcode-build-server via Homebrew. I'm using Xcode 16 on macOS Sequoia.

Any idea how to fix it?

SolaWing commented 1 month ago

Did your buildServer.json is valid? did you modify it?

wojciech-kulik commented 1 month ago

Hmm, the scheme was different, so it looks like this command doesn't support updating scheme. When I deleted buildServer.json it worked

SolaWing commented 1 month ago

it support update, but the error shows your json file is corrupted

wojciech-kulik commented 1 month ago

Hmm, not sure why it would happen, the file seemed to be fine, I didn't do any manual changes. Nevertheless, the issue doesn't occur anymore, so I'm closing the ticket.