GithubHelp home page GithubHelp logo

OS X App Translocation about portacle HOT 34 CLOSED

portacle avatar portacle commented on June 23, 2024 3
OS X App Translocation

from portacle.

Comments (34)

Shinmera avatar Shinmera commented on June 23, 2024

Someone else reported this problem before-- I haven't had time to look into it yet. Somehow the libraries between OS X 10.10 (where it was built on) and 10.12 are incompatible in a more invasive way than I had anticipated.

I'm not sure how to fix this yet aside from releasing separately for different OS X versions or requiring a more recent one, both of which aren't very pleasing options.

from portacle.

lhlips avatar lhlips commented on June 23, 2024

I'm not sure /usr/mac/lib is a standard location on any version of OS X. Could this be getting added as part of your macports or brew installation?

from portacle.

Shinmera avatar Shinmera commented on June 23, 2024

No, that's a path within the Portacle distribution you're seeing there.

from portacle.

Shinmera avatar Shinmera commented on June 23, 2024

I'm not sure why the system cups wants to do something with the shipped libiconv though. That seems pretty bizarre.

from portacle.

EzVoodoo avatar EzVoodoo commented on June 23, 2024

I had the same issue. Any updates? It really looks like a promising project, but it is now unusable on my Mac (Windows 10 works fine).

from portacle.

Shinmera avatar Shinmera commented on June 23, 2024

I'm tied up with exams right now and don't have time for it, unfortunately. You could try building it from source, though. See the instructions in the build directory.

In general, Mac is kind of a difficult platform to test for me, since I only have a dinky MacBook Air to test on and virtualising OS X is unbearably slow. Otherwise I would've probably caught this issue when I was last working on it.

from portacle.

Shinmera avatar Shinmera commented on June 23, 2024

Portacle should run on OS X 10.11 and 10.12 with the 0.11 release

from portacle.

alexdao avatar alexdao commented on June 23, 2024

I'm still having this issue with the 0.11 release on OS X 10.12.1. Any suggestions?

from portacle.

Shinmera avatar Shinmera commented on June 23, 2024

Not if I can't reproduce it.

from portacle.

cnasc avatar cnasc commented on June 23, 2024

macOS 10.12.3 here, same issue. App does not launch. Going to /Applications/portacle/mac/launcher and running portacle from there actually launches an emacs window, but does not allow me to interact with it (can't close it, can't enter text. All key input goes into the terminal.) Same result launching from /Applications/portacle/Portacle.app/Contents/MacOS/portacle.sh.

from portacle.

Shinmera avatar Shinmera commented on June 23, 2024

When launching from the Finder directly for the first time, you have to unlock it in the security options first. I assume you've done that?

I'm aware of the Terminal launch bug and have no idea why the terminal captures all input.

from portacle.

cnasc avatar cnasc commented on June 23, 2024

You mean when it's first downloaded and it says something along the lines of "This is an application downloaded from the internet..."? If so, yes, I allowed it to open and the popup didn't appear for any subsequent attempts.

from portacle.

Shinmera avatar Shinmera commented on June 23, 2024

Alright. That's curious, then, since you seem to be able to launch it from the shell without it crashing.

from portacle.

cnasc avatar cnasc commented on June 23, 2024

Yup, certainly peculiar. And, checking my syslog, I have the same "Service exited with abnormal code: 127" as arlandism.

from portacle.

pharryg avatar pharryg commented on June 23, 2024

Two observed issues with starting portable on macOS (Sierra) 10.12.3:

  1. If python is version 3, then print requires parentheses as in print(). In the script portable.sh these are missing. The script will run if the script is changed. Therefore a conditional for which version of python is required.
  2. As reported earlier the launcher has issues If launched from the command line:
    %> /Applications/portacle/mac/launcher/portacle
    then emacs initializes along with Slime and an SBCL, but no inputs are allowed into either buffer. An error appears in the shell:
    Warning: arch-dependent data dir '/Users/linus/portacle/mac/emacs/libexec/emacs/25.1/x86_64-apple-darwin15.6.0/': No such file or directory
    Warning: Lisp directory '/Users/linus/portacle/mac/emacs/share/emacs/25.1/lisp': No such file or directory
    This is clearly the wrong directory, it should read from the local directory in which portable is installed.
    The launcher requires editing source and rebuilding, which I have not tried.

from portacle.

Shinmera avatar Shinmera commented on June 23, 2024

I'll see about the python thing, thanks for the hint.

The warnings you saw are irrelevant and don't actually affect anything. They're hard-coded paths that emacs retains from where it was built in and I can't do anything about that.

from portacle.

Shinmera avatar Shinmera commented on June 23, 2024

If someone who can reproduce the issue could replace the portacle/Portacle.app/Contents/MacOS/portacle.sh file in their installation with this one and test again, I'd be very thankful.

from portacle.

cnasc avatar cnasc commented on June 23, 2024

I copied over the portacle/Portacle.app/Contents/MacOS/portacle.sh with the one you linked, but same result for me. Double clicking the Portacle.app does not launch the program, and manually running portacle.sh results in an Emacs window with SLIME running that I can't interact with. Thanks for the attempt, though!

from portacle.

pharryg avatar pharryg commented on June 23, 2024

from portacle.

Shinmera avatar Shinmera commented on June 23, 2024

Alright, I got rid of the launcher script altogether. I'll have a release out by tonight. Would appreciate another test, since I still can't find a way to reproduce the issue on my virtualised systems.

from portacle.

Shinmera avatar Shinmera commented on June 23, 2024

Ok, here's the release candidate. Hopefully it'll finally work!

https://github.com/Shinmera/portacle/releases/tag/0.12-rc1

from portacle.

cnasc avatar cnasc commented on June 23, 2024

Unfortunately, same result with the RC. Clicking on the app doesn't work, and manually launching the Portacle executable results in a non interactive Emacs window.

from portacle.

Shinmera avatar Shinmera commented on June 23, 2024

Alright, on a completely clean VM I can reproduce the problem. Trying to launch it with open -a Portacle.app in a Terminal ends up with:

LSOpenURLsWithRole() failed with error -10810

Googling for the error code yields a variety of "solution approaches" but none of them seem to work for me so far.

from portacle.

Shinmera avatar Shinmera commented on June 23, 2024

Made some more progress. It seems OS X 12 will launch app bundles under a special kind of weird file system somewhere in /private/var/folders/m8/..../T/AppTranslocation/. This also means the rest of the Portacle distribution is not available in that location, effectively making it impossible for Portacle to launch through the app bundle. The intention of this system is that the application should not be able to touch malicious files outside of its bundle.

from portacle.

Shinmera avatar Shinmera commented on June 23, 2024

The "quick fix" is this:

Either use finder to move the Portacle.app into another directory within Portacle (like projects/) and then launch it (you can afterwards move it back to the root again and it'll keep working), or you can run xattr -r -d com.apple.quarantine portacle/ from the Terminal.

I'll see if there's other ways around this.

from portacle.

Shinmera avatar Shinmera commented on June 23, 2024

I can see a few possible approaches to solving this, none of which I like.

  • Write a shim application that searches the entire filesystem for the portacle folder, unlocks it, and then launches it proper.
  • Write a shim application that detects whether Portacle was started translocated. If so, it asks the user for the proper directory path, and proceeds as above.
  • Waste 100$ a year on a developer license in order to sign things.
  • Rearchitecture Portacle specifically on OS X so that everything is within the app bundle.
  • Ask people to move the Portacle.app themselves.

from portacle.

cnasc avatar cnasc commented on June 23, 2024

The "quick fix" is this [...] move the Portacle.app into another directory within Portacle (like projects/) and then launch it

Just confirming that this works for me.

As a thought, instead of just distributing a dmg with a folder, what about making an installer pkg that scripts whatever is necessary to make it run? I'll admit I haven't tried making an OS X installer before, so it could be harder than I think.

from portacle.

Shinmera avatar Shinmera commented on June 23, 2024

I suppose that might be another option. I'll look into it, thanks!

Edit: actually, I think that would still not work in the presence of Portacle being used on a USB drive. Or in the very least I currently don't know how/if the com.apple.quarantine attribute persists on the filesystem.

from portacle.

Shinmera avatar Shinmera commented on June 23, 2024

According to http://stackoverflow.com/questions/11487596/making-os-x-installer-packages-like-a-pro-xcode-developer-id-ready-pkg it seems like creating an installer would be both a major hassle, and apparently it is not at all used for installations to the user's home folder. While I don't think it would be a huge tragedy to force installation to Applications/ on the first go, I simply don't like this idea any better than all the other proposals I've made above.

from portacle.

cnasc avatar cnasc commented on June 23, 2024

I think that would still not work in the presence of Portacle being used on a USB drive

Yup, I thought about that right after I posted. It would likely make it non-portable.

I simply don't like this idea any better than all the other proposals I've made above.

Fair enough. To sate my own curiosity I tried doing a package with Packages and adding a post-install script that just did xattr -r -d com.apple.quarantine /Applications/portacle/ and it did allow the Portacle.app to launch, though it was broken in other ways.

For the time being, just moving Portacle.app is fine for me. Thanks again for your help on this!

from portacle.

Shinmera avatar Shinmera commented on June 23, 2024

Out of interest, can someone run this in a terminal and let me know how long it takes? I don't have a well-populated OS X environment, so my own timing data is rather worthless.

time find /Users -samefile portacle/mac/bin/emacs

Naturally you'll have to adapt the samefile path if necessary.

I've had this suspicion (and I've successfully tested it now) that Gatekeeper doesn't really copy the files, but rather just creates a hard link to the app bundle directory in the fake location. This means that the files within retain the same inode, and I can easily and accurately find the proper location on the system.

from portacle.

Shinmera avatar Shinmera commented on June 23, 2024

For now I've opted for not trying to be clever and instead have just mentioned the app bundle moving on the website's installation instructions.

Please download release 0.12 as instructed and report whether it now works as expected.

from portacle.

cnasc avatar cnasc commented on June 23, 2024

Sorry for taking so long to get back on this. Release 0.12 works as expected, but I would mention on the page that you need to allow Gatekeeper to run it before moving it.

Thanks again for all your help with this, and for making Emacs/Common Lisp more accessible.

from portacle.

Shinmera avatar Shinmera commented on June 23, 2024

I've added a note about unblocking the app as well.

from portacle.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.