Add-on problems
A refused verb leaves addons.yaml, the lock and the store as they were, so run it again once you have fixed the cause. An add-ons or add-on updates row of kraft admin doctor is on Doctor failures. If you write add-ons, Add-on validation messages lists what validate rejects.
To confirm a fix, run the verb again, then kraft admin addon list. kraft admin doctor doesn't report a refused install or update: its add-ons row reports what is installed, and add-on updates only the last auto-update.
A work item stops on an add-on
A work item reads a Kraft add-on's skills and agent profiles from the version it was filed with.
add-on ... could not be read
Added in 2.1
Kraft restores the pinned version's files from the commit the item recorded when they are missing, and couldn't. Fix what the reason names, then retry:
- Restore the server's access to the collection, or add the collection again with
kraft admin addon collection add. - Run
kraft item retry ID. A retry reads the same pinned version.
The reason ends with what failed:
locked commit <commit> could not be fetched (network: ...)or(auth: ...): the server couldn't reach the collection, or git has no login for it there. A server run as a service may lack the SSH agent or credential helper your shell has.collection <name> is no longer in addons.yaml; add it again: the collection was removed.its files no longer match the locked digest: what the collection holds for that version changed....; the store was changed after it was installed: something edited, added or removed a file underrun/addons/store/after Kraft wrote it. A skill read from the add-on stops the same way, asskill: add-on '<namespace>' could not be read: ....
Before the ; of that last reason is <file> does not match its digest, <file> is not in its digest, <file> is missing or <file> is not a regular file. For the store's manifest it is .kraft-digest does not hash to the store's name, .kraft-digest is malformed or .kraft-digest cannot be read.
For an edited store, delete the store directory so the next launch restores it:
- Find out what wrote under
run/addons/store/.kraft admin doctornames the add-on. - Delete that
store/<digest>/directory. It is read-only, so runchmod -R u+won it first. The next launch restores the pinned version from its commit. - Run
kraft item retry ID.
kraft admin addon install --re-install repairs the store only while the collection still holds the same content, because it takes the newest commit. Restoring a store says where the files come from.
its parent ... is not loaded
Added in 2.3
The reason reads add-on <id> <version> could not be read: its parent <parent> is not loaded: .... The add-on builds on another one, and Kraft never runs a child without the add-on it inherits from. The rest is the parent's own reason, and it can name a grandparent the same way, so the last reason in the line is the add-on that failed.
- Fix that add-on as its own reason says: restore its store as above, enable it again with
kraft admin addon enable, or install it again withkraft admin addon install. - Run
kraft item retry ID.
a work item never mixes versions
Added in 2.3
The reason reads add-on <id> <version> could not be read: <id> <version> builds on <ancestor> <version>, and this work item runs <ancestor> <version>; a work item never mixes versions of one add-on tree, or ... is installed under <namespace>, and this work item runs <id> <version>; a work item never mixes versions of one add-on. A retry doesn't fix this: the item keeps the versions it pinned.
- Remove the fallback from
harnesses.yaml, or point it at a profile the item already reads, then runkraft item retry ID. - Or file the item again. A new item pins the versions installed now.
The task reads an add-on the item had not pinned, through a harnesses.yaml fallback written after the item was filed. The installed version is built on another version of an add-on the item pinned, or is itself another version of one. Kraft won't run one add-on tree at two versions.
Adding, installing, updating and removing
The first column is the text the command prints after its prefix. ... stands for text that varies, and a path is shortened.
installandupdateprintADDON@COLLECTION: refused: ...when the add-on or your instance is the problem, andADDON@COLLECTION: failed: ...when git, the lock or the store is.- Every other refusal starts with
error:.
Adding a collection
| The message says | What happened | Fix |
|---|---|---|
<address>: fatal: '/nonexistent/repo.git' does not appear to be a git repository and fatal: Could not read from remote repository. | git couldn't reach the address. | Check the address, and that this machine can reach it. |
<address>: ... and one of Permission denied (publickey), Authentication failed, could not read Username or terminal prompts disabled | collection add, install and update run git in your shell, and Kraft runs it without prompting, so a password or passphrase prompt fails. GitHub answers a missing or private owner/repo over HTTPS this way too. | Load your key into your shell's SSH agent, or set a git credential helper, then run the verb again. For GitHub, check the name and your access. |
<address>: fatal: transport 'file' not allowed | The address is a path that isn't a directory, so Kraft tried it as a git address, and a path isn't one. | Check the path. For a git repository on this machine, give file:///abs/path. |
<address>: ref 'nonexistent' does not exist: fatal: couldn't find remote ref nonexistent | The ref names no branch, tag or commit. Kraft reports it as refused, not as a network failure. | After a failed collection add nothing was added: run it again with a ref that exists. For a collection added earlier, fix its ref: in addons.yaml, then run kraft admin addon update. |
<commit>: no regular file .kraft/collection.json | A git collection has no .kraft/collection.json at the ref Kraft read, so it isn't a collection. | Check the address and --ref. The author lays one out in Publish a collection. |
[Errno 2] No such file or directory: '<dir>/.kraft/collection.json' | A directory collection has no .kraft/collection.json. | Check the path you gave, or add the file as in Publish a collection. |
the collection name 'kraft' is Kraft's own | collection add read a collection whose collection.json declares the name kraft, which the built-in kraft-default uses. Added in 2.6 | Ask the author to name the collection otherwise. Nothing was added. |
collection acme is already added from <source>; add --replace to move it to this source | addons.yaml already holds a collection of that name, from a different address or directory. | Add it from the source it has, or run the same command with --replace to move it, then accept the move in kraft admin addon update. |
Auto-update runs in the server, which as a service may lack your SSH agent or credential helper: see add-on ... could not be read.
Installing and updating
| The message says | What happened | Fix |
|---|---|---|
kraft-default@kraft comes with Kraft; upgrading Kraft updates it | install, update, auto-update, enable, disable or uninstall named the built-in kraft-default@kraft. Kraft ships it and takes its version from Kraft, so none of these verbs apply. Added in 2.6 | Nothing to do: kraft admin update brings the new release's copy. Name another add-on, or leave it out of the command. |
Kraft now ships kraft-default itself; run `kraft admin addon update` on what builds on it, then `kraft admin addon uninstall <id>` | <id> is a copy of kraft-default you installed from another collection, such as kraft-default@acme. kraft admin addon list shows the line beside it and update refuses it, because the built-in answers for that namespace. Added in 2.6 | Run kraft admin addon update on each add-on that builds on it, then kraft admin addon uninstall <id> with the ID printed. |
addons.yaml: release@acme: no collection 'acme' under collections | The add-on's collection isn't added on this instance. | Run kraft admin addon collection add SOURCE, then install again. |
collection acme has no add-on nope | The collection doesn't list an add-on of that name. | Compare the name with kraft admin addon collection list, and check the collection's ref. |
declined release@acme: no terminal to ask at; pass -y to accept | install and update show a review and ask first. With no terminal, as in a script, they decline. | Read the review in a terminal, then pass -y in the script. |
release@acme is already installed; `update` it, or pass --re-install to take the newest commit | install refuses an add-on the lock already holds. | Run kraft admin addon update release@acme, or install release@acme --re-install to take the commit the ref names now. |
requires agent profile 'ghost', which harnesses.yaml does not define, or the same with requires harness | The add-on needs an agent profile or a harness this instance doesn't define. | Define it in harnesses.yaml, or ask the author to drop it from requires. |
1.0.0 needs Kraft 3.x; this is Kraft 2.4.1 | The add-on's requires.kraft names a Kraft this one isn't. The message reads needs Kraft 3.x for a major, or needs Kraft 2.9 or later for a minimum. | Run a Kraft the add-on supports, or ask the author for a version that supports yours. |
addons.yaml: release@other: namespace 'release' is taken by release@acme; install one under another name with --as | Two add-ons would share a namespace. | Install it again under another alias: --as ALIAS. |
its namespace 'release' is now a repository id | An id in repos.yaml is the add-on's namespace. validate prints the same line after the path. | Install it with --as ALIAS, choosing an alias that no id in repos.yaml uses. |
a@acme: chains/go.yaml: ...: skill 'b:method' names this add-on's namespace 'b'; there are no add-on dependencies | An installed add-on, a@acme, already names a skill in the namespace b of the add-on you are installing or updating, from before that add-on existed. | Install the add-on you are installing under another name with --as ALIAS, or ask the author of the installed add-on the message names to drop the reference. |
chains/go.yaml: ...: skill 'my-repo:notes' names repository my-repo's repo library namespace; there are no add-on dependencies | The add-on names a skill under a connected repository's id. That id is reserved for the repository's repo library, whether or not one is accepted. | Set another id on the repository's entry in repos.yaml, or ask the add-on's author to drop the reference. |
chain mine would stop resolving: ...: extends no task named 'release:implementer' | The new version drops something one of your own files uses. update --check exits 2 for it. | Edit the chain the message names so it stops extending the removed task, or ask the author to keep it. The locked version keeps running. |
chain mine would stop resolving: ...: remove 'm': release:ship has no node 'm' | mine extends the add-on's chain, and the new version dropped or renamed a node one of its edits names. The same refusal says add x: release:ship already has a node 'x' when the add-on now uses an ID mine adds. | Update the edit the message names in chains/mine.yaml, or copy the add-on's chain to own its structure. The locked version keeps running. Added in 2.2 |
chain app:ship would stop resolving: ...; app's items refuse it until its repo library is fixed | A held update, or a validate warning: the new version breaks a chain a connected repository's .kraft/ extends from it. Auto-update holds it. | Take it with kraft admin addon update if app items may refuse that chain until its .kraft/ is fixed. Added in 2.2 |
its chain release:ship does not resolve: ...: extends no task named 'release:implementor' | The add-on's own chain names something the add-on doesn't declare. | Ask the author to correct the chain; validate finds it before publishing. |
is not in addons.yaml; install it first | update named an add-on this instance hasn't installed. | Run kraft admin addon install ADDON@COLLECTION. |
add-ons changed while you reviewed; run update again | addons.yaml or addons.lock changed while the review was open. Nothing was written, and an install's new entry isn't kept. | Run the same install or update again. |
A changed add-on at the same version
update prints release@acme: current: version 1.0.0 unchanged, but its files changed at <commit>; --re-install to take it and exits 0: this isn't a refusal. A new commit that changes the add-on's files at the same version isn't an update, and a file Kraft doesn't read never triggers it.
Run kraft admin addon install ADDON@COLLECTION --re-install, or ask the author to raise version.
Removing
| The message says | What happened | Fix |
|---|---|---|
cannot uninstall release@acme: its namespace 'release' is still referenced by and a list of files | uninstall and disable refuse while your own files name the add-on's namespace. | Edit each file listed, or copy what you use into your library, then run the verb again. |
cannot uninstall release@acme: something installed builds on it and repository app: .kraft/library.yaml lists release@acme under addons:; disconnect that repository, or have it drop the line | A repository's library extends the add-on's chains. The same headline also lists any add-on that builds on it (see the next row). disable and an addons.yaml edit that unloads it refuse the same way. | Disconnect the repository, or have its maintainers drop the line, then run the verb again. Added in 2.2 |
cannot uninstall company@corp: something installed builds on it and team@payments builds on it (requires.addons) | An installed, enabled add-on names this one as its parent. disable and an addons.yaml edit that unloads it refuse the same way; the edit also names each add-on below it that would be left out. | Disable or uninstall each child listed first (disabling a child is always allowed), then run the verb again. Added in 2.3 |
cannot enable team@payments: its parent company@corp is not installed; install it first: kraft admin addon install company@corp | enable refuses a child whose parent isn't installed, not loaded or outside the range its requires.addons accepts. | Install or enable the parent, or update it into the range, then enable the child. Added in 2.3 |
collection acme still has add-ons installed: release@acme; uninstall them first | collection remove refuses while an add-on of that collection is installed or locked. | Run kraft admin addon uninstall ADDON@COLLECTION for each one listed, then remove the collection. |
Any verb that writes
| The message says | What happened | Fix |
|---|---|---|
another add-on change is running; try again | Another kraft admin addon command, or an auto-update, held the add-on lock while this one waited 5 seconds. | Wait for it to finish, then run the verb again. |
a worker does not change the instance's add-ons | A work item's agent ran a verb that changes add-ons. A worker may not. | Run the verb yourself, from a terminal. |
An update is held by a range
Added in 2.3
An add-on that builds on another accepts a range of its parent's versions. An
update that would put a version outside a range is held: the add-on stays on
its version, and kraft admin addon update prints one of these:
| The message says | What happened | Fix |
|---|---|---|
company@corp 2.0.0 is outside team@payments's range 1 (needs 1.x) | The parent's new release is one a child doesn't accept. The parent is held; the child keeps running. | Point the collection's ref at a tag the range accepts, or wait for the child's author to accept the new release. |
team@payments's range 2 does not accept company@corp 1.0.0 (needs 2.x) | The child's new release needs a parent newer than the one installed. The child is held. | Update the parent into the range if its collection has one, or wait for the parent to ship it. |
- Point the ref at a tag the range accepts. Set the collection's
refinaddons.yamlto a tag of the 1.x line, then runkraft admin addon update. - Or wait. Once the other side ships a release that fits, the next update
moves both. Auto-update reports a held move on the
add-on updatesrow ofkraft admin doctor.
update --check exits 1 for a held move. An update that would break a chain is
refused instead, and exits 2. A parent you install for the first time that is
outside the child's range is refused with the same two ways out.
Related
- Share chains with add-ons: write, validate, publish, install and update an add-on, step by step.
- Add-ons and collections: every manifest field,
addons.yaml, the lock, and when an add-on loads. - Doctor failures: the
add-onsandadd-on updatesrows. - Add-on validation messages: what
kraft admin addon validatereports in an add-on you wrote.
Starting and reaching Kraft
Fix a kraft command that isn't found, a server that won't start because its port is taken, and a 403 "unexpected Host" from a webhook or proxy.
Add-on validation messages
Find the message kraft admin addon validate printed for an add-on or collection you wrote, and the fix for each.