Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[snips-skill-server][1.1.0 (0.61.1)] - install_skills is broken #96

Closed
oziee opened this Issue Mar 3, 2019 · 7 comments

Comments

@oziee
Copy link

oziee commented Mar 3, 2019

when running the command snips-skill-server install_skills the following error occurs

snips-skill-server install_skills
[11:25:30.288700] INFO :snips_skill_server_lib::installer: installing snippets
[11:25:30.288919] INFO :snips_skill_server_lib::installer: ->rendering templates
[11:25:30.288937] INFO :snips_skill_server_lib::installer: installing git apps
[11:25:30.288973] ERROR:snips_skill_server               : Something unexpected happened with: "/usr/local/etc/assistant/assistant.json/Snipsfile.yaml"
 -> caused by: Not a directory (os error 20)

"/usr/local/etc/assistant/assistant.json/Snipsfile.yaml" is not a valid file path it is trying to access as it includes two file names

so I created a folder with the name assistant.json and copied the Snipsfile.yaml file in and ran the command again.. and this time it installed

HOWEVER when snips-skill-server runs it has permission errors
[calculator][err] sh: ./action-calculator.py: Permission denied

seems the snips-skill-server is also not setting chmod +x for the file

@oziee oziee changed the title snips-skill-server install_skills is broken snips-skill-server install_skills - is broken (1.1.0 (0.61.1)) Mar 3, 2019

@cpoisson

This comment has been minimized.

Copy link
Collaborator

cpoisson commented Mar 4, 2019

Hum... the path seems clearly wrong "/usr/local/etc/assistant/assistant.json/Snipsfile.yaml"

Thanks for your ticket @oziee we will have a look

@cpoisson

This comment has been minimized.

Copy link
Collaborator

cpoisson commented Mar 4, 2019

@oziee
The first issue has been fixed for the next release (Mid March)

The permission error needs clarification (on our side)

@oziee

This comment has been minimized.

Copy link
Author

oziee commented Mar 4, 2019

permission error

when running snips-skill-server -vvv the below log is shown
in the log it states [err] sh: ./action-calculator.py: Permission denied

snips-skill-server tries 3 times before disabling

by simply running chmod +x {action-filename.py} the error is removed and snips-skill-server runs normally

log before running chmod

[11:42:26.181220] DEBUG:snips_common_cli::cli: conf lookup: snips-skill-server.skill_dir -> Ok(None)
[11:42:26.181430] DEBUG:snips_common_cli::cli: conf lookup: snips-common.skill_dir -> Ok(None)
[11:42:26.181444] DEBUG:snips_common_cli::cli: conf lookup: snips-skill-server.skills_root_dir -> Ok(None)
[11:42:26.181455] DEBUG:snips_common_cli::cli: conf lookup: snips-common.skills_root_dir -> Ok(None)
[11:42:26.181623] INFO :snips_skill_server_lib::runner: searching dir for actions: /usr/local/var/snips/skills/ozie.Calculations
[11:42:26.181827] INFO :snips_skill_server_lib::runner: found action "/usr/local/var/snips/skills/ozie.Calculations/action-calculator.py"
[11:42:26.183074] DEBUG:snips_skill_server_lib::runner: [calculator][err] thread started
[11:42:26.183082] DEBUG:snips_skill_server_lib::runner: [calculator][out] thread started
[11:42:26.189207] INFO :snips_skill_server_lib::runner: [calculator][err] sh: ./action-calculator.py: Permission denied
[11:42:26.189516] DEBUG:snips_skill_server_lib::runner: [calculator][err] thread stopped
[11:42:26.189505] DEBUG:snips_skill_server_lib::runner: [calculator][out] thread stopped
...
...
...
[11:47:53.683173] WARN :snips_skill_server_lib::handler::nosandbox: child calculator has stopped with status `exit code: 126`
[11:47:53.683215] ERROR:snips_skill_server_lib::runner            : action calculator failed 3 times in the last 10 seconds, disabling it
^[[A^C[11:49:26.327536] INFO :snips_skill_server_lib::runner            : was asked to stop, terminating childs before quitting...

log after running chmod

snips-skill-server -vvv
[21:29:07.303012] DEBUG:snips_common_cli::cli: conf lookup: snips-skill-server.skill_dir -> Ok(None)
[21:29:07.303221] DEBUG:snips_common_cli::cli: conf lookup: snips-common.skill_dir -> Ok(None)
[21:29:07.303235] DEBUG:snips_common_cli::cli: conf lookup: snips-skill-server.skills_root_dir -> Ok(None)
[21:29:07.303246] DEBUG:snips_common_cli::cli: conf lookup: snips-common.skills_root_dir -> Ok(None)
[21:29:07.304094] INFO :snips_skill_server_lib::runner: searching dir for actions: /usr/local/var/snips/skills/ozie.Calculations
[21:29:07.304820] INFO :snips_skill_server_lib::runner: found action "/usr/local/var/snips/skills/ozie.Calculations/action-calculator.py"
[21:29:07.306882] DEBUG:snips_skill_server_lib::runner: [calculator][err] thread started
[21:29:07.306886] DEBUG:snips_skill_server_lib::runner: [calculator][out] thread started

@cpoisson cpoisson added the bug label Mar 4, 2019

@cpoisson cpoisson added this to the Release 1.1.3 milestone Mar 4, 2019

@cpoisson cpoisson added the Snips Flow label Mar 4, 2019

@nebuto

This comment has been minimized.

Copy link

nebuto commented Mar 4, 2019

Hi @oziee,
Skills need to have their permissions set to executable to be runnable by the snips-skill-server
Where do these skills come from, github / snippets ? (Permissions need to be set in the github repo)
How did you install them the first time, snips-skill-server / sam or manually ?

@cpoisson cpoisson changed the title snips-skill-server install_skills - is broken (1.1.0 (0.61.1)) [snips-skill-server][1.1.0 (0.61.1)] - install_skills is broken Mar 4, 2019

@Thorinair

This comment has been minimized.

Copy link

Thorinair commented Mar 4, 2019

I can confirm that running snips-skill-server install_skills messes up all of the permissions and had me spend a day trying to fix it. I've had it happen back on the day of the release after following a developer's instruction to use that command.

@oziee

This comment has been minimized.

Copy link
Author

oziee commented Mar 4, 2019

Hey @nebuto

Yes skill code is on GitHub and installed manually using the command snips-skill-server install_skills

I did not know about having to set the permission in github (didn’t see that written anywhere in the docs) so I will do that

@cpoisson

This comment has been minimized.

Copy link
Collaborator

cpoisson commented Mar 5, 2019

Tested ok on Snips Flow version 1.1.2 (0.62.0)

@cpoisson cpoisson closed this Mar 5, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.