Skip to content

Error messages

A list of common error messages to help debug your codify.json file

Codify plan

Syntax errors

terminal
codify plan
...
Syntax error in codify.json file
Unexpected token ","(\u{2c}) in JSON at position 138
7 | },
8 | {
9 | "type": "path",,
| ^
10 | "path": "$HOME/path/to/folder"
11 | }
12 |]

A syntax error happens when the configuration inside the codify.json file is incorrect and does not follow the grammar of JSON. The parser will try to point out the error in most cases to make it easy to fix the problem. In this case there was a double comma on line 9.

Validation errors

terminal
codify plan
...
Validation error: invalid resource config for "homebrew" resource.
"/dependsOn" must be array
File: /Users/kevinwang/Projects/codify/codify.json
17 | "cirruslabs/cli/cirrus",
18 | "cirruslabs/cli/tart"
19 | ],
> 20 | "dependsOn": "string"
21 | },
22 | {
23 | "type": "vscode"

A validation error happens when the configuration is valid JSON or YAML but the contents does not validate to be a proper Codify config. The parser will try to generate a helpful error with a code snippet to make it easier to fix. In the above example, dependsOn must be an array and not a string. Some validation errors include unknown type ids (types not found on any plugins), invalid parameters, and invalid parameter values.

Invalid project config

terminal
codify plan
...
Syntax error in codify.json file
Unexpected token ","(\u{2c}) in JSON at position 138
7 | },
8 | {
9 | "type": "path",,
| ^
10 | "path": "$HOME/path/to/folder"
11 | }
12 |]

Codify apply

All plan errors are applicable to apply as well.

Additional changes are needed

terminal
codify apply
...
Plugin: 'default'. Resource: 'homebrew'. Additional changes are
needed tomatch the desired plan.
Validation returned: "modify" instead of "noop". These changes are remaining.
{
~ "casks":
+ jetbrains-toolbox,
],
}

This error is shown when a plugin could not apply the desired configuration. Scroll up on the terminal to view the detailed logs for where the error has occurred. This issue is most likely caused by a plugin error or a mis-configuration in codify.json. An example of this occurring is when the homebrew resource tries to install a cask for a program that already exists. Depending on the error message, it may be fine to ignore this error. In this example, the homebrew cask jetbrains-toolbox can be removed from codify.json and be applied again. Otherwise, report this to the plugin developer.

Apply error

terminal
codify apply
...
Apply error for plugin: "default", resource: "path"
Path could not be applied

An error occurred during the apply process, this could either be caused by a bug in a particular plugin or codify.json was mis-configured. The cause of the error is returned in the response and scrolling up to view the generated output logs may give more context.

Plugin did not respond in 10 minutes

terminal
codify apply
...
Plugin did not respond in 10:00 minutes: apply

Codify will time out a plugin if it hasn’t responded with a message, stdout or stderr within 10 minutes. Mostly like the plugin is stuck or frozen. Try scrolling up to see if there were any errors in the detailed logs. Report this issue to the plugin developer. If the long runtime was intentional, a future feature will allow the timeout duration to be extended.

3 incorrect password attempts

terminal
codify apply
...
sudo: 3 incorrect password attempts

When installing dependencies that require root access to install (for example moving files to /usr/localbin), a sudo prompt will be shown to the user to enter their password. Users get a maximum of 3 attempts to enter the password. It will display this error if the user is not able to enter the password in 3 attempts.