Closed Whovian41110 closed 6 years ago
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.
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...
Background
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
Problem
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):