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]: Service app may stop working (temporarily lose Accessibility API permission) after update #344

Open
2 tasks done
csotiriou opened this issue Aug 27, 2023 · 4 comments
Assignees
Labels
bug Something isn't working low priority

Comments

@csotiriou
Copy link

Before Reporting

  • I have checked FAQ, and there is no solution to my issue
  • 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)

@csotiriou csotiriou added the bug Something isn't working label Aug 27, 2023
@intitni
Copy link
Owner

intitni commented Aug 27, 2023

Please make sure

  1. In the GitHub Copilot settings, the status is OK.
  2. 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).
  3. 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.

@csotiriou
Copy link
Author

csotiriou commented Aug 27, 2023

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.

@intitni
Copy link
Owner

intitni commented Aug 27, 2023

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.

Screenshot 2023-08-27 at 22 32 11

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.

@intitni intitni changed the title [Bug]: Stopped providing copilot suggestions after upgrading to 0.22 [Bug]: Service app may stop working (lose Accessibility API permission) after update Aug 27, 2023
@intitni intitni changed the title [Bug]: Service app may stop working (lose Accessibility API permission) after update [Bug]: Service app may stop working (temporarily lose Accessibility API permission) after update Aug 27, 2023
@csotiriou
Copy link
Author

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.

Screenshot 2023-08-27 at 22 32 11 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.

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

No branches or pull requests

2 participants