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

CKAN will not launch on MacOSX installed from Homebrew #2630

Closed
grahamj1978 opened this issue Dec 31, 2018 · 21 comments
Closed

CKAN will not launch on MacOSX installed from Homebrew #2630

grahamj1978 opened this issue Dec 31, 2018 · 21 comments
Labels
macOS Issues specific for macOS Mono Issues specific for Mono Support Issues that are support requests

Comments

@grahamj1978
Copy link

grahamj1978 commented Dec 31, 2018

Background

CKAN Version:
1.25.4

Mono Version:
5.16.0.220

KSP Version:
1.6.0

Operating System:
OS X 10.13.6 (High Sierra)

Have you made any manual changes to your GameData folder (i.e., not via CKAN)?
No, just ran 'brew upgrade,' as I planned to check for updated KSP add-ons for the 1.6 update.

Problem

What steps did you take in CKAN?
None, tried starting it from the command line via 'ckan consoleui'

What did you expect to happen?
The ckan console UI would start

What happened instead?
received an unhandled exception error

Screenshots:

errorscreenshot

CKAN error codes (if applicable):

Unhandled Exception:
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]

(and so on)

@HebaruSan HebaruSan added macOS Issues specific for macOS Mono Issues specific for Mono labels Dec 31, 2018
@HebaruSan
Copy link
Member

What was updated by the "brew upgrade" command?

@HebaruSan HebaruSan added Support Issues that are support requests Needs more info We need more info labels Dec 31, 2018
@grahamj1978
Copy link
Author

grahamj1978 commented Dec 31, 2018

To clarify, on the Mac, ckan (and its dependency mono) is typically installed via brew (also known as Homebrew, a Mac package management system). The 'brew upgrade' command simultaneously updates the homebrew installation and any outdated packages.

Sorry, something went wrong.

@HebaruSan
Copy link
Member

Right. Can you report what changed when you ran that command this time? That appears to be key to the problem you're having.

Sorry, something went wrong.

@krisalyssa
Copy link

It appears that the mono formula updated from 5.14.0.177 to 5.16.0.220. I'm trying to hack the formula locally to install the older version of mono to see if that fixes the problem.

Sorry, something went wrong.

@krisalyssa
Copy link

krisalyssa commented Dec 31, 2018

Okay, I have a (temporary) fix. Warning: it's not pretty.

Please do not follow these instructions unless you understand what each one does or you're willing to deal with a broken CKAN/Mono/Homebrew install if something goes wrong.

  1. Uninstall ckan and mono from Homebrew.
  2. Make sure your Homebrew install is up to date with brew update.
  3. Run brew edit mono.
  4. Change the url, sha256, and bottle lines to look like
  url "https://download.mono-project.com/sources/mono/mono-5.14.0.177.tar.bz2"
  sha256 "d4f5fa2e8188d66fbc8054f4145711e45c1faa6d070e63600efab93d1d189498"

  bottle do
    sha256 "f31bcdbf40da4f3160c6257e62532e82fda34f00e8170424d85b3737cc166c74" => :mojave
    sha256 "32a208795022a8aa55c86c4f77aca63725d9fe957998c160e43b9048898ce2fa" => :high_sierra
    sha256 "5b881b5ed9b9fdcef2003dc6f525887f27df2278349644dc8ba446ea4a1b62e5" => :sierra
    sha256 "22551363ddcd90271af6bac89055ea7bfdf0647455b9ea0be355649dfc6e6e9a" => :el_capitan
  end
  1. Run brew install mono. You should see Mono 5.14.0.177 being installed.
  2. Run brew install ckan. You should see CKAN 1.25.4 being installed.
  3. Run ckan consoleui. You should be golden.

As far as I can tell, these changes to the mono formula will remain even after running brew update in the future, so you'll probably want to undo them at some point in the future. How one does that, I don't currently know.

@HebaruSan
Copy link
Member

HebaruSan commented Dec 31, 2018

Thanks, that's good to know. This error is saying that Mono can't find some code in the OS that it expects to be there, which isn't something CKAN could cause or fix. It's possible that brew messed up the packaging somehow, or it's possible there's a bug in Mono 5.16.

You might try installing Mono 5.16 without brew, but I know that might be inconvenient.
If that solves it, this should be reported to the Homebrew team.
Otherwise this should be reported to the Mono team.

@HebaruSan
Copy link
Member

@DasSkelett
Copy link
Member

mono/mono#8712
looks kinda related on a first glance, this was in the changelog of mono 5.16 and affects Mac.

@HebaruSan
Copy link
Member

Check out mono/mono#9576 though. Same exception and call stack.
They fixed it with dotnet/macios#4447, "Include libmono-system-native on Xamarin.Mac", in July of this year.

@grahamj1978, does brew have a libmono-system-native package? Maybe they split that into a separate install in Mono 5.16.

@gullevek
Copy link

gullevek commented Jan 2, 2019

The easiest and quickest way might be uninstall the brew one and install the one from the official homepage: https://www.mono-project.com/download/stable/

This worked for me.

@grahamj1978
Copy link
Author

I might just give the package install a try. Brew now has mono 5.18.0.225, but it doesn't seem to resolve the issue (same error).

@HebaruSan, I don't see a libmono package using the 'brew info' command, so I so assume not. The only 'mono' package it can fine in the mono install itself.

@HebaruSan
Copy link
Member

@grahamj1978 or @CraigCottingham or @gullevek , would one of you be willing to volunteer to please report this to Homebrew? I don't have a Mac and would not be able to answer clarifying questions or test their fixes.

@HebaruSan HebaruSan pinned this issue Jan 5, 2019
@HebaruSan HebaruSan changed the title CKAN will not launch CKAN will not launch on MacOSX Jan 5, 2019
@HebaruSan HebaruSan changed the title CKAN will not launch on MacOSX CKAN will not launch on MacOSX installed from Homebrew Jan 5, 2019
@HebaruSan HebaruSan added Support Issues that are support requests and removed Needs more info We need more info Support Issues that are support requests labels Jan 5, 2019
@netkan-bot
Copy link
Member

Hey there! I'm a fun-loving automated bot who's responsible for making sure old support tickets get closed out. As we haven't seen any activity on this ticket for a while, we're hoping the problem has been resolved and I'm closing out the ticket automaically. If I'm doing this in error, please add a comment to this ticket to let us know, and we'll re-open it!

@HebaruSan HebaruSan unpinned this issue Jan 16, 2019
@SeanSith
Copy link

I was able to do a brew uninstall --ignore-dependencies mono and brew cask install mono-mdk and ckan is functional with ckan consoleui and other text-only commands.

@HebaruSan
Copy link
Member

If anyone does decide to take this to the Homebrew team, it looks like the cause may be that libmono-system-native is missing. A similar thing happened in #2664, and that's how Debian is planning to fix it.

@HebaruSan
Copy link
Member

Quoth the Homebrew folks:

  • "This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs."
  • "None of the maintainers are working on this"
  • "all packages are the responsibility of the public"

Conclusion, Homebrew isn't a reliable way to install software. They don't investigate or fix problems; users are expected to do that for themselves.

I've hidden the Homebrew instructions on the CKAN wiki's OSX page, and any further CKAN issues mentioning Homebrew will be summarily closed.

@HebaruSan HebaruSan reopened this Feb 18, 2019
@HebaruSan
Copy link
Member

Update, the Homebrew devs have closed the issue without fixing or even investigating it. They apparently do not care about problems in their distribution system that result in broken software for users. Frankly I'd see that as a reason to never use Homebrew for anything, not just CKAN.

@krisalyssa
Copy link

In defense of the Homebrew maintainers, this wasn't an issue with Homebrew as much as it was with the Mono formula for Homebrew, and the maintainer(s) for that aren't necessarily the same as the Homebrew maintainers. Whether or not this issue was passed on to the Mono maintainers, I don't know. That might have been our (read "my") responsibility.

I don't want to get into a debate over the merits and demerits of Homebrew. If it works for you, great; if it doesn't, that's fine too. If the official position of CKAN is that Homebrew should not be used to install CKAN, I won't object.

@HebaruSan
Copy link
Member

I'm not sure CKAN can (or should) have an official position, but we ought to avoid steering users toward a solution that we know in advance won't work in our documentation, at least. And I thought they said that formulas don't have specific maintainers to whom such issues could be passed on. So if/when issues like this do arise, we're depending on Joe Random User to donate the hours and expertise to figure it out.

Agreed that folks should use what works for them and not what doesn't, but I wonder how many of the users who think that Homebrew works for them are aware that packages can break and stay broken with no process for getting a fix (or even continuing to track the fact that they are broken!).

I wonder what they'll do if another user reports this. Close it as a duplicate of a closed and unfixed issue?

@Amorymeltzer
Copy link

@HebaruSan I've only just started with CKAN today (been away from KSP for a few years), but is there a reason using homebrew-cask wouldn't work for folks? I'm a big fan of cask for any macOS app I can use it for, and both ckan and mono-mdk (listed as a dependency in the ckan cask file) are part of hbc. I gave it (brew cask install ckan) a whirl today (on El Capitan, inre #1501) and see no issues yet. Shouldn't need to muck about with brew.

@HebaruSan
Copy link
Member

@Amorymeltzer, your timing is impeccable, @alebcay fixed the mono formula just days ago in Homebrew/homebrew-core#41728. So it works for now (probably).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
macOS Issues specific for macOS Mono Issues specific for Mono Support Issues that are support requests
Projects
None yet
Development

No branches or pull requests

8 participants