CKAN Version:
1.24.0
KSP Version:
1.3.1
Operating System:
OSX High Sierra Version 10.13.3
Have you made any manual changes to your GameData folder (i.e., not via CKAN)?
Yes but irrelevant
What steps did you take in CKAN?
I opened it
I attempted to install Roverdude's Orion Drive mod and USI tools.
What did you expect to happen?
I expected the mod to download properly.
What happened instead?
It did not download due to an SSL error
, an error saying
_Error in auto-updating
Error: SecureChannelFailure (The authentication or decryption has failed.)_
popped up, and I clicked dismiss. The application opened normally.
When it downloaded it failed due to "Oh no! Our download failed with a certificate error!" then pointed me towards the wiki page on SSL errors that was not helpfu
Screenshots:
Unnecessary
CKAN error codes (if applicable):
Was there any additional information in the popup, such as a stack trace?
The first popup? No. The error log also didn’t have any
And you tried all of the steps on the wiki, including running cert-sync?
how do i run that on a mac?
Presumably from Terminal, but I don't have one to test. OSX uses Mono just like Linux, so some variant of those commands might help.
Further questions:
Previous release worked before the meltdown. I use the CKAN.app I have mono 4.8 because anything higher throws the carbon 64bit error
Looks like that version of Mono requires an environment variable to be set to allow TLS 1.2:
http://www.mono-project.com/docs/about-mono/releases/4.8.0/
TLS 1.2 Support
Mono now ships with TLS 1.2, powered by Google’s BoringSSL project. (*)To use it, you must set the environment variable MONO_TLS_PROVIDER to the value “btls”, like this:
export MONO_TLS_PROVIDER=btls
Can you try that?
Nope. Did nothing
OK, you might have to try Mono 5. We have reports of this problem being solved on Linux by upgrading Mono. If you explain what you mean by the carbon 64bit error, maybe we can solve it or work around it.
I'm getting this on Windows too with version 1.24.0-PRE. This is almost certainly due to GitHub removing support for LTSv1/TLSv1.1, diffie-hellman-group1-sha and diffie-hellman-group14-sha1 since these parts of ssl are considered insecure.
Yup, see #2293, install https://github.com/KSP-CKAN/CKAN/releases/latest
so @HebaruSan Should I nake a new issue or no? (for Mono v5)
Here is the error that is created when I run CKAN with Mono 5 latest ver.
Click to expand
BLEEPs-MacBook-Pro:~ BLEEP$ cd "$(mdfind ckan.app)"
BLEEPs-MacBook-Pro:CKAN.app BLEEP$ mono Contents/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
Stacktrace:
at
at (wrapper managed-to-native) System.Windows.Forms.XplatUICarbon.CGDisplayBounds (intptr) [0x00002] in <1141838629e74c21a3b96d0a06337bad>:0
at System.Windows.Forms.XplatUICarbon.get_WorkingArea () [0x00005] in <1141838629e74c21a3b96d0a06337bad>:0
at System.Windows.Forms.XplatUICarbon.get_VirtualScreen () [0x00000] in <1141838629e74c21a3b96d0a06337bad>:0
at System.Windows.Forms.XplatUI.get_VirtualScreen () [0x00000] in <1141838629e74c21a3b96d0a06337bad>:0
at System.Windows.Forms.Screen..cctor () [0x00034] in <1141838629e74c21a3b96d0a06337bad>:0
at (wrapper runtime-invoke) object.runtime_invoke_void (object,intptr,intptr,intptr) [0x0001e] in
at
at System.Windows.Forms.Form.get_CreateParams () [0x00157] in <1141838629e74c21a3b96d0a06337bad>:0
at System.Windows.Forms.CommonDialog/DialogForm.get_CreateParams () [0x00000] in <1141838629e74c21a3b96d0a06337bad>:0
at System.Windows.Forms.Form.SetClientSizeCore (int,int) [0x000af] in <1141838629e74c21a3b96d0a06337bad>:0
at System.Windows.Forms.Control.set_ClientSize (System.Drawing.Size) [0x0000f] in <1141838629e74c21a3b96d0a06337bad>:0
at System.Windows.Forms.Form.set_ClientSize (System.Drawing.Size) [0x00007] in <1141838629e74c21a3b96d0a06337bad>:0
at (wrapper remoting-invoke-with-check) System.Windows.Forms.Form.set_ClientSize (System.Drawing.Size) [0x00032] in <1141838629e74c21a3b96d0a06337bad>:0
at System.Windows.Forms.FileDialog..ctor () [0x00954] in <1141838629e74c21a3b96d0a06337bad>:0
at System.Windows.Forms.OpenFileDialog..ctor () [0x00000] in <1141838629e74c21a3b96d0a06337bad>:0
at (wrapper remoting-invoke-with-check) System.Windows.Forms.OpenFileDialog..ctor () [0x00018] in <1141838629e74c21a3b96d0a06337bad>:0
at CKAN.PluginsDialog..ctor () [0x00000] in <74d9e06aaf404eea9cd8286643721e98>:0
at (wrapper runtime-invoke) object.runtime_invoke_void__this__ (object,intptr,intptr,intptr) [0x0004d] in
at
at (wrapper managed-to-native) System.Reflection.MonoCMethod.InternalInvoke (System.Reflection.MonoCMethod,object,object[],System.Exception&) [0x0000c] in
at System.Reflection.MonoCMethod.InternalInvoke (object,object[]) [0x00002] in
at System.RuntimeType.CreateInstanceMono (bool) [0x000a8] in
at System.RuntimeType.CreateInstanceSlow (bool,bool,bool,System.Threading.StackCrawlMark&) [0x00009] in
at System.RuntimeType.CreateInstanceDefaultCtor (bool,bool,bool,System.Threading.StackCrawlMark&) [0x00027] in
at System.Activator.CreateInstance
at CKAN.ControlFactory.CreateControl
at CKAN.Main.RecreateDialogs () [0x00022] in <74d9e06aaf404eea9cd8286643721e98>:0
at CKAN.Main..ctor (string[],CKAN.GUIUser,bool) [0x001f5] in <74d9e06aaf404eea9cd8286643721e98>:0
at (wrapper remoting-invoke-with-check) CKAN.Main..ctor (string[],CKAN.GUIUser,bool) [0x0001b] in <74d9e06aaf404eea9cd8286643721e98>:0
at CKAN.GUI.Main_ (string[],bool) [0x0003b] in <74d9e06aaf404eea9cd8286643721e98>:0
at CKAN.CmdLine.MainClass.Gui (CKAN.CmdLine.GuiOptions,string[]) [0x00007] in <74d9e06aaf404eea9cd8286643721e98>:0
at CKAN.CmdLine.MainClass.Main (string[]) [0x000a0] in <74d9e06aaf404eea9cd8286643721e98>:0
at (wrapper runtime-invoke)
Native stacktrace:
0 mono 0x0000000107f6dc01 mono_handle_native_crash + 257
1 mono 0x0000000107fd8236 altstack_handle_and_restore + 70
2 SkyLight 0x00007fff6754ffa8 SLDisplayBounds + 83
3 ??? 0x000000011643a2ee 0x0 + 4668498670
4 ??? 0x00000001087473c6 0x0 + 4436816838
5 mono 0x0000000107ec44c7 mono_jit_runtime_invoke + 1383
6 mono 0x0000000108084ed4 do_runtime_invoke + 84
7 mono 0x0000000108081024 mono_runtime_class_init_full + 996
8 mono 0x0000000107ebd7ce mono_jit_compile_method_inner + 2478
9 mono 0x0000000107ec0683 mono_jit_compile_method_with_opt + 1363
10 mono 0x0000000107f700c1 common_call_trampoline + 1217
11 mono 0x0000000107f6fbbc mono_magic_trampoline + 60
12 ??? 0x000000010838739e 0x0 + 4432884638
13 ??? 0x000000010f93473b 0x0 + 4556277563
14 ??? 0x00000001127efe4b 0x0 + 4605279819
15 ??? 0x00000001127ec06b 0x0 + 4605263979
16 mono 0x0000000107ec44c7 mono_jit_runtime_invoke + 1383
17 mono 0x0000000108084ed4 do_runtime_invoke + 84
18 mono 0x0000000108088d1b mono_runtime_try_invoke_array + 1851
19 mono 0x000000010802bb87 ves_icall_InternalInvoke + 647
20 ??? 0x00000001084a1901 0x0 + 4434041089
21 mscorlib.dll.dylib 0x000000010a6ebdc3 System_RuntimeType_CreateInstanceMono_bool + 275
22 ??? 0x000000010874fe03 0x0 + 4436852227
23 ??? 0x000000010872b96d 0x0 + 4436703597
24 mono 0x0000000107ec44c7 mono_jit_runtime_invoke + 1383
25 mono 0x0000000108084ed4 do_runtime_invoke + 84
26 mono 0x00000001080884f9 do_exec_main_checked + 137
27 mono 0x0000000107f314bf mono_jit_exec + 287
28 mono 0x0000000107f33cb4 mono_main + 9140
29 mono 0x0000000107eb3e8d main + 253
30 mono 0x0000000107eb3d84 start + 52
31 ??? 0x0000000000000002 0x0 + 2
Debug info from gdb:
(lldb) command source -s 0 '/tmp/mono-gdb-commands.WVDuks'
Executing commands in '/tmp/mono-gdb-commands.WVDuks'.
(lldb) process attach --pid 58070
warning: (x86_64) /Library/Frameworks/Mono.framework/Versions/5.8.0/lib/mono/4.5/mscorlib.dll.dylib empty dSYM file detected, dSYM was created with an executable with no debug info.
warning: (x86_64) /Library/Frameworks/Mono.framework/Versions/5.8.0/lib/libglib-2.0.0.dylib empty dSYM file detected, dSYM was created with an executable with no debug info.
Process 58070 stopped
__wait4 + 10
libsystem_kernel.dylib__wait4:Executable module set to "/Library/Frameworks/Mono.framework/Versions/Current/Commands/mono".
Architecture set to: x86_64h-apple-macosx.
(lldb) thread list
Process 58070 stopped
__wait4 + 10, name = 'tid_307', queue = 'com.apple.main-thread', stop reason = signal SIGSTOP
thread #2: tid = 0x987895, 0x00007fff6d4efcee libsystem_kernel.dylib__psynch_cvwait + 10, name = 'SGen worker'semaphore_wait_trap + 10, name = 'Finalizer'
thread #4: tid = 0x9878d0, 0x00007fff6d4f0562 libsystem_kernel.dylib__workq_kernreturn + 10__workq_kernreturn + 10
thread #6: tid = 0x9878d4, 0x00007fff6d4f0562 libsystem_kernel.dylib__workq_kernreturn + 10kevent + 10, name = 'tid_5603'
thread #8: tid = 0x9878df, 0x00007fff6d4f0ec2 libsystem_kernel.dylibkevent + 10, name = 'tid_a603'__wait4 + 10
frame #1: 0x0000000107f6dc8e monomono_handle_native_crash(signal=altstack_handle_and_restore(ctx=0x00007ffee7d4cb40, obj=0x0000000000000000, stack_ovf=0) at exceptions-amd64.c:856 [opt]
frame #3: 0x00007fff6754ffa8 SkyLightSLDisplayBounds + 83mono_jit_runtime_invoke(method=<unavailable>, obj=<unavailable>, params=0x0000000000000000, exc=0x0000000116439c70, error=<unavailable>) at mini-runtime.c:2800 [opt]
frame #7: 0x0000000108084ed4 monodo_runtime_invoke(method=0x00007fa1b4a4ebc0, obj=0x0000000000000000, params=0x0000000000000000, exc=0x00007ffee7d4d238, error=0x00007ffee7d4d410) at object.c:2849 [opt]mono_runtime_class_init_full [inlined] mono_runtime_try_invoke(method=<unavailable>, obj=<unavailable>, params=<unavailable>, error=0x00007ffee7d4d410) at object.c:2956 [opt]
frame #9: 0x0000000108080fdf monomono_runtime_class_init_full(vtable=0x00007fa1b4e93d08, error=0x00007ffee7d4d410) at object.c:473 [opt]mono_jit_compile_method_inner(method=0x00007fa1b4a4ea48, target_domain=<unavailable>, opt=<unavailable>, error=0x00007ffee7d4d410) at mini.c:4343 [opt]
frame #11: 0x0000000107ec0683 monomono_jit_compile_method_with_opt(method=0x00007fa1b4a4ea48, opt=common_call_trampoline(regs=0x00007ffee7d4d4d8, code="H\x8b?H??\xa8H\x8b??8, m=0x00007fa1b4a4ea48, vt=<unavailable>, vtable_slot=<unavailable>, error=<unavailable>) at mini-trampolines.c:715 [opt]
frame #13: 0x0000000107f6fbbc monomono_magic_trampoline(regs=0x00007ffee7d4d4d8, code="Hx8b?H??xa8Hx8b??8, arg=0x00007fa1b4a4ea48, tramp=mono_jit_runtime_invoke(method=<unavailable>, obj=<unavailable>, params=0x0000000000000000, exc=0x0000000108910bf8, error=<unavailable>) at mini-runtime.c:2800 [opt]
frame #19: 0x0000000108084ed4 monodo_runtime_invoke(method=0x00007fa1b4df40b8, obj=0x00000001088c3a80, params=0x0000000000000000, exc=0x0000000000000000, error=0x00007ffee7d4e010) at object.c:2849 [opt]mono_runtime_try_invoke_array [inlined] mono_runtime_invoke_checked(error=<unavailable>) at object.c:3002 [opt]
frame #21: 0x0000000108088ce2 monomono_runtime_try_invoke_array(method=ves_icall_InternalInvoke(method=<unavailable>, this_arg=<unavailable>, params=0x0000000000000000, exc=0x00007ffee7d4e170) at icall.c:3367 [opt]
frame #23: 0x00000001084a1901
frame #24: 0x000000010a6ebdc3 mscorlib.dll.dylibSystem_RuntimeType_CreateInstanceMono_bool + 275System_RuntimeType_CreateInstanceSlow_bool_bool_bool_System_Threading_StackCrawlMark_ + 60
frame #26: 0x000000010a6eb77d mscorlib.dll.dylibSystem_RuntimeType_CreateInstanceDefaultCtor_bool_bool_bool_System_Threading_StackCrawlMark_ + 93System_Activator_CreateInstance_T_REF + 143
frame #28: 0x000000010fdce31b
frame #29: 0x000000010874fe03
frame #30: 0x000000010872b96d
frame #31: 0x0000000107ec44c7 monomono_jit_runtime_invoke(method=do_runtime_invoke(method=0x00007fa1b34025c8, obj=0x0000000000000000, params=0x00007ffee7d4e738, exc=0x0000000000000000, error=0x00007ffee7d4e778) at object.c:2849 [opt]
frame #33: 0x00000001080884f9 monodo_exec_main_checked [inlined] mono_runtime_invoke_checked(method=do_exec_main_checked(method=0x00007fa1b34025c8, args=<unavailable>, error=0x00007ffee7d4e778) at object.c:4726 [opt]
frame #35: 0x0000000107f314bf monomono_jit_exec(domain=mono_main [inlined] main_thread_handler at driver.g.c:1109 [opt]
frame #37: 0x0000000107f33c81 monomono_main(argc=2, argv=main [inlined] mono_main_with_options(argc=<unavailable>, argv=<unavailable>) at main.c:46 [opt]
frame #39: 0x0000000107eb3e79 monomain(argc=2, argv=start + 52
thread #2, name = 'SGen worker'
frame #0: 0x00007fff6d4efcee libsystem_kernel.dylib__psynch_cvwait + 10_pthread_cond_wait + 732
frame #2: 0x000000010813dc9e monothread_func [inlined] mono_os_cond_wait(mutex=thread_func at sgen-thread-pool.c:165 [opt]
frame #4: 0x000000010813dc7d monothread_func(data=0x0000000000000000) at sgen-thread-pool.c:196 [opt]_pthread_body + 340
frame #6: 0x00007fff6d62b56d libsystem_pthread.dylib_pthread_start + 377thread_start + 13
thread #3, name = 'Finalizer'
frame #0: 0x00007fff6d4e67fe libsystem_kernel.dylibsemaphore_wait_trap + 10finalizer_thread [inlined] mono_os_sem_wait(flags=MONO_SEM_FLAGS_ALERTABLE) at mono-os-semaphore.h:90 [opt]
frame #2: 0x00000001080ea411 monofinalizer_thread at mono-coop-semaphore.h:43 [opt]finalizer_thread(unused=<unavailable>) at gc.c:866 [opt]
frame #4: 0x00000001080a66d0 monostart_wrapper [inlined] start_wrapper_internal at threads.c:1003 [opt]start_wrapper(data=<unavailable>) at threads.c:1063 [opt]
frame #6: 0x00007fff6d62b6c1 libsystem_pthread.dylib_pthread_body + 340_pthread_start + 377
frame #8: 0x00007fff6d62ac5d libsystem_pthread.dylibthread_start + 13start_wqthread
thread #5
frame #0: 0x00007fff6d4f0562 libsystem_kernel.dylib__workq_kernreturn + 10_pthread_wqthread + 1552
frame #2: 0x00007fff6d62ac4d libsystem_pthread.dylibstart_wqthread + 13__workq_kernreturn + 10
frame #1: 0x00007fff6d62b06a libsystem_pthread.dylib_pthread_wqthread + 1035start_wqthread + 13
thread #7, name = 'tid_5603'
frame #0: 0x00007fff6d4f0ec2 libsystem_kernel.dylibkevent + 10ves_icall_System_IO_KqueueMonitor_kevent_notimeout(kq_ptr=0x0000000108a2ff34, changelist=0x00007fa1b34807a0, nchanges=0, eventlist=0x00007fa1b583cc00, nevents=32) at filewatcher.c:244 [opt]
frame #2: 0x000000010ff0483c
thread #8, name = 'tid_a603'
frame #0: 0x00007fff6d4f0ec2 libsystem_kernel.dylibkevent + 10ves_icall_System_IO_KqueueMonitor_kevent_notimeout(kq_ptr=0x0000000108a357b4, changelist=0x00007fa1b3799510, nchanges=0, eventlist=0x00007fa1b5067200, nevents=32) at filewatcher.c:244 [opt]
frame #2: 0x000000010ff0483c
thread #9, name = 'Timer-Scheduler'
frame #0: 0x00007fff6d4efcee libsystem_kernel.dylib__psynch_cvwait + 10_pthread_cond_wait + 789
frame #2: 0x00000001081495d4 monomono_os_cond_timedwait(cond=0x00007fa1b3805890, mutex=0x00007fa1b3805850, timeout_ms=2999) at mono-os-mutex.c:44 [opt]mono_w32handle_timedwait_signal_handle [inlined] mono_w32handle_timedwait_signal_naked(cond=<unavailable>, mutex=<unavailable>, timeout=2999, poll=0, alerted=<unavailable>) at w32handle.c:871 [opt]
frame #4: 0x00000001080c787c monomono_w32handle_timedwait_signal_handle(handle=mono_w32handle_wait_one(handle=0x0000000000000008, timeout=2999, alertable=<unavailable>) at w32handle.c:1109 [opt]
frame #6: 0x00000001080c79b6 monomono_w32handle_wait_multiple(handles=ves_icall_System_Threading_WaitHandle_Wait_internal(handles=<unavailable>, numhandles=<unavailable>, waitall=<unavailable>, timeout=-1, error=0x000070000353b7a8) at threads.c:1930 [opt]
frame #8: 0x000000010fdfebfd
frame #9: 0x000000010a83bdd0 mscorlib.dll.dylibSystem_Threading_WaitHandle_InternalWaitOne_System_Runtime_InteropServices_SafeHandle_long_bool_bool + 64System_Threading_WaitHandle_WaitOne_long_bool + 44
frame #11: 0x000000010a83bbe3 mscorlib.dll.dylibSystem_Threading_WaitHandle_WaitOne_int_bool + 51System_Threading_WaitHandle_WaitOne_int + 28
frame #13: 0x000000010a842cef mscorlib.dll.dylibSystem_Threading_Timer_Scheduler_SchedulerThread + 2495System_Threading_ThreadHelper_ThreadStart_Context_object + 151
frame #15: 0x000000010a8327b1 mscorlib.dll.dylibSystem_Threading_ExecutionContext_Run_System_Threading_ExecutionContext_System_Threading_ContextCallback_object_bool + 33System_Threading_ExecutionContext_Run_System_Threading_ExecutionContext_System_Threading_ContextCallback_object + 80
frame #17: 0x000000010a834cbf mscorlib.dll.dylibSystem_Threading_ThreadHelper_ThreadStart + 47mono_jit_runtime_invoke(method=<unavailable>, obj=<unavailable>, params=0x000070000353bea8, exc=0x0000000108a3dc90, error=<unavailable>) at mini-runtime.c:2800 [opt]
frame #20: 0x0000000108084ed4 monodo_runtime_invoke(method=0x00007fa1b5a54350, obj=0x0000000108a3dd78, params=0x000070000353bea8, exc=0x0000000000000000, error=0x000070000353be40) at object.c:2849 [opt]start_wrapper at threads.c:1011 [opt]
frame #22: 0x00000001080a6633 monostart_wrapper(data=_pthread_body + 340
frame #24: 0x00007fff6d62b56d libsystem_pthread.dylib_pthread_start + 377=================================================================
Got a SIGSEGV while executing native code. This usually indicates
a fatal error in the mono runtime or one of the native libraries
Process 58070 detached
(lldb) quit
Abort trap: 6
No, there's no need for a new issue.
Can you try it with mono --arch=32? As far as I know, it just defaults to 64 bits, but 32 bits is still available for a WinForms app. This is already in the .app bundle.
How would I do that with using the .app CKAN? I've never used the command line version
Wait, how are you running it, and what exactly did you download, from where?
The ckan mac app https://github.com/Maxzhao1999/CKAN_app/releases. I replaced the ckan.exe in the package contents with the new version
OK, do not do that. Use the Mac version on the main download page. Maxzhao's version is old and unsupported.
https://github.com/KSP-CKAN/CKAN/releases/download/v1.24.0/CKAN.dmg
That just redirects to the how install on mac when I open it
OK, that means it can't find mono. Can you open a terminal and type "which mono" and let me know what it says?
it says this /Library/Frameworks/Mono.framework/Versions/Current/Commands/mono
Thank you! Can you please try this test version?
Apparently the PATH variable isn't set as we thought it would be on OSX.
that strait up does nothing
Nothing as in you double click and nothing at all happens, or nothing as in it does the same thing as before, launch a web page?
Nothing as in double click, the icon shows up then closes without anything appearing
OK, believe it or not that indicates progress, as it's now finding Mono correctly.
I took another look at the packaging and tried to eliminate anything that looked like it might fail. Can you please try this build?
It should give you a popup with some info after it tries to run Mono, even if it works. We would remove that in the released version, but I wanted to make sure there was some feedback instead of nothing happening.
Apologies for the delays and the trial-and-error, but I don't have a Mac for testing and I'm trying to triple check everything before I send it to you.
For me, the previous CKAN.zip did nothing when I first started it, but the second time I ran it, everything came up perfectly.
Thanks, @cherrydev. Would you mind trying the latest one as well? I think it's probably a better approach, so I'd like to confirm that it works for folks.
This version doesn't launch, it just exists silently. The console shows:
2018-02-25 1:04:09.589 PM lsd[337]: LaunchServices: Could not store lsd-identifiers file at /private/var/db/lsd/com.apple.lsdschemes.plist
2018-02-25 1:04:09.667 PM osascript[19737]: Performance: Please update this scripting addition to supply a value for ThreadSafe for each event handler: "/Library/ScriptingAdditions/MumbleOverlay.osax"
2018-02-25 1:04:09.689 PM com.apple.xpc.launchd[1]: (org.ksp-ckan.ckan.680672[19733]) Service exited with abnormal code: 1
P.S. If you want me to poke at the source code with a stick, I'm a developer.
FYI, I'm on 10.11.6 and my /Library/Frameworks/Mono.framework/Versions/ looks like:
drwxrwxrwx+ 12 root admin 408 10 Mar 2010 2.6.3
drwxr-xr-x 12 root admin 408 12 Oct 2015 3.12.1
drwxr-xr-x 10 root admin 340 10 Nov 2015 4.2.1
drwxr-xr-x 10 root admin 340 3 Mar 2016 4.2.3
drwxr-xr-x 12 root admin 408 6 May 2017 5.0.0
lrwxr-xr-x 1 root admin 49 6 May 2017 Current -> /Library/Frameworks/Mono.framework/Versions/5.0.0
@cherrydev , yeah that would be great if you have the time.
The current script is here:
https://github.com/KSP-CKAN/CKAN/blob/86bf144ec7ce7fa36b1aaddaadfff2519481fc52/macosx/CKAN#L1-L23
And you can check your copy of the bundle from the ZIP to see the changes I made for testing. All we're trying to do is launch "mono ckan.exe". But OSX is making that extremely difficult for reasons that are not clear to me.
Yeah that new version doesn't work with me
So somebody let me know once we have something. TBH this is black magic to me
Try this. My comments in double hashes.
# Check El Capitan's mono install location
PATH="$PATH":/usr/local/bin
export PATH
## Mono 5 uses paths.d but when launched from the Finder, a shell script starts with a restricted environment without any of your other paths set
if [ -r "/etc/paths.d/mono-commands" ]
then
PATH="$PATH":"$(cat /etc/paths.d/mono-commands)"
export PATH
fi
## At this point, you should have mono in your path regardless of if it was installed in /usr/bin (old Mono) /usr/local/bin (Mono 4) or using /etc/paths.d (Mono 5)
MONO=$(which mono)
if [ -z "$MONO" -o ! -x "$MONO" ]
then
# We could not find mono. The wiki explains how to install.
open 'https://github.com/KSP-CKAN/CKAN/wiki/Installing-CKAN-on-OSX'
else
# Mono found, so we can run CKAN.
## This is simple and works fine (instead of that old weird one-liner) if we're running bash, which we now are (new /bin/bash shebang)
APP_PATH="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
ASSEMBLY=ckan.exe
MONO_FRAMEWORK_PATH=/Library/Frameworks/Mono.framework/Versions/Current
export DYLD_FALLBACK_LIBRARY_PATH=$APP_PATH/Contents/MacOS:$MONO_FRAMEWORK_PATH/lib:/lib:/usr/lib
cd "$APP_PATH"
exec -a "CKAN" "$MONO" --arch=32 $ASSEMBLY $@
fi
so how do I edit the app to add this?
You can right-click and "Show Package Contents" on CKAN.app, go into Contents/MacOS edit the file CKAN with a text editor and copy and paste the contents. Or you can just wait for @HebaruSan to re-package it after they test it.
And this is a replacement for the whole executable?
So what's the key part of the fix? I think we already had the right path to mono in my previous ZIP since it wasn't launching a browser anymore, so I assume it's the APP_PATH logic? Why wouldn't a straight dirname cover that without running pwd in a subcommand?
I THINK the key part of the fix (it was for me) is that mono was actually NOT in my path without reading it from /etc/paths.d/mono-commands. With Mono 5 installed it never creates an executable in /usr/bin or /usr/local/bin (https://stackoverflow.com/a/32547884) . I don't know if the APP_PATH thing makes any difference. I changed it because I couldn't understand how the old code works, the new version seems to be a pretty standard bash idiom compared to the old one, and it doesn't require you to tack the relative path of the script from the .app wrapper into it.
So ill just wait then
Oh, FYI, I was comparing this to your script that had your weird APP_PATH=$(echo $0 | awk '{split($0,patharr,"/"); idx=1; while(patharr[idx+3] != "") { if (patharr[idx] != "/") {printf("%s/", patharr[idx]); idx++ }} }') thing in it. Not the one which had a simple MACOS_PATH="$(dirname $0)"
I guess now that I look at the two, they should be more-or-less functionally equivalent. I didn't figure out yet why your latest script didn't work.
Thanks, the only difference I see in the two dirname statements is that yours would give an absolute path. I guess that might matter...?
EDIT: Except both scripts do the exact same thing with the output of dirname, cd into it. If mine doesn't work, yours shouldn't either. Hmm.
For whatever reason, yes, that actually seems to be the difference between it working and not working for me.
What about the osxmessage thing in the ZIP's script? I was not happy with having no way to report error messages, but is there any hope of that actually working?
OK, here's a hybrid of my previous ZIP script and @cherrydev's script above. I have added the /etc/paths.d block and the "$(cd "$(dirname "$0")" && pwd)" thing, but also kept the osxmessage error popups and added some environment variables that "macpack" uses for WinForms.
@Whovian41110 you can come back and test this now if you like, but it may or may not work yet.
I'm not 100% sure why the osxmessage isn't working when it fails. It's possible that when attempting to execute an invalid path the wrapper script itself is erroring out and therefore not getting to the osxmessage?
Okay guys. When i started the .app again it just worked. The secure channel just worked...
Thanks, @Whovian41110. I'll start the process of getting these changes into an official release...
Most helpful comment
Okay guys. When i started the .app again it just worked. The secure channel just worked...