-
Notifications
You must be signed in to change notification settings - Fork 54
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
fix: MacOS crash on startup #428
Conversation
I'm guessing you've looked at #215 This will need a few code changes for working on windows but I think this makes sense to me overall. couple questions though:
|
|
Not sure if it fixes #215 tho. Seems similar, but they had no crash |
I tried making a release bundle using the instructions (yarn), and it also works. 😃 |
I will probably bump the timeout to like 5-10 minutes and the polling up to maybe 10 seconds. |
Remember we're waiting to start the program. Polling every 10 seconds is very slow, once per second is not resource intensive - if that's your concern. Also keeping the program open for 5-10 minutes, waiting for permissions, while the program does absolutely nothing might be confusing for the user. A compromise would be: wait for 30 seconds, if, after 30 seconds, there's still no permission display a popup explaining the situation and gracefully quit. I can make that if we agree on it.
I did as you requested, and it still works. 🙂 In any case, the best test would be for the user in question to get a new build in their hands, to see for themselves. I have no reason to believe it wouldn't work for him, as our issues were so similar. |
Ok I think I'm going to merge this then. I'm going to move stuff around a tiny bit, I don't think having the whole thing in an async arrow will cause issues but just as a caution since I'm not super familiar with this part of the code, I'm going to move this to another function and make it only run async on mac. I'll ping you once I change that so you can test to confirm it still works |
Up to you, but the async code shouldn't cause any issues. But I can relate to being cautious. 🙂 Let me know. I'll test it. |
may be pushed back until next release after v0.8.0, been playing too much poe1 and major poe2 update for me just dropped so i need to push a fix |
Mac calls that in async, other platforms proceed in sync.
@larssn Let me know if this change works, I just moved the main startup stuff (everything after the accessibility check you added) into a function, then called that asynchronously when on mac and synchronously otherwise. |
I'll give it a look later today |
I've tested it and there are 2 problems now: Second problem is that when I get EE2 running, it no longer works in-game. There's no notification popup anymore, that EE2 is running, nor does any of the shortcuts work. I've tried the usual: doing the code sign again, and re-adding the accessibility entry. Didn't help. Unless you have any suspicions about what is going on here, I'll have to dig deeper, but I'm pretty busy this week. Thanks! 😊 |
Fixed merge conflict.
So just clarifying, this is after the onready has been fixed it just doesn't work now. gotta go to work, so either way I'll look onto the diff from what you originally had tonight |
Correct, it doesn't work, even after I've made the startup fix. |
not urgent since you said you were busy this week Not quite sure why the previous one didn't work, made a change, let me know if you want me to keep trying stuff or if you want to try on your end. |
I think I'll have time to test it today. If it still doesn't work, I'll tackle it. Doesn't make sense for you to blindly go through all the changes. |
It works! However a caveat: It only works if you reset with codesign and start the app while path of exile is running. If you run it before, it doesn't seem to detect when the game is launched. Minor issue I suppose. |
So I've tried my hand at fixing the issue in #427.
I've gotten it working with the
npm run dev
command, and verified that it works ingame, when the game is running in Steam using CrossOver. I've only verified it in dev mode.I need someone to verify that it still works in Windows.
The solution itself should be self-evident: If there's no accessibility permissions, it waits 15 seconds for it to be granted, polling every second.
Fixes #427