Skip to content
This repository has been archived by the owner on Mar 30, 2021. It is now read-only.

Application will not restart after update in macOS Mojave #674

Closed
xrubioj opened this issue Nov 7, 2018 · 5 comments
Closed

Application will not restart after update in macOS Mojave #674

xrubioj opened this issue Nov 7, 2018 · 5 comments

Comments

@xrubioj
Copy link
Contributor

xrubioj commented Nov 7, 2018

This issue is partially related to issue #668 and was discussed in PR #670. I'm pasting the conclusion reached in #670 to continue it here.

The application is not restarted because of this piece of code:

    eventTap = CGEventTapCreate(kCGSessionEventTap,
                                kCGHeadInsertEventTap,
                                kCGEventTapOptionDefault,
                                mask,
                                event_tap_callback,
                                (__bridge void *)(self));
    [self refreshMikeys];

    if (!eventTap) {
		fprintf(stderr, "failed to create event tap\n");
		exit(1);
    }

I order to test, you have to go to System Preferences -> Privacy -> Accessibility and remove old Radiant Player. First time you run the build, you will get a dialog asking you to open System Preferences to give permission to the app. Then, you will have to run the app again.

That being said, if that's the case for the final, release build, maybe a signature key or something like this has changed, as my understanding is that once you've given permission to the app, as far as the signature is the same, you should need to give it again.

Update: works for me, after removing old Radiant Player in the System Settings, adding it again and running it again. I've tried it by downloading the package from GitHub releases and running it directly from Downloads folder, and also by updating it from the old app. In both cases I had to do the same drill, remove old app from Security Settings, adding it again and finally running the app again. Does this mean there's some kind of signature check? Or is something new from Mojave that need to be addressed? My guess is the later.

Finally, my understanding is that the event tap is used to be able to react to media keys (maybe I'm wrong on this), and thus the app should not require it to work (but this implies changing the way this is initialized, etc.)

@ryofurue
Copy link

ryofurue commented Nov 8, 2018

I've just donwloaded radiant-player-v1.11.6.zip and installed it. The player just disappears (crashes?) as soon as it's launched, without any messages.

@xrubioj talks about "Accessibility" but I didn't find anything about Radiant Player in there. (That may perhaps be because I had removed the older Radiant Player before installing the new one.)

@xrubioj
Copy link
Contributor Author

xrubioj commented Nov 8, 2018

@ryofurue As I mention, first check in System Preferences -> Privacy -> Accessibility to see if Radiant Player is there. If so, remove it. That's needed for next steps.

Then, first time you run it again you will get a dialog stating that Radiant Player needs accessibility permissions (not sure on the exact wording, my macOS language is not English), and it offers two options: open System Preferences or Deny. You have to select open System Preferences (will be taken to the same screen as in the first step), and Radiant Player should be back, but unchecked. Make sure it is checked.

After previous steps, when you start Radiant Player again it should work.

@ryofurue
Copy link

ryofurue commented Nov 9, 2018

@xrubioj

System Preferences -> Privacy -> Accessibility

Ah, that made me realize that I was mistaken. I looked at "System Preferences -> Accessibility" instead.

So, yes, all you said in your initial post applies to my system and I've got Radiant Player back!

Thank you for your help!

@Dutchy-
Copy link

Dutchy- commented Nov 13, 2018

For me, after the crashes and removing Radiant Player from Accessibility, it never gave a popup again to add it to Accessibility. However, after adding it manually it started just fine. Thanks for describing the problem :)

xrubioj added a commit to xrubioj/radiant-player-mac that referenced this issue Nov 18, 2018
This fixes/mitigates the issue radiant-player#674: "Application will not restart after
update in macOS Mojave"
@xrubioj
Copy link
Contributor Author

xrubioj commented Nov 18, 2018

I've created PR #676 to provide guidance to the user in this case, so it's clear for her/him which steps needs to take.

@xrubioj xrubioj closed this as completed Nov 22, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants