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
Make Xamarin-based CocoaRunner the default on Mac #4802
Conversation
This seems to be working on my end in macOS 12.3. |
The AppVeyor build failed due to warnings found by BackendToolTests. I added code to get the actual exception from a TargetInvocationException which resulted in:
A local unit test run didn't fail. There are no other details about why MicrosoftGraphBackend threw an exception. I'm not sure where to go from here. Could someone on a Windows system perhaps try this branch out to try to help track down the issue? |
Rewriting and reposting because I didn't properly explain this: I'm trying this on my Windows laptop, and I get the following exception when I run the debug, then try to access the server (http://localhost:8200/):
This is being triggered from the System.Net is indeed used in |
Just to be sure, I pulled a fresh copy of the original repository and I getting the same errors. I'm thinking maybe we can ignore these then? Any thoughts from the maintainers? |
How can I get the application? |
@dgileadi I would like to try your solution, but I dont understand how to build and test it. Could you help me? |
I'm no expert in building Duplicati since I'm quite new to its code, so I'm not much help. Basically what you'd want to do is get a local copy of my cocoa-mac branch and then build it using Visual Studio for Mac. That may sound simple (or not!) but it's the details and troubleshooting that I wouldn't be much help with. |
This pull request has been mentioned on Duplicati. There might be relevant details there: https://forum.duplicati.com/t/supportability-of-newer-macos/15515/2 |
Okay, for future reference I built Duplicati locally. Here's what I did:
After the above finishes a new file named Duplicati.dmg will exist inside Installer/OSX, and you can use that to install Duplicati. Note that Gatekeeper may give you trouble running it since it is unsigned. Right-clicking on the newly installed Duplicati.app and choosing Open worked for me. |
This pull request has been mentioned on Duplicati. There might be relevant details there: https://forum.duplicati.com/t/is-duplicati-kind-of-abandoned/15791/2 |
I've made a test release for anyone wanting to try this out. |
This pull request has been mentioned on Duplicati. There might be relevant details there: https://forum.duplicati.com/t/duplicati-not-starting-on-macos-monterey-12-3-on-m1/14096/19 |
Happy day! Thank you @dgileadi! It works just like the pre-Monterey Duplicati versions. I will keep it on my bench and let it run a simple backup and restore loop for a few days to see if issues arise. |
Hello @dgileadi I don't understand why your PR has changes in the AWS and IDrive backends - what is the relation to the TrayIcon ? |
The changes were necessary to get the project to build on macOS. Visual Studio on macOS originally generated a much messier set of changes but @tgorgdotcom helped make them more manageable. |
Hmm.. is this generated by the quirks of VS, or is it necessary for some mysterious reason. I have generated a build of your PR in my test repo, I think that I will generate another while removing these curious refs in IDrive and AWS backends to see how it goes. |
@dgileadi and one without the backends AND bouncycastle reference: I have found that BouncyCastle lib was explicitly removed from Duplicati in 2021, so adding it back if it's not necessary would have 2 problems: adding some size to all downloads, and possibly involve license problem - so-called 'liberal' licenses involve publicity in their terms and if it's added to a project, there should be an aknowledgement somewhere - that could have been removed in 2021. Anyway, test of these Mac binaries would be very interesting, I don't know anything about dependencies on OSX, if there could be a library staying from a previous install that is picked up by a new install (in this case the binary could work on a already installed computer, but not on a 'new' one). If it is the case, well, a freshly installed computer would be the best to test if this works as intended. |
Hi @gpatel-fr, for the BouncyCastle dependency see the discussion in issue #4668 (search for BouncyCastle in the comments) and the discussion in PR #4800. It appears the dependency is needed when Xamarin AppKit is used. I tried both your builds and weirdly neither one showed a menu bar icon for me. The Activity Monitor app showed Duplicati briefly starting and then quitting. Maybe someone else can try them out? |
All right, then. This build was generated with the original PR: https://github.com/gpatel-fr/testdupl/actions/runs/4332749394 From the log, it was compiled on a OSX 12.6 runner. Is the Mac binary in this build working as intended ? If yes, I'll take care of digging the old ref to BouncyCastle in the doc files and adding it back to satisfy the software license advertising clause. |
@gpatel-fr this latest build has the same behavior for me as the other two builds—it briefly appears in Activity Monitor and then quits again, and never shows a menu bar icon. I'm not sure how to check what the trouble is—does anyone know where any logs might be found? |
This is very annoying to say the least, since this build command file has been ripped out of the normal build file - this particular file runs only on the original Duplicati author's computer. Edit: obviously something I left out is the notarising of the applicatlon. But it should be the same for your build I guess ? And other people have tested your build and it worked on their computer. What's the version of your computer and dev tools ? |
I think I have found the problem. Could you please try this build: https://github.com/gpatel-fr/dupltest/actions/runs/4354235641 |
That one works for me. Nice job, whatever you did! Edit: as for notarizing, you're right that neither your nor my build are notarized. As such you need to go through a dance of right-clicking on the application and choosing open a couple times before it'll let you run it. For a real distributable build it'd be really nice to get the GitHub actions nicely notarizing the Mac builds at some point. |
What I did is to look closely at the official build (the one running on the original author's computer), your build (based on the Linux build actually), and the build in the automatic build I am trying to setup on Github. I realized then that the installer build on Github is very similar to the other builds, except an additional parameter enabling Gtk. In all probability Gtk could never has been be useful to Duplicati for another thing than the Tray Icon, while there was absolutely no use for it in the automatic build on Github, since there is no graphical user interface for the runners. About the notarization, the secrets are on the original author computer, not on Github. My current priority is to get a new release that works, at the moment the actual notarized build will still come from this computer by the original author. That's awkward but there are more urgent problems IMO. My immediate plan is to release a binary build on the forum with all the planned changes included this PR and asking for a feedback given the character of this release. Hopefully I'll get a test for each of the platforms at least, if nothing obviously bad is reported it will become a canary ASAP. |
Happy to test the Mac versions. I will continue to monitor this thread |
@bob787 |
This pull request has been mentioned on Duplicati. There might be relevant details there: https://forum.duplicati.com/t/preview-of-security-and-bugfix-release-canary-105/15925/32 |
With version 2.0.6.105, as mentioned in the forum, I'm seeing this error when running
Would you prefer I open an issue referencing this? |
This gets the tray icon running for me on macOS 12.5 by changing CocoaRunner to use Xamarin.Mac and making it the default on Mac instead of RumpsRunner.
Huge thanks to @tgorgdotcom for the help with getting this to build. The dependency changes are all thanks to him.