CopilotForXcode
CopilotForXcode copied to clipboard
[Bug]: Service app may stop working (temporarily lose Accessibility API permission) after update
Before Reporting
- [X] I have checked FAQ, and there is no solution to my issue
- [X] I have searched the existing issues, and there is no existing issue for my issue
What happened?
I was expecting to get suggestions during coding, but I get no suggestions.
How to reproduce the bug.
After updating to version 0.22.2 (I was previously using 0.20), the service stopped providing any suggestions. Even if I go manually to the Editor -> Copilot -> Get Suggestions , I get no suggestions whatsoever. Other apps (like VSCode when used with the appropriate extension) provide suggestions.
Relevant log output
No response
macOS version
13.4.1
Xcode version
14.3.1
Copilot for Xcode version
0.22.2
Node version
v18.16.0 (installed via nvm)
Please make sure
- In the GitHub Copilot settings, the status is OK.
- There is only 1 copy of Copilot for Xcode.app on your machine, so that Xcode can talk to the correct one (Xcode is just stupid).
- You have restarted Xcode, and opened Copilot for Xcode.app once after the update.
If you have done the above steps, but the issue persists, please turn on verbose log in the GitHub Copilot settings, and observe the logs in Console.app.
You can set the filter to category:GitHubCopilot to see the relevant logs.
Thanks for the suggestion. Somehow, after restarting my computer it works. However, I would like to mention something that may have to do with the issue. I'm not entirely sure that the issue was an isolated incident.
Previously (when the suggestions weren't working) in the "Xcode Inspector Debug" option of the Copilot Service menu bar, I got the following options: Active Project
and Active Document
. When I had the issue, both of those options remained empty no matter what I did (restarted the extension, restarted Xcode, opening and closing the project).
After restarting, however, I see those two options filled, with their proper values, and it just so happens that suggestions work again. It seems like previously the service couldn't identify which file was open and active to provide suggestions for.
Not sure what happened, I thought I should share this here in case someone else figures out what's causing this issue.
I think for some reasons the service app temporarily loses Accessibility API permission after the update so that it can't observe the changes of Xcode.
I will change the title of this issue and keep it open. But I am not sure if there is anything I can do with it.
For anyone who has this issue, you can try regranting permission to the service app.
I think for some reasons the service app temporarily loses Accessibility API permission after the update so that it can't observe the changes of Xcode.
I will change the title of this issue and keep it open. But I am not sure if there is anything I can do with it.
For anyone who has this issue, you can try regranting permission to the service app.
This was exactly my problem as well. I noticed that at the same time Magnet (a popular window management application) also was not not working before the restart, and that, too, requires accessibility permissions to be granted.