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

Duplicati does not start up #3572

Open
roele opened this Issue Dec 30, 2018 · 14 comments

Comments

Projects
None yet
8 participants
@roele
Copy link

roele commented Dec 30, 2018

  • I have searched open and closed issues for duplicates.

Environment info

  • Duplicati version: 2.0.4.5_beta_2018-11-28
  • Operating system: macOS 10.14.2
  • Backend: local

Description

Duplicati does not start up anymore.

Steps to reproduce

  1. Update mono via brew-upgrade to latest version (5.16.0.220)
  2. Try to start Duplicati

Tried re-installing duplicati via brew (brew cask uninstall duplicati && brew cask install duplicati) with no effect.

  • Actual result:
    After clicking the Dupicati app nothing happens, no menu bar icon.
  • Expected result:
    Duplicati starts up and menu bar icon is visible.

Screenshots

Debug log

Duplicati-crashlog.txt

@Pectojin

This comment has been minimized.

Copy link
Member

Pectojin commented Dec 30, 2018

The log claims another instance is running.

Does this issue persist after restarting the machine?

@roele

This comment has been minimized.

Copy link

roele commented Dec 30, 2018

There are no related (Duplicati, mono) processes found in ps -afe and a restart does also not resolve the issue.

@rwoodpecker

This comment has been minimized.

Copy link

rwoodpecker commented Jan 2, 2019

Experiencing the same issue.. mono version 5.18.0.225. Have tried reinstalling mono, reinstalling the latest duplicati beta and rebooting multiple times, but I end up with the same crash log as roele.

@DasenB

This comment has been minimized.

Copy link

DasenB commented Jan 2, 2019

I have the same problem with the same crash.

@idpaterson

This comment has been minimized.

Copy link

idpaterson commented Jan 2, 2019

Same problem and attempts at resolution. Duplicati is no longer running on any of my machines that automatically update from brew and my attempts to start it toss the same crash log.

@DasenB

This comment has been minimized.

Copy link

DasenB commented Jan 3, 2019

I don't know how to fix this problem but as a workaround I decided to run Duplicati in a Docker until a real solution is found.

Here is the docker-compose.yml I am using:

duplicati:
    image: duplicati/duplicati
    restart: always
    volumes:
        - /Users/USERNAME/:/hostData
        - ./config:/data
    ports:
        - 127.0.0.1:8200:8200
@Pectojin

This comment has been minimized.

Copy link
Member

Pectojin commented Jan 3, 2019

Installing using the package file from the releases page also works. That's how I'm running it.

I haven't had time to replicate this in brew since I first have to uninstall Duplicati on my macbook.

@roele

This comment has been minimized.

Copy link

roele commented Jan 3, 2019

@Pectojin I assume the packaged version is also broken as it does not come with Mono pre-packaged and a script seems to be downloading the latest stable Mono release on startup if it's not found.

@Pectojin

This comment has been minimized.

Copy link
Member

Pectojin commented Jan 3, 2019

Possibly, I have a non-homebrew Mono version

@BrettDikeman

This comment has been minimized.

Copy link

BrettDikeman commented Jan 8, 2019

I can confirm that 5.18.0.225 breaks the 11-28 beta. For anyone else using Homebrew who had a prior version installed:

  • brew uninstall mono
  • brew link mono

Ie:

$ brew uninstall mono
Uninstalling /usr/local/Cellar/mono/5.18.0.225... (3,810 files, 415.3MB)
mono 5.14.0.177 is still installed.
$ brew link mono
Linking /usr/local/Cellar/mono/5.14.0.177... 234 symlinks created

Here are my error logs:

# /Applications/Duplicati.app/Contents/MacOS/duplicati-server 
Unable to start up, perhaps another process is already running?
Error message: System.InvalidOperationException: object_op ---> System.EntryPointNotFoundException: SystemNative_RealPath
  at (wrapper managed-to-native) Interop+Sys.RealPath(string)
  at System.IO.CoreFX.FileSystemWatcher+RunningInstance.Start () [0x00000] in <783f9ec99b954b3081ca4c67bd3306c7>:0 
  at System.IO.CoreFX.FileSystemWatcher.StartRaisingEvents () [0x00067] in <783f9ec99b954b3081ca4c67bd3306c7>:0 
  at System.IO.CoreFX.FileSystemWatcher.StartRaisingEventsIfNotDisposed () [0x00019] in <783f9ec99b954b3081ca4c67bd3306c7>:0 
  at System.IO.CoreFX.FileSystemWatcher.set_EnableRaisingEvents (System.Boolean value) [0x0001d] in <783f9ec99b954b3081ca4c67bd3306c7>:0 
  at (wrapper remoting-invoke-with-check) System.IO.CoreFX.FileSystemWatcher.set_EnableRaisingEvents(bool)
  at System.IO.CoreFXFileSystemWatcherProxy+<>c.<StartDispatching>b__9_0 (System.IO.CoreFX.FileSystemWatcher internal_fsw, System.IO.FileSystemWatcher fsw) [0x00048] in <783f9ec99b954b3081ca4c67bd3306c7>:0 
  at System.IO.CoreFXFileSystemWatcherProxy.Operation (System.Action`4[T1,T2,T3,T4] map_op, System.Action`2[T1,T2] object_op, System.Object handle, System.Action`2[T1,T2] cancel_op) [0x00184] in <783f9ec99b954b3081ca4c67bd3306c7>:0 
   --- End of inner exception stack trace ---
  at System.IO.CoreFXFileSystemWatcherProxy.Operation (System.Action`4[T1,T2,T3,T4] map_op, System.Action`2[T1,T2] object_op, System.Object handle, System.Action`2[T1,T2] cancel_op) [0x001a6] in <783f9ec99b954b3081ca4c67bd3306c7>:0 
  at System.IO.CoreFXFileSystemWatcherProxy.StartDispatching (System.Object handle) [0x00004] in <783f9ec99b954b3081ca4c67bd3306c7>:0 
  at System.IO.FileSystemWatcher.Start () [0x0001b] in <783f9ec99b954b3081ca4c67bd3306c7>:0 
  at System.IO.FileSystemWatcher.set_EnableRaisingEvents (System.Boolean value) [0x0003d] in <783f9ec99b954b3081ca4c67bd3306c7>:0 
  at (wrapper remoting-invoke-with-check) System.IO.FileSystemWatcher.set_EnableRaisingEvents(bool)
  at Duplicati.Server.SingleInstance..ctor (System.String basefolder) [0x000ee] in <fe28905ee30b422e8d475f1cfdb85515>:0 
  at Duplicati.Server.Program.RealMain (System.String[] _args) [0x00307] in <fe28905ee30b422e8d475f1cfdb85515>:0 
@BrettDikeman

This comment has been minimized.

Copy link

BrettDikeman commented Jan 8, 2019

Possibly related? mono/mono#11832

What Mono framework is Duplicati built against? Modern, or Full?

@kenkendk

This comment has been minimized.

Copy link
Member

kenkendk commented Jan 9, 2019

Possibly related? mono/mono#11832

Yes, I think this is a Mono bug. The error message indicates that Duplicati can somehow not read or write a file in ~/.config/Duplicati/control_dir_v2, which is how the multi-instance detection is done. The stack trace shows that this happens inside the FileSystemWatcher class, and looks to me like it is calling a method in a native library that has been removed.

What Mono framework is Duplicati built against? Modern, or Full?

I currently use Mono version 5.16.0.221 for the build, running on MacOS. IIRC, Visual Studio for Mac will install updates to Mono from time to time, but it has not yet installed 5.18 for me.

@kachkaev

This comment has been minimized.

Copy link

kachkaev commented Jan 9, 2019

I also noticed that Duplicati stopped working on my machine and a short investigation brought me to this issue. Opening the app was bringing out a macOS window saying The application “Duplicati.app” can’t be opened.

Because I ran brew cleanup after brew upgrade, I no longer had Mono 1.16 / 1.14, so running brew link mono would not work for me. Because installing a specific version of a Homebrew formulae is a nightmare, here is an alternative workaround:

  1. Get rid of mono 1.18, with which Duplicati does not seem to work: brew uninstall mono
  2. Manually download Mono 1.16 from Visual Studio Channel: https://www.mono-project.com/download/vs/#download-mac
  3. Wait for a ≈300MB download
  4. Double-click on the downloaded pkg and enjoy a setup wizard, which you probably have not seen for ages thanks to Homebrew 😅
  5. CMD+SpaceDuplicatiEnter
@BrettDikeman

This comment has been minimized.

Copy link

BrettDikeman commented Jan 10, 2019

Yes, I think this is a Mono bug. The error message indicates that Duplicati can somehow not read or write a file in ~/.config/Duplicati/control_dir_v2, which is how the multi-instance detection is done. The stack trace shows that this happens inside the FileSystemWatcher class, and looks to me like it is calling a method in a native library that has been removed..

That was my read as well, but I know very little about Mono so I was holding back on saying anything.

What Mono framework is Duplicati built against? Modern, or Full?

I currently use Mono version 5.16.0.221 for the build, running on MacOS. IIRC, Visual Studio for Mac will install updates to Mono from time to time, but it has not yet installed 5.18 for me.

Ah- to clarify, the question was what target you set when you build a release for OS X:

https://docs.microsoft.com/en-us/xamarin/mac/platform/target-framework

https://medium.com/@donblas/a-history-lesson-on-the-xamarin-mac-target-frameworks-and-their-new-names-473d2731d887

In the bug I cited, Vincent seemed to imply that Modern never supported System.IO.FileSystemWatcher and they're going to work on adding it. Assuming that's correct, Duplicati wouldn't be useable if targeting Modern...so I think the question is still what target is used for building Duplicati releases, and did it change? Was it targeting Full, and accidentally changed to Modern?

Apologies if I have things muddled - I know very little about .NET and mono.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment