-
-
Notifications
You must be signed in to change notification settings - Fork 285
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
Docker-sync with unision strategy broken for newer MacOS / homebrew installation #687
Comments
https://unix.stackexchange.com/questions/309669/unison-fatal-error-during-unmarshaling Most probably either the wrong unison package installed or the current one in homebrew is not compatible. The release was adjusted very recently https://github.com/Homebrew/homebrew-core/blob/master/Formula/unison.rb And there might be already an fix for that https://github.com/Homebrew/homebrew-core/blob/master/Formula/unison.rb#L18 maybe brew upgrade and test again. |
Thanks, but the same error happened after even brew upgrade or downgrade.... |
@endam well i cannot do anything about that right now - unison strategy being depenend on the "hosts unison" ( not dockerized ) and that adds an extra layer of complexity - this is one reason why we have chosen native_osx as the default ( there are more ). Unison and unox under OSX / brew tend to break more then once. Once it is some OCALM, then it's python madness, then something else. I keep this issue open for anybody running into this issue with unison. I expect this to be resolved by homebrew "auotmatically" by fixing the build |
Also experiencing the same problem. #688 Just to clear things up, is it docker-sync using 4.06.1 to compile? and brew using 4.08.1 to compile? Edit: by docker-sync i mean the eugenmayer/unison Dockerfile |
@JParkinson1991 docker sync does use the unison docker image at https://github.com/EugenMayer/docker-image-unison https://github.com/EugenMayer/docker-image-unison/blob/master/Dockerfile#L5 and the unison version https://github.com/EugenMayer/docker-image-unison/blob/master/Dockerfile#L3 OCALM is picked from testing, so could be anything - but it is not rebuild all the time. You can just try to rebuild the docker image locally using the right tag https://github.com/EugenMayer/docker-sync/blob/master/lib/docker-sync/sync_strategy/unison.rb#L25
And then test again. If that works we need to do that officially, release |
I'll have a dig around today @EugenMayer Im hoping doing a quick update of the ocaml version used to compile in the unison image should fix this. Looking at alpine packages it seems there default ocaml version is Question though, why does this not affect native_osx? Both native_osx and unison syn strategies build ontop of the |
|
I see, explains why there is no error. I wonder if it's worth (assuming the ocaml version bump fixes this) maintain both the unison image and the required host binary. Bringing both 'in house' would eliminate these compiler mismatch errors etc. Either way, ill take a look at rebuilding the image locally today and see where that gets me. |
Managed to update the docker-image-unsion Dockefile to compile Unison with OCaml 4.08.1. As suggested, tagged this locally with 2.51.2.2 and updated the unison.rb file in docker-sync gem to reference and all works absolutely fine! Opened up a pull request for you to have a look at. |
thank you for your work! You do not need to match the unison.rb file yet in terms of using a custom image version, use the https://docker-sync.readthedocs.io/en/latest/getting-started/configuration.html#references options:
unison_image: 'eugenmayer/unison:2.51.2.2' Beside that, it would make sense to patch the unsion.rb file for the next release - could you open a PR here to? Would be great! I already build and published |
That Ive opened the PR for the update to the default unison image, defeinitely needs more tests. #689 Obviously the big one here is that Unison needs patching to be compiled with ocaml 4.08.1 but that shouldnt cause any problems for other operating systems. |
docker-sync start
result in "error during unmarshaling (input_value: ill-formed message)"
will be fixed with 0.5.12 |
Guys this is great, thanks a lot for the time you put in docker-sync. But really, how should I upgrade please ? It's not clear to me... sorry! |
The updated unison image (OCAML 4.08.1 compatible) is now used by default in docker-sync core from version Theres no need to change any options as detailed above, all you need to do is update the docker-sync gem.
Hope that helps |
@JParkinson1991 The update command didnt work with for me. I'm on macOS Catalina 10.15.3. |
@inPhoenix working fine here, on same OS, can only assume this is a problem at your end and not with this package. |
@inPhoenix - A coworker and I hit this today: on 10.15.3, unison up to date, all of that jazz. What we eventually found was unison in the existing sync containers was still on the old OCaml compiler. Destroying the containers and letting docker-sync re-create them brought everything into unison (pun intended) and much joy was had. |
I have same problem. unison -version # => unison version 2.51.3.70 (ocaml 4.12.0)
cd /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula
git log unison.rb
git checkout 0edb12c144c6f64e6c35bdd4f6afb7d56d10bf60
brew uninstall unison
HOMEBREW_NO_AUTO_UPDATE=1 brew install unison
unison -version # => unison version 2.51.3 (ocaml 4.10.0) it's worked docker-sync after executing the command. |
@hibikiosawa4388 Thanks bro! You made my day!!! |
@hibikiosawa4388 trying it today, but it not working anymore
|
For temporary solution, I download unison v2.51.3 with ocaml-4.08.1 from https://github.com/bcpierce00/unison/releases/tag/v2.51.3 extract the content, and put the unison executable into bin folder in my home and use it for docker-sync. |
I did the process but still has the same issue when runnig "brew install Elixir" on Mac |
@hanie21 I'm not using elixir so I guess that's is a different issues. |
@EugenMayer Can you please provide new version for OCAML 4.12.0? |
@artemsheludko1 if you like, run a PR for EugenMayer/docker-image-unison#18 for that purpose - i cannot currently work on this myself but i can maintain PRs |
@EugenMayer Unfortunately I am not very familiar with this stuff. |
For those who need docker-image-unison with the same OCAML version with the latest unison on homebrew, you can try my image: https://hub.docker.com/r/donnykurnia/unison To use this image, follow this guide: https://docker-sync.readthedocs.io/en/latest/getting-started/configuration.html#sync-strategy-image |
Be aware it is 2.54 and not 2.53 - as far as i'am aware this will most probably create issues for macos users, since those are still on 2.53 https://formulae.brew.sh/formula/unison |
How to brew upgrade unison. step 1:Add the following to your docker-sync.yml. options:
unison_image: 'eugenmayer/unison:2.51.3-4.12.0-AMD64' ATTENTION: link : https://github.com/EugenMayer/docker-image-unison step 2:$ brew upgrade unison
$ cd $PROJECT_DIR
$ ls | grep docker-sync.yml
# => docker-sync.yml
# ↓ Important:
$ docker-sync clean
# ↓Make sure unison_image is already selected.
$ cat docker-sync.yml | grep -B1 unison_image
# => options:
# => unison_image: 'eugenmayer/unison:2.51.3-4.12.0-AMD64'
# ↓Verify that the version displayed is the same.
$ unison -version
# => unison version 2.51.3 (ocaml 4.12.0)
$ docker-sync start
# => ...
# => UNISON 2.51.3 (OCAML 4.12.0) started propagating
# => ... @EugenMayer @donnykurnia |
To downgrade Unison to
Though this still didn't work for me, initial sync works but then background sync doesn't . The only strategy that works for me currently on Mac M1 using Colima (can't use Docker Desktop because some amd64 containers don't work there as on arm64 it's not doing proper virtualization, and Colima does full software amd64 virtualization) is with using a custom |
Ah correction, the
|
@torson Ha, you really made my day! I ran in to the same issues as you after switching to an M1 Mac, and the new file-system watcher made everything work again! |
Error/Feature Requestion/Docs
Error
Docker Driver
Docker for Mac 2.1.2.0(38030)
Sync strategy
unison
your docker-sync.yml
OS
OSX Version: 10.14.6
docker-sync version
0.5.11
Problem
Running
docker-sync start
result in "error during unmarshaling (input_value: ill-formed message)"Full log:
unison was installed with homebrew.
I would appreciate it very much if you could point out anything to me.
The text was updated successfully, but these errors were encountered: