`sync` fails on `core24` packed snap
- Dominant language
- Python
- Stars
- 60
- Forks
- 31
- Avg merge
- 2d 15h
- Merged PRs (30d)
- 1
Description
### Bug Description
Running `jhack sync` will fail to copy files to an application when using the snap. Running `latest/stable` snap of jhack (rev 461, v0.4.4.0.13)
After running the same command within the snap environment, the error is clear:
```
$ snap run --shell jhack
# juju ssh b/0 mkdir -p /var/lib/juju/agents/unit-b-0/charm/src && cat /home/raul/workspace/1.BIGDATA/kafka-operator/src/charm.py | juju ssh b/0 sudo -i 'sudo tee /var/lib/juju/agents/unit-b-0/charm/src/charm.py' > /dev/null
ssh: error while loading shared libraries: libcrypto.so.1.1: cannot open shared object file: No such file or directory
# find / -name "libcrypto.so.1.1" 2>/dev/null
#
```
Outside of the snap env, the lib is only found up until core20
```
$ find / -name "libcrypto.so.1.1" 2>/dev/null
/snap/core20/2599/usr/lib/x86_64-linux-gnu/libcrypto.so.1.1
/snap/core18/2887/usr/lib/x86_64-linux-gnu/libcrypto.so.1.1
. . .
```
### To Reproduce
jhack sync -S app
. . .
\# save contents of a file
### Relevant log output
```shell
RuntimeError: Failed to push /home/raul/workspace/1.BIGDATA/kafka-operator/src/charm.py to b/0 with "juju ssh b/0 mkdir -p /var/lib/juju/agents/unit-b-0/charm/src && cat
/home/raul/workspace/1.BIGDATA/kafka-operator/src/charm.py | juju ssh b/0 sudo -i 'sudo tee /var/lib/juju/agents/unit-b-0/charm/src/charm.py' > /dev/null". (verify that the
path is readable by the jhack snap)
```
Contributor guide
Research direction
Start by reproducing `jhack sync -S app` inside the core24 jhack snap and compare it with the same command outside the snap. Trace the `juju ssh` invocation shown in the error and verify that syncing completes without the missing `libcrypto.so.1.1` failure in the packaged environment.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- cli, devops
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100