intitni / CopilotForXcode

The first GitHub Copilot, Codeium and ChatGPT Xcode Source Editor Extension
https://copilotforxcode.intii.com
MIT License
7.84k stars 386 forks source link

[Bug]: Unable to use Apple Pay in Safari when Copilot is running #508

Open NSFatalError opened 6 months ago

NSFatalError commented 6 months ago

Before Reporting

What happened?

I found out that Copilot interferes with Apple Pay confirmation sheet in Safari. Touch ID input (or password input if Touch ID is disabled) disappears from the view, making it impossible to complete the payment. Quitting Copilot solves the issue immediately.

When I was trying to understand why it happens, I found out that Touch ID input disappears if the Apple Pay sheet is in any way obscured by another window or screen boundary - you can see this happening in the attached video.

Google Drive link to video (even downscaled was to big to fit as attachment on Github): https://drive.google.com/file/d/18a7UAO28YXAwfzZaqztZZq5I2CAkZW64/view?usp=sharing

How to reproduce the bug.

Open a website with Apple Pay functionality (https://applepaydemo.apple.com is great for debugging this), and try to complete the payment while Copilot and Xcode are running.

Please do note that while the issue occurs often, it doesn't occur always. Sometimes Touch ID input is visible despite Copilot and Xcode running in the background. I did not find specific pattern that triggers the issue, but it shouldn't be hard to reproduce though.

Relevant log output

No response

macOS version

14.4.1 (23E224)

Xcode version

15.3 (15E204a)

Copilot for Xcode version

0.32.3

intitni commented 6 months ago

Sadly, Apple Pay in Safari is not available in my country, I can't even add a card to my Mac.

If anyone wants to help debugging this, the app maintains several windows and all of them can be found in /Core/Sources/SuggestionWidget/WidgetWindowsController.swift.

intitni commented 6 months ago

I have created this project that only contains the window part of the app.

For anyone interested in helping debugging this issue and but don't want to build the whole Copilot for Xcode project, you can use that project instead.