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 GUI not appearing on mac OS #1844

Closed
kristvanbesien opened this issue Jul 27, 2016 · 39 comments
Closed

CKAN GUI not appearing on mac OS #1844

kristvanbesien opened this issue Jul 27, 2016 · 39 comments
Assignees
Labels
macOS Issues specific for macOS

Comments

@kristvanbesien
Copy link

Thanks for wanting to bring an issue to our attention!

Before you open a ticket, please do a quick search of the existing issues to see if it's already been brought up.

CKAN Version:
v1.18.1-0-g0d2c4f0 (beta)

Operating System:
OS X 10.11.6 (15G31)

The issue you are experiencing:
GUI is not appearing. Commands like ckan help, ckan list etc. work. But "ckan gui" or just "ckan" does not lead to a gui appearing...
What does appear is a blank "mono" labeled on the task bar. Right clicking on that shows that the application is not responding.

How to recreate this issue:
Install altest mono. Install ckan. Run ckan

CKAN error codes (if applicable):

@politas
Copy link
Member

politas commented Jul 28, 2016

What is your Mono version?

@ayan4m1
Copy link
Contributor

ayan4m1 commented Aug 2, 2016

Looks like El Cap (OSX 10.11) also broke a few Mono/Darwin base things that might affect this.

http://mono.1490590.n4.nabble.com/Mono-for-El-Capitan-OS-X-10-11-preview-package-now-available-td4666401.html

@politas politas added Support Issues that are support requests macOS Issues specific for macOS labels Aug 2, 2016
@politas
Copy link
Member

politas commented Aug 5, 2016

Ref #1840

@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!

@pjf pjf removed the Support Issues that are support requests label Aug 13, 2016
@fizker
Copy link

fizker commented Aug 18, 2016

I currently have the same issue, with the same version of OS X (10.11.6 (15G31)) and CKAN (v1.18.1-0-g0d2c4f0). The issue exists in both Mono 4.2.1 (from the link in your OS X install guide) and 4.4.2 (latest version from http://www.mono-project.com)

Output from mono --version:

  • Mono JIT compiler version 4.2.1 (explicit/6dd2d0d Tue Nov 10 18:01:18 EST 2015)
  • Mono JIT compiler version 4.4.2 (mono-4.4.0-branch-c7sr1/f72fe45 Wed Jul 27 16:20:13 EDT 2016)

@100ideas
Copy link

Me too. Here're the last few lines of output from mono 4.2.1 (32-bit) in verbose mode, after which it appears to hang:

converting method System.Windows.Forms.FormCollection:Remove (System.Windows.Forms.Form)
Method System.Windows.Forms.FormCollection:Remove (System.Windows.Forms.Form) emitted at 0x969f300 to 0x969f328 (code length 40) [ckan.exe]
^C⏎

And from mono 4.6.0 (32-bit) in verbose mode:

converting method void System.Windows.Forms.FormCollection:Remove (System.Windows.Forms.Form)
Method void System.Windows.Forms.FormCollection:Remove (System.Windows.Forms.Form) emitted at 0x93eb450 to 0x93eb478 (code length 40) [ckan.exe] with opts peephole,branch,inline,cfold,consprop,copyprop,deadce,linears,cmov,intrins,loop,fcmov,aot,exception,sse2,gshared,simd,alias-analysis
^C⏎

And here's some exceptions reported by mono (more info here):

$ mono --trace=N:nothing ckan.exe gui -v 

251 [1] INFO CKAN.CmdLine.MainClass (null) - Verbose logging enabled
[0xa3878000:] EXCEPTION handling: System.UnauthorizedAccessException: Access to the path "/Library/Frameworks/Mono.framework/Versions/4.6.0/etc/mono/registry/last-btime" is denied.
[0xa3878000:] EXCEPTION handling: System.IO.FileNotFoundException: Could not load file or assembly 'UIAutomationWinforms, Version=1.0.0.0, Culture=neutral, PublicKeyToken=f4ceacb585d99812' or one of its dependencies
550 [1] INFO CKAN.Main (null) - Starting the GUI
[0xa3878000:] EXCEPTION handling: System.IO.FileNotFoundException: Could not load file or assembly 'ckan.XmlSerializers' or one of its dependencies
[0xa3878000:] EXCEPTION handling: System.IO.FileNotFoundException: Could not find file "/Users/100ideas/.mono/mwf_config".
[0xa3878000:] EXCEPTION handling: System.IO.FileNotFoundException: Could not find file "/Users/100ideas/.mono/mwf_config".

@100ideas
Copy link

Made some progress tracking down this bug.

Something is wrong with the way the auto-update config option or dialog window works in GUI/Main.cs#L289. The ckan application loads as expected when the if (!configuration.CheckForUpdatesOnLaunchNoNag) condition statement is skipped:

//if (!configuration.CheckForUpdatesOnLaunchNoNag)
if (false)
{
    log.Debug("Asking user if they wish for autoupdates");
    if (new AskUserForAutoUpdatesDialog().ShowDialog() == DialogResult.OK)
    {
        configuration.CheckForUpdatesOnLaunch = true;
    }

    configuration.CheckForUpdatesOnLaunchNoNag = true;
    configuration.Save();
}

I haven't had time to figure out the deeper cause of the problem, will be back if I have time later.

Ping #1501

@politas
Copy link
Member

politas commented Sep 24, 2016

Reopening due to progress. Thanks for looking into this for us, @100ideas!

@politas politas reopened this Sep 24, 2016
@100ideas
Copy link

I haven't had time to explore the issue further, sorry guys! I could submit a PR that disables the auto-update dialog window during launch if the OSX is detected... otherwise I might have time to look further in a week or two.

@rgioai
Copy link

rgioai commented Oct 13, 2016

Thanks @100ideas for the fix, worked great for me.
I'll leave my fork open with the fix for anyone that wants it:
https://github.com/gioGats/CKAN/

@huslage
Copy link

huslage commented Nov 2, 2016

@gioGats can you submit a PR here?

@ayan4m1
Copy link
Contributor

ayan4m1 commented Nov 2, 2016

Sorry, I took a look at this commit and while I am sure we can use it to fix the problem properly, if (false) doesn't make too much sense and likely has unintended side effects. Thanks @gioGats for writing it up! I will take this over, but your Macs will have to serve as my testbed unless one of the other devs happens to have one. My quick search tells me I can't legally buy OS X and run it in a virtualization environment, so 🍭.

@ayan4m1 ayan4m1 self-assigned this Nov 2, 2016
@ayan4m1
Copy link
Contributor

ayan4m1 commented Nov 2, 2016

Initial results - that form is the only place we used FormBorderStyle.FixedToolWindow - guess what has issues related to Mono on Macs...?

There are still plenty of other potential causes, but my current hypothesis is ayan4m1@4c0cf37

@huslage
Copy link

huslage commented Nov 2, 2016

Happy to help test.
On Tue, Nov 1, 2016 at 10:06 PM ayan4m1 notifications@github.com wrote:

Initial results - that form is the only place we used
FormBorderStyle.FixedToolWindow - guess what has issues
http://stackoverflow.com/questions/8593379/why-does-showdialog-crash-in-monodevelop
related to Mono on Macs...?

ayan4m1/CKAN@4c0cf37
ayan4m1@4c0cf37


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#1844 (comment), or mute
the thread
https://github.com/notifications/unsubscribe-auth/AAZQq3tCLAl1UGCklLy6TyWmMbUHiK90ks5q5_ArgaJpZM4JWcsh
.

@100ideas
Copy link

100ideas commented Nov 4, 2016

me too

@Sparkly-Panda
Copy link

I found that running ckan, even without the gui, and opening kip thru steam still applies the mods but you can't change them

@politas
Copy link
Member

politas commented Nov 27, 2016

If any MacOS users would like to join the CKAN project as in-house MacOS CKAN testers, I'd be very happy to have a MacOS-testers group we can ping

@ProfFan
Copy link
Member

ProfFan commented Dec 26, 2016

+1 for MacOS Tester

@politas
Copy link
Member

politas commented Dec 27, 2016

Thanks, @ProfFan , I've sent you an invite. @huslage, @100ideas, would you like invites, too?

@leo-hotto-ko
Copy link

hello, i've been stuck for days impossible to lauch the Ckan GUI after try everything i must have miss something i beg for help i can't play my favorite game and after a day of hardwork it's frustrating for a newbie like me to dive in terminal and mono problems that where i don't understand shit ...
i never had a problem like this before, since el capitain it's driving me mad

@leo-hotto-ko
Copy link

Last login: Fri Jan 6 14:54:30 on ttys000
iMac-de-marion:~ marion$ cd downloads
iMac-de-marion:downloads marion$ mono ckan.exe
WARNING: The Carbon driver has not been ported to 64bits, and very few parts of Windows.Forms will work properly, or at all
exception inside UnhandledException handler: Object reference not set to an instance of an object

[ERROR] FATAL UNHANDLED EXCEPTION: System.TypeInitializationException: The type initializer for 'System.Windows.Forms.WindowsFormsSynchronizationContext' threw an exception. ---> System.TypeInitializationException: The type initializer for 'System.Windows.Forms.ThemeEngine' threw an exception. ---> System.TypeInitializationException: The type initializer for 'System.Windows.Forms.ThemeWin32Classic' threw an exception. ---> System.TypeInitializationException: The type initializer for 'System.Drawing.KnownColors' threw an exception. ---> System.TypeInitializationException: The type initializer for 'System.Drawing.GDIPlus' threw an exception. ---> System.DllNotFoundException: libgdiplus.dylib
at (wrapper managed-to-native) System.Drawing.GDIPlus:GdiplusStartup (ulong&,System.Drawing.GdiplusStartupInput&,System.Drawing.GdiplusStartupOutput&)
at System.Drawing.GDIPlus..cctor () [0x000cc] in <1917aa1c39d94b1a91807b8cd9f03350>:0
--- End of inner exception stack trace ---
at System.Drawing.KnownColors..cctor () [0x0001a] in <1917aa1c39d94b1a91807b8cd9f03350>:0
--- End of inner exception stack trace ---
at System.Drawing.Color.get_Black () [0x00000] in <1917aa1c39d94b1a91807b8cd9f03350>:0
at System.Windows.Forms.ThemeWin32Classic..cctor () [0x00000] in :0
--- End of inner exception stack trace ---
at System.Windows.Forms.ThemeVisualStyles..ctor () [0x00000] in :0
at System.Windows.Forms.ThemeEngine..cctor () [0x0002d] in :0
--- End of inner exception stack trace ---
at System.Windows.Forms.SystemInformation.get_MenuAccessKeysUnderlined () [0x00000] in :0
at System.Windows.Forms.Control..ctor () [0x000ea] in :0
at (wrapper remoting-invoke-with-check) System.Windows.Forms.Control:.ctor ()
at System.Windows.Forms.WindowsFormsSynchronizationContext..cctor () [0x00000] in :0
--- End of inner exception stack trace ---
at System.Windows.Forms.Control..ctor () [0x00014] in :0
at System.Windows.Forms.ScrollableControl..ctor () [0x00000] in :0
at System.Windows.Forms.ContainerControl..ctor () [0x0000e] in :0
at System.Windows.Forms.Form..ctor () [0x00012] in :0
at CKAN.Main..ctor (System.String[] cmdlineArgs, CKAN.GUIUser user, System.Boolean showConsole) [0x00024] in :0
at (wrapper remoting-invoke-with-check) CKAN.Main:.ctor (string[],CKAN.GUIUser,bool)
at CKAN.GUI.Main_ (System.String[] args, System.Boolean showConsole) [0x00057] in :0
at CKAN.CmdLine.MainClass.Gui (CKAN.CmdLine.GuiOptions options, System.String[] args) [0x00008] in :0
at CKAN.CmdLine.MainClass.Main (System.String[] args) [0x000a1] in :0
iMac-de-marion:downloads marion$

@rwanyoike
Copy link

rwanyoike commented Jan 6, 2017

@leo-hotto-ko maybe this will help:

I'm running macOS Sierra 10.12.2. All I did was run:

$ brew cask install mono-mdk

in the terminal, and ckan.exe works. What is brew? See http://brew.sh/ and https://caskroom.github.io/. It's simple to setup, give it a shot. Good luck!

For reference, I have this version of mono-mdk:

$ brew cask info mono-mdk
mono-mdk: 4.6.2.16

And ckan.exe:

$ mono ckan.exe version
v1.20.1-0-gd41fe54 (beta)

@leo-hotto-ko
Copy link

thank you for u'r quick awser i try that right away, sorry for my english not my native language ^^

@leo-hotto-ko
Copy link

Ok i install homebrew via terminal. Do i need to unistall my previous version of mono (4.6.1) it's a little bit advance for me one or two command line would help --"

@leo-hotto-ko
Copy link

and i don't understand the "cask" thing ..

@rwanyoike
Copy link

Yes uninstall your previous version of mono (4.6.1) http://www.mono-project.com/docs/about-mono/supported-platforms/osx/#uninstalling-mono-on-mac-os-x.

This is an example of what you'd run:

Install brew (from http://brew.sh/):

$ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

Install brew cask (from https://caskroom.github.io/):

$ brew tap caskroom/cask

Install mono-mdk

$ brew cask install mono-mdk

🍻

@leo-hotto-ko
Copy link

ok guys u are indeed quite amazing ^^ all look to be install, do i need a different comand line for running ckan.exe ? ( cd Downloads mono ckan.exe) ?

@leo-hotto-ko
Copy link

i'm afraid to try anything now XD rwanyoike u rule boy a big TY for u'r precious help

@rwanyoike
Copy link

@leo-hotto-ko no different command. https://github.com/KSP-CKAN/CKAN/wiki/Installing-CKAN-on-OSX:

$ cd ~/Downloads
$ mono ckan.exe

@leo-hotto-ko
Copy link

arg still the same --"

WARNING: The Carbon driver has not been ported to 64bits, and very few parts of Windows.Forms will work properly, or at all
exception inside UnhandledException handler: Object reference not set to an instance of an object

[ERROR] FATAL UNHANDLED EXCEPTION: System.TypeInitializationException: The type initializer for 'System.Windows.Forms.WindowsFormsSynchronizationContext' threw an exception. ---> System.TypeInitializationException: The type initializer for 'System.Windows.Forms.ThemeEngine' threw an exception. ---> System.TypeInitializationException: The type initializer for 'System.Windows.Forms.ThemeWin32Classic' threw an exception. ---> System.TypeInitializationException: The type initializer for 'System.Drawing.KnownColors' threw an exception. ---> System.TypeInitializationException: The type initializer for 'System.Drawing.GDIPlus' threw an exception. ---> System.DllNotFoundException: libgdiplus.dylib
at (wrapper managed-to-native) System.Drawing.GDIPlus:GdiplusStartup (ulong&,System.Drawing.GdiplusStartupInput&,System.Drawing.GdiplusStartupOutput&)
at System.Drawing.GDIPlus..cctor () [0x000cc] in <1917aa1c39d94b1a91807b8cd9f03350>:0
--- End of inner exception stack trace ---
at System.Drawing.KnownColors..cctor () [0x0001a] in <1917aa1c39d94b1a91807b8cd9f03350>:0
--- End of inner exception stack trace ---
at System.Drawing.Color.get_Black () [0x00000] in <1917aa1c39d94b1a91807b8cd9f03350>:0
at System.Windows.Forms.ThemeWin32Classic..cctor () [0x00000] in :0
--- End of inner exception stack trace ---
at System.Windows.Forms.ThemeVisualStyles..ctor () [0x00000] in :0
at System.Windows.Forms.ThemeEngine..cctor () [0x0002d] in :0
--- End of inner exception stack trace ---
at System.Windows.Forms.SystemInformation.get_MenuAccessKeysUnderlined () [0x00000] in :0
at System.Windows.Forms.Control..ctor () [0x000ea] in :0
at (wrapper remoting-invoke-with-check) System.Windows.Forms.Control:.ctor ()
at System.Windows.Forms.WindowsFormsSynchronizationContext..cctor () [0x00000] in :0
--- End of inner exception stack trace ---
at System.Windows.Forms.Control..ctor () [0x00014] in :0
at System.Windows.Forms.ScrollableControl..ctor () [0x00000] in :0
at System.Windows.Forms.ContainerControl..ctor () [0x0000e] in :0
at System.Windows.Forms.Form..ctor () [0x00012] in :0
at CKAN.Main..ctor (System.String[] cmdlineArgs, CKAN.GUIUser user, System.Boolean showConsole) [0x00024] in :0
at (wrapper remoting-invoke-with-check) CKAN.Main:.ctor (string[],CKAN.GUIUser,bool)
at CKAN.GUI.Main_ (System.String[] args, System.Boolean showConsole) [0x00057] in :0
at CKAN.CmdLine.MainClass.Gui (CKAN.CmdLine.GuiOptions options, System.String[] args) [0x00008] in :0
at CKAN.CmdLine.MainClass.Main (System.String[] args) [0x000a1] in :0
iMac-de-marion:Downloads marion$

@rwanyoike
Copy link

rwanyoike commented Jan 6, 2017

@leo-hotto-ko what does this command show for you:

$ mono --version

And you have the latest ckan.exe?

@leo-hotto-ko
Copy link

Last login: Fri Jan 6 15:38:18 on ttys000
iMac-de-marion:~ marion$ mono --version
Mono JIT compiler version 4.6.2 (Stable 4.6.2.7/08fd525 Tue Nov 22 22:05:58 GMT 2016)
Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
TLS: normal
SIGSEGV: altstack
Notification: kqueue
Architecture: amd64
Disabled: none
Misc: softdebug
LLVM: supported, not enabled.
GC: sgen
iMac-de-marion:~ marion$

Ckan V1.22.1 latest i think

@rwanyoike
Copy link

@leo-hotto-ko can you visit https://tlk.io/mono

@100ideas
Copy link

@politas pleased to help out w/ mac dev testing

@politas
Copy link
Member

politas commented Jan 13, 2017

@100ideas , I've sent you an invite. Thanks!

@mnewt
Copy link

mnewt commented Jun 18, 2017

@politas If you still need macOS testers, I'm willing and able depending on what you want a tester to do. I don't know C# but I do IT and development professionally so I can do QA.

Currently experiencing this issue. That is, ckan command line functions work fine but the gui crashes with an exception in System.Windows.Forms.WindowsFormsSynchronizationContext. Cheers.

@AdamLenda
Copy link

rwanyoike comment on Jan 6 worked for me, though I did have to remove all versions of CKan and then rerun brew install ckan

@ayan4m1
Copy link
Contributor

ayan4m1 commented Sep 28, 2017

I am fairly confident that this long issue history is actually multiple different problems manifesting in the same way. I think they can all be traced back to Mono or OS X and not to a defect in CKAN. @politas mind chiming in? I know multiple people have offered to help with testing but I am not sure what to give them to test.

@politas
Copy link
Member

politas commented Oct 14, 2017

Yeah, lets close this off with a request for anyone still having problems to check the CKAN on OSX page and open a new issue if problems still occur.

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

No branches or pull requests