400: “Invalid JSON in request body” on "travis lint --pro"

Our github repos are configured to run validation checks locally on machine before code is pushed to GitHub. The TravisCI YAML configuration format check is no longer working. As of now our TravisCI YAML files using an outdated configuration option.

$ travis lint --debug

Warnings for .travis.yml:
[warn] on root: deprecated key: sudo (The key sudo has no effect anymore.)

However, removing this key from the TravisCI YAML file results in a HTTP 4xx error, but only when using the travis-ci.com endpoint.

travis lint .travis.yml --pro --quiet --skip-completion-check --skip-version-check
400: “Invalid JSON in request body”

travis lint .travis.yml --com --quiet --skip-completion-check --skip-version-check
400: “Invalid JSON in request body”

travis lint .travis.yml --org --quiet --skip-completion-check --skip-version-check
“works/no error code”

Please let me know how can we resolve this issue.

Thanks.

sudo: is long deprecated and has no effect. Remove it.

The 400: “Invalid JSON in request body” looks like a proper bug in CLI or API.

CLI source code is at https://github.com/travis-ci/travis.rb; API source code is at https://github.com/travis-ci/travis-api so you can use that to diagnose the issue yourself.