-
-
Notifications
You must be signed in to change notification settings - Fork 344
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]: real-time Suggestion do not working properly. #516
Comments
Please try updating the app to the latest version. If the issue persists, please let me know:
|
Codeium for Xcode 0.31.3 is currently the newest version available. 20240520-135611.mp4 |
Please simply use Copilot for Xcode. Codeium for Xcode is just a subset of the app. Moving text cursor will not trigger realtime suggestion and will cancel all previous requests, please don't move the text cursor by clicking or arrow keys in the video. |
@nenseso If you saw the animation that means the app was working. Maybe there was something wrong with the GitHub Copilot language server. Please turn on verbose log. Open Console.app and click start streaming, set the filter to |
Thanks for your response! I wasn’t sure what happened, but today when I upgraded my version to 0.33.1 beta, everything started working fine.
|
I started experiencing the same issue just a few days ago. It used to work perfectly say for 2 ~ 3 weeks ago. In the Console.app, I found the following message when the suggestion stops working:
Restarting Xcode and Copilot for Xcode together will bring back the suggestion prompts, but after a few minutes, the suggestions will stop again, i.e., no suggestion prompt during coding. |
@arigatou1985 This error happens when the the network request failed inside the language server. It's hard to tell what was going on. Please try setting the console filter to
Hopefully we can get more information from it. |
@arigatou1985 By the way, are you using self-signed certificates? I found that it can happen when I was using MITM on the GitHub Copilot domain names. It works at the beginning but stops working later. |
I tried to filter console logs using the same exact two filters above, but didn't get anything at all when the suggestion prompt stops working. Only console message relevant are from single filter: process CopilotForXcodeExtensionService, regarding server error as mentioned above. I'm sure my computer doesn't have self-signed certificates doing MITM related work when I experience the issue. GitHub copilot works perfectly fine continuously in my Visual Studio Code. From what I experimented with so far, when I restart Xcode, and copilot for Xcode, after about 4 minutes, suggestions prompt will stop working. |
@arigatou1985 Oh you have to turn on verbose log in the GitHub Copilot settings then restart the app. |
Yes, it was "checked" in the Service -> GitHub Copilot -> Advanced -> Verbose Log. |
@arigatou1985 It's weird. The only possible situation that I can think of is the language server has crashed. Please give this version a try: This version fixes a few bugs about the life cycle of the language server processes. If this version fixes it for you, could you please let me know if you were opening any files that seems suspicious to crash the language server? For example, large file, non-text file, file contains weird symbols? |
I trie this build, it doesn't help with the issue unfortunately. I tried on a small iOS project with less than 50 source files, approximately 1000 lines of code in total. No big binary files, or strange symbols in any source code. I extract a console log. Hope you can find something useful. |
@arigatou1985 sadly there is no useful information. It’s really weird that you can't see and logs from the ProtocolTransport category. Can you constantly get the errors you showed me after it stops working? Would you mind trying the following:
|
I will submit a build later to always post the logs no matter what the state of the toggle is later. |
I get those logs every time when suggestions stop working. But nothing from ProtocolTransport category. |
@arigatou1985 https://github.com/intitni/CopilotForXcode/releases/download/0.1.0/Copilot.for.Xcode.app.debug.20240530.2023.zip If you still can't see the logs, I honestly don't know what else we can do. You can still try:
|
I tried to delete the directory for complete uninstallation. Didn't help. |
@arigatou1985 Thank you! Let me know if you need any help. |
Im having the same problem as described by OP. None of the suggestions in this thread helps. Icon shows for a seconds and disappears without any suggestion of code snippet. Really annoying issue. My console logs indicates that file URI cannot be accessed...
|
@pawel-movelab please provide your settings in screenshots, logs, node version so that I can help you. You can get the logs by turning on verbose log in the GitHub Copilot settings, restart the service app if, open Console.app, click start streaming, and set the filter to one of the following
Or
You mentioned that the widget appears and disappears, did it crash? Or you have turned on “Hide circular widget”? |
@pawel-movelab If you don't see any log, I suspect that you are having a similar issue to that of arigatou1985. The language server is not launched properly. Do you mind setting up the debug server of the app by running Once you trigger a suggestion, I will be able to see the logs of it. I can read the prompt, too so please make sure don't do it on your real code. You can unset it later with If I can't see the logs either, it's probably the issue I just mentioned. Please try different "Run node with" options, and take a look into your |
I just made few attempts to trigger it in empty repo I created. Can you see it? |
@pawel-movelab I saw the error, it looks like the language server doesn't recognize the file. ![]() Please turn on enable Xcode Inspector debug menu in the advanced settings and show me the content in the menu. Also let me know if it works in a git enabled project. |
@pawel-movelab Sorry I have no idea. Everything looks correct to me. If the language server can't find the file, it's very likely that the open file notification sent to the language server is failed or not fired. If it failed, you should see the logs, with or without verbose log on. I still don't understand why you can't see the logs. Do you mind trying the Console.app again but this time set the filter to only If you still can't see them, all I can suggest is to build and run the app in Xcode. You need to run both the ExtensionService target and the CommunicationBridge target. You may want to look at |
I am getting hits in Console app with the filter you suggested: Try getting suggestions again: Language server error: Server error: -32602 Document for URI could not be found: file:///user/file.swift, URIs of the known document are: nil |
@pawel-movelab I can get the same error if I disable the files and folders permission, do you want to check that? System settings > Privacy and Security > Files and Folders |
After enabling access to all locations and restarting both Xcode and Copilot for Xcode apps it started to work! Thank you! 🥳 Btw I just noticed that tab aceepting suggestions in playground won't work. |
@pawel-movelab Only in playground? |
Yes, only there. In Xcode works normally |
@pawel-movelab Can you accept the suggestions in other ways, for example the buttons? |
Yes, the button accepting works |
@pawel-movelab That's super weird. Does it work if you create a swift file in the Sources folder in the playground and try them out? Can you upload the playground file and let me know which folder/path it is in? |
@pawel-movelab Oh yeah, I forgot there are a lot of logs about tab to accept were added to the latest build. Please set the Console.app filter to category:Debug, let me know what you observed. |
@intitni I tested again and after our yesterday fix it works as well in Playgrounds! Thanks a lot for your fast help and replies! |
Before Reporting
What happened?
The software enables real-time Suggestion.
As the code was being written, a feature was triggered, but no advice was given.
If this feature is triggered manually, any recommendations are still given。
20240520-114046.mp4
How to reproduce the bug.
It just happened!
Relevant log output
No response
macOS version
14.5
Xcode version
xcode 15.4
Copilot for Xcode version
0.31.3
The text was updated successfully, but these errors were encountered: