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

[Bug] LES is unable to register accessibility permissions on macOS 11 or greater #6

Open
jnak opened this issue Nov 6, 2021 · 59 comments
Labels
bug Something isn't working

Comments

@jnak
Copy link

jnak commented Nov 6, 2021

Hi,

First, thanks for sharing LES. It's such a nice tool, especially when using Ableton in tablet mode with a pen.

I'm trying to install LES on Monterrey but the install won't complete. It keeps asking for accessibility access even though I've added it. I tried rebooting my machine and both the release and pre-release builds.

See screenshot:
Screen Shot 2021-11-06 at 6 28 13 PM

Best,
J

@jnak jnak added the bug Something isn't working label Nov 6, 2021
@kwvg
Copy link
Member

kwvg commented Nov 13, 2021

Hello! Thank you for using LES for macOS.

I do not use macOS Montery right now and it'll be a while before I'll be able to reproduce your exact bug, usually we find that bugs like these are resolved by updating our underlying Hammerspoon base but I'd like to verify that something works before pushing an update.

macOS Montery has been recently released and it takes a substantial amount of time before the entire ecosystem adjusts to it (from developers, maintainers, continuous integration tools, just apps in general) so unfortunately, I cannot build remotely to try and fix the problem in the immediate future until that adjustment happens.

For now I'd recommend downgrading to macOS Big Sur but I'm keeping the issue open as Montery is out of beta and this bug is a regression.

@kwvg kwvg added the macOS 12 label Nov 13, 2021
@kwvg kwvg changed the title [Bug] LES keeps asking for accessibility access on Monterrey [Bug] LES is unable to register accessibility permissions on macOS 12 Nov 13, 2021
@jnak
Copy link
Author

jnak commented Nov 13, 2021

Thanks for getting back to me. Unfortunately, I don't have the opportunity to downgrade to Big Sur since I have the new M1Pro chip. Those ships are support officially supported by Monterey.

I'm happy to help with testing if you need access to a machine with Monterey. I don't know much about Lua or Objective C but I can definitely follow building / testing instructions if you need me.

Cheers!

@JonDum
Copy link

JonDum commented Nov 17, 2021

Same issue here, can reproduce. @kittywhiskers if you can point me to the bit of code that does the accessibility check I can perhaps at least start some progress on this by debugging from source locally. Hopefully it's just a changed apple api method or something simple.

Also, Monterrey went live October 25, 2021. No longer beta :)

@JDRoy
Copy link

JDRoy commented Nov 20, 2021

I'm running into the same issue and would be happy to help with this, as well! Just picked up the new laptop while I still had an educational discount and could save a few hundred bucks. This would also give me an excuse to download Xcode and brush up on my debugging skills.

@kwvg
Copy link
Member

kwvg commented Nov 20, 2021

I've updated my GitHub with an email address and I'll be glad to continue our correspondence there!

If Discord is something you prefer over email, then please send me an email (yeah, still email to get started, sorry) and we can exchange Discord usernames and start working from there!

@jnak
Copy link
Author

jnak commented Nov 22, 2021

@kittywhiskers Sounds good - I just sent you an email. Having said that, it might be easier to coordinate here since we're already a few people interested to help and other people may join us along the way if need be. I'm fine either way though so whatever you think is best :)

@redwhatever
Copy link

Hi all, just wanted to mention I'm running into the same issue as @jnak. Will keep an eye on this thread. Thanks for looking into it!

@kwvg
Copy link
Member

kwvg commented Nov 23, 2021

@jnak I can post general guides on how we're gonna conduct testing but because LES doesn't have a robust logging system, it'll take a lot of one-on-one communications to get useful information.

That being said, the Hammerspoon base has been updated in b840f34 and an overhaul to HSModule (at least in terms of cleanup and refactoring) is currently in progress (see LiveEnhancementSuite/HSModule#1)

@JonDum
Copy link

JonDum commented Nov 24, 2021

Some good news. It looks like the MacOS Monterey accessibility thing was fixed by @kittywhiskers updating the Hammerspoon base! So that's awesome. I was able to get LES working by building from their develop branch, exporting the .app from the .xcarchive and fixing several pathing issues from the exported Hammerspoon app.

I'm not sure if I did something wrong with the build, or that's just WIP from @kittywhiskers's changes. I had to manually copy over the extensions/les/ folder into the .app/contents/resources/extension/ folder and I also had to copy over helpers.lua to ~/.les/ b/c require("helpers") did not check that folder for it and Lua couldn't find it. The code that automatically creates a settings.ini and menuconfig.ini also failed and I had to manually create these in ~/.les.

@kwvg
Copy link
Member

kwvg commented Nov 25, 2021

The code that automatically creates a settings.ini and menuconfig.ini also failed and I had to manually create these in ~/.les.

Yeah, the initialization code hasn't caught up with refactoring and probably won't be till we can really chart out what the scope the refactor will be (mostly I want to avoid common bugs and set the groundwork for a better logging system).

If you can confirm that using unrefactored HSModule works on Monterey (since the problem seems to be resolved with just updating the Hammerspoon base), I can try to trigger a fresh CI run (probably update our build documentation, too) and we can at least get Monterey users a working version!

@JonDum
Copy link

JonDum commented Nov 29, 2021

@kittywhiskers Tried it. Unfortunately HSModule @ origin/release@v1.3.1 9920d2 nor @ origin/cleanup 462765a I could get working. I was only able to get past the accesibility warning on 8882cc4

Your formatting and refactor may have unintentionally solved this! Who knew clean code worked better. :P

I'd say go ahead and cut an alpha release on your cleanup branch. Even if it's not ready, perhaps it will still allow people to get LES going on Monterey.

@JDRoy You have to run a build with ./scripts/build.sh build from the terminal then open the .xcarchive with XCode to export the .app

@drj-io
Copy link

drj-io commented Nov 29, 2021

Same issue here on an M1 mac mini under Monterey. I can try out the develop branch this evening.
image

@kwvg
Copy link
Member

kwvg commented Nov 30, 2021

I'm not sure if I did something wrong with the build, or that's just WIP from @kittywhiskers's changes. I had to manually copy over the extensions/les/ folder into the .app/contents/resources/extension/ folder and I also had to copy over helpers.lua to ~/.les/ b/c require("helpers") did not check that folder for it and Lua couldn't find it.

HSModule, in previous versions, would be packaged with the application bundle courtesy of this small modification to the extensions copy script which has since been deprecated because of Hammerspoon's build system overhaul.

The fix for that (1548313) has just been recently pushed!

The code that automatically creates a settings.ini and menuconfig.ini also failed and I had to manually create these in ~/.les.

Working on it, thanks for letting me know! Resolved with latest push to HSModule's origin/refactor (7da8c39)


Sidenote, for folks who are dealing with ./scripts/build.sh build freezing on them locally (like mine does on Checking Cocoapods state...), you can just run the command below in lieu of that

xcodebuild -workspace Hammerspoon.xcworkspace -scheme Hammerspoon -configuration Debug clean build | tee $(date +%s).log | xcbeautify

@taninke
Copy link

taninke commented Dec 13, 2021

image
I'm having the same issue on Monterey, dang.

Is there any way to "manually" resolve this on my end, or it basically just waiting for a fix? Also on an M1 mac, so I can't downgrade unfortunately. I've never used Ableton without RES!

@kwvg
Copy link
Member

kwvg commented Dec 16, 2021

Update

Some bugs within HSModule were ironed out with LiveEnhancementSuite/HSModule#1 and their fixes have been successfully merged. macOS Monterey users can now test LESforMacOS with the fixes integrated released in an alpha build!

Feedback would be highly appreciated! Once we've established there are no problems in macOS Monterey, this issue can be closed!

@taninke
Copy link

taninke commented Dec 16, 2021

Update

Some bugs within HSModule were ironed out with LiveEnhancementSuite/HSModule#1 and their fixes have been successfully merged. macOS Monterey users can now test LESforMacOS with the fixes integrated released in an alpha build!

Feedback would be highly appreciated! Once we've established there are no problems in macOS Monterey, this issue can be closed!

Screen Shot 2021-12-16 at 10 36 10 AM

I just installed the new update on Monterey and received this error. I tried a restart and clean install, same issue.

@JonDum
Copy link

JonDum commented Dec 17, 2021

Update

Some bugs within HSModule were ironed out with LiveEnhancementSuite/HSModule#1 and their fixes have been successfully merged. macOS Monterey users can now test LESforMacOS with the fixes integrated released in an alpha build!
Feedback would be highly appreciated! Once we've established there are no problems in macOS Monterey, this issue can be closed!

Screen Shot 2021-12-16 at 10 36 10 AM

I just installed the new update on Monterey and received this error. I tried a restart and clean install, same issue.

@kittywhiskers this is the same error I had. I fixed it by manually copying the les extension lua files into ~/.les but i don't think that's an ideal solution. rawrequire should be looking into the Application Bundle not the user's home dir no?

@kwvg
Copy link
Member

kwvg commented Dec 17, 2021

I remember dealing with package path issues as well and I had patched it with 8cb245b.

When you say clean install, does that include deleting ~/.les?

@JonDum
Copy link

JonDum commented Dec 17, 2021

I remember dealing with package path issues as well and I had patched it with 8cb245b.

When you say clean install, does that include deleting ~/.les?

Yea I didn't have a ~/.les folder at all, nor did the executable create one for me. Judging by the trace I figured I'd have to manually create it and dump the helpers.lua in the right spot and sure enough it ran when I did that.

@taninke
Copy link

taninke commented Dec 17, 2021

I remember dealing with package path issues as well and I had patched it with 8cb245b.

When you say clean install, does that include deleting ~/.les?

I just did this (deleted ~/.les), restarted again and reinstalled, and it seems to be working now!

I'll have to re-add my original settings and menu config but if all that goes well, I think it should be solid on Monterey.

@jnak
Copy link
Author

jnak commented Dec 17, 2021

Happy to report that things work ok for me on Monterey. I had to delete my ~/.les directory (as described above) but after that everything worked as expected. Let me know if you need to test something specifically.

@JohnDohs
Copy link

Hello! I have an air m1 and also I've got an accessibility issue. To solve this problem I've installed kittywhiskers's alpha build. And have the same issue with the missing files mentioned above. Please could you describe how to solve this, please? I can't find .les folder and also cant find les extension files that I should copy. I'm not a coder, just trying to use this amazing utility that I've always used on win10.

@kwvg
Copy link
Member

kwvg commented Dec 21, 2021

I can't find .les folder

@JohnDohs, as .les is a dot folder, it has certain special properties including not being visible to the user unless you explicitly ask the operating system to do so. To manipulate this folder, you can open Finder, then use ⌘ Cmd + ↑ Shift + G to Go to Folder and input ~/.les there to explore the directory.

As for having LES work with macOS 12, you need to enter this folder and delete all its contents (this will reset your customizations and timings, if any), then proceed to run the binary again. If you're terminal savvy, then simply opening the Terminal app and typing rm -rf ~/.les would achieve the same thing, in spirit.

LES should start behaving as expected soon after, on the next launch.


@JonDum, are you experiencing the same problems after following the outlined steps?

@JohnDohs
Copy link

@kittywhiskers Thanks a lot! It worked!

@swit33
Copy link

swit33 commented Dec 29, 2021

Same issue here.
Monterey 12.1
I did a clean install of latest alfa build, including clearing ~/.les folder, still have an accessibility issue.

@nickfredman
Copy link

I'm on Monterey (m1 max) and still having the accessibility issues as well. I'm a developer too so happy to debug anyway that's useful for y'all.

@Rodige717
Copy link

Hey!
I tried to install clean the latest Alfa Build and cleared ~/.les folder but i still have an accessibility issue.
What am I doing wrong ? @kittywhiskers

@aomrahming
Copy link

I wish I had a clue of all the stuff you are talking about if this is something I can't pick up quickly and help with I will glad to help

it seems that the mac version of the program is currently abandonware. I'm sorry, but it seems that neither me nor kittywhiskers are able to keep this thing updated since neither of us has a mac to develop on. if anyone wants to help out please create a pull request and we will work on implementing it into the release build!

Most importantly, a lot of work needs to be done on https://github.com/LiveEnhancementSuite/HSModule, as this git repository just represents the hammerspoon mod this module (the actual behavior of the program) runs in.

if nothing happens I might eventually be able to update the program, but I really do not see it happening any time soon; unfortunately.

@reckm
Copy link

reckm commented Jun 4, 2022

Oh, that's so sad - I really enjoyed the workflow loading plugins so fast. I had some weird behavior of my Ableton so I checked for updates and found out just now.

Are there any alternatives to load Plugins as you did?

@Rodige717
Copy link

It worked for me on M1 Max Monterey 12.2.1

Make sure you have the latest version (1.3.3)

First, for Accessibility, I followed this:

for anyone looking for a (rough) confirmation it works:

  1. updated to alpha build 1.3.3 (this was the step I missed)
  2. removed LES from accessibility list
  3. Re-add LES to accessibility list (prior to launching LES)
  4. launch LES, working. (if still not working: I think I deleted the ~/.les file at some point in these steps)

**Then i got the Hammerspoon console issue as explained by @RODE0606 **

To fix this i deleted the .les folder by following this

.lesis a _dot_ folder, it has [certain special properties](https://unix.stackexchange.com/a/21780) including not being visible to the user unless you explicitly ask the operating system to do so. To manipulate this folder, you can open Finder, then use ⌘ Cmd + ↑ Shift + G to _Go to Folder_ and input~/.les` there to explore the directory.

As for having LES work with macOS 12, you need to enter this folder and delete all its contents (this will reset your customizations and timings, if any), then proceed to run the binary again. If you're terminal savvy, then simply opening the Terminal app and typing rm -rf ~/.les would achieve the same thing, in spirit.

LES should start behaving as expected soon after, on the next launch.

Thanks to everyone !

@FugueSoft
Copy link

Recently upgraded to macOS 12 and going back isn't an option
I am also having the same issue with LES

@edermariano
Copy link

Recently upgraded to macOS 12 and going back isn't an option I am also having the same issue with LES

Have you tried the steps?

  1. Remove the LES
  2. Download and reinstall version 1.3.3-alpha
  3. System Settings -> Privacy & Security -> Accessibility, remove the LES with the - on the bottom
  4. System Settings -> Privacy & Security -> Accessibility, add the LES back with the + on the bottom
  5. Remove the les folder in your terminal type rm -rf ~/.les
  6. Right click in the Live Enhancement Suite in your Application folder and click open
  7. Do it again if it complains.

It works for me right now.

@matthieuschulz
Copy link

@edermariano Works for me too!

@jarlkaad
Copy link

Works here too! :D

@ignacio-dev
Copy link

I did everything on the list, and while it opens fine, every time I try to insert anything from my menu I get an error:
applescript sleep failed to execute properly and will not load the plugin assigned to the menu..

@sudocurse
Copy link

7. Do it again if it complains

Worked around the ~fifth time i did it!

@ignacio-dev
Copy link

What exactly do you do again if it complains? All of the steps?

@benj3484
Copy link

benj3484 commented Apr 21, 2023

For anyone still holding out hope. I've managed to get this working on M2 Max running Ventura 13.2.1. I went through the steps mentioned a few times to no avail and gave up and completely uninstalled with app cleaner.

Decided later to have another go, installed the beta version, allowed all access permissions and opened hammerspoon in package contents and it's working! Terminal needs to stay open for it to work.

I'm no coder

@kwvg kwvg removed the macOS 12 label May 21, 2023
@kwvg kwvg changed the title [Bug] LES is unable to register accessibility permissions on macOS 12 [Bug] LES is unable to register accessibility permissions on macOS 11 or greater May 21, 2023
@kwvg
Copy link
Member

kwvg commented May 21, 2023

👋 ! It's been quite a while since the last release but recently the stars have aligned and I was able to do more than just do minor bump in the Hammerspoon base. It hasn't helped that Ventura overhauled a few things and thus made LESforMacOS an even buggier mess.

But, there's good news. Beta testing for v1.3.4 has begun and two betas have already been released and they're available for testing.

They're based on an updated Hammerspoon base and include fixes and additional guardrails that should improve application stability. They also include mitigations for permissions problems (see upstream issue, Hammerspoon#3301).

Testing of both versions would be appreciated. We want to know what got better and what got worse!

@ja159
Copy link

ja159 commented Sep 15, 2023

Thanks to the previous comments I successfully made LES work on my mac but having a shortcut not working which is "show automation in new lane". Tilda + Shift + Right Click just opens the window where i can show automation/map to macro. Can anyone help?

@nykymusic
Copy link

Hi guys and happy new year!

I've tried everything in this thread about 50 times and I am having no luck with this. Especially annoying bc I recently upgrade to a Mac and it worked perfectly before on windows. Are there any further updates to getting this to work, or is this still the provided fix? have downloaded and tried nearly every version so not sure where I'm going wrong here.

@dileysimon
Copy link

Recently upgraded to macOS 12 and going back isn't an option I am also having the same issue with LES

Have you tried the steps?

  1. Remove the LES
  2. Download and reinstall version 1.3.3-alpha
  3. System Settings -> Privacy & Security -> Accessibility, remove the LES with the - on the bottom
  4. System Settings -> Privacy & Security -> Accessibility, add the LES back with the + on the bottom
  5. Remove the les folder in your terminal type rm -rf ~/.les
  6. Right click in the Live Enhancement Suite in your Application folder and click open
  7. Do it again if it complains.

It works for me right now.

Worked for me as well, I was driving crazy. Thank you so much!

@dileysimon
Copy link

@nykymusic Search the comment by @edermariano, it worked out for me

@nykymusic
Copy link

@nykymusic Search the comment by @edermariano, it worked out for me

Cheers - can I ask which one you downloaded to make it work? The alpha link above doesn't work for me, and there seems to be only beta available on the download page?

@dileysimon
Copy link

dileysimon commented Jan 4, 2024 via email

@nykymusic
Copy link

hmm could you shoot me the link if possible? getting a 404 error when I click this one:
https://github.com/LiveEnhancementSuite/LESforMacOS/releases/tag/v1.3.3-alpha

@dileysimon
Copy link

dileysimon commented Jan 4, 2024 via email

@nykymusic
Copy link

thanks for that mate - tried all the steps ten times and still no good for me unfortunately

@Andrews-repo
Copy link

Recently upgraded to macOS 12 and going back isn't an option I am also having the same issue with LES

Have you tried the steps?

  1. Remove the LES
  2. Download and reinstall version 1.3.3-alpha
  3. System Settings -> Privacy & Security -> Accessibility, remove the LES with the - on the bottom
  4. System Settings -> Privacy & Security -> Accessibility, add the LES back with the + on the bottom
  5. Remove the les folder in your terminal type rm -rf ~/.les
  6. Right click in the Live Enhancement Suite in your Application folder and click open
  7. Do it again if it complains.

It works for me right now.

Worked for me as well, I was driving crazy. Thank you so much!

This worked for me just now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests