Trying to use state-scripts for Sync state, I was catching this error:
level=error msg="transient error: error calling enter script for (error) authorize state: error running enter state script(s) for Sync state: statescript: The version read from the version file in the statescript directory does not match the versions supported by the client, please make sure the file is present and formatted correctly (supported: [2 3]; actual: 0)." module=state
Digging into the code of
mender/statescript/executor.go, I found that it expects
version file to be present in
/etc/mender/scripts directory, however, no information about it is present in the documentation. I created
version file manually in
3 inside and it worked.
I understand this file is probably getting greated while using yocto process when you provide state scripts, but I used
mender-convert and it wasn’t there.