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 · 13 comments

Comments

Projects
None yet
6 participants
@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

This comment has been minimized.

Copy link
Member

HebaruSan commented Dec 31, 2018

What was updated by the "brew upgrade" command?

@grahamj1978

This comment has been minimized.

Copy link

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.

@HebaruSan

This comment has been minimized.

Copy link
Member

HebaruSan commented Dec 31, 2018

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

@CraigCottingham

This comment has been minimized.

Copy link

CraigCottingham commented Dec 31, 2018

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.

@CraigCottingham

This comment has been minimized.

Copy link

CraigCottingham 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

This comment has been minimized.

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

This comment has been minimized.

@DasSkelett

This comment has been minimized.

Copy link
Contributor

DasSkelett commented Dec 31, 2018

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

@HebaruSan

This comment has been minimized.

Copy link
Member

HebaruSan commented Dec 31, 2018

Check out mono/mono#9576 though. Same exception and call stack.
They fixed it with xamarin/xamarin-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

This comment has been minimized.

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

This comment has been minimized.

Copy link

grahamj1978 commented Jan 2, 2019

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

This comment has been minimized.

Copy link
Member

HebaruSan commented Jan 5, 2019

@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

@grahamj1978 grahamj1978 referenced this issue Jan 9, 2019

Open

Possible issue with mono formula #35848

0 of 1 task complete
@netkan-bot

This comment has been minimized.

Copy link
Member

netkan-bot commented Jan 16, 2019

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!

@netkan-bot netkan-bot closed this Jan 16, 2019

@HebaruSan HebaruSan unpinned this issue Jan 16, 2019

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