8000 🐛 Bug Report: [Apple SDK] XPC Connection Interrupted causes App to Freeze · Issue #6206 · appwrite/appwrite · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

🐛 Bug Report: [Apple SDK] XPC Connection Interrupted causes App to Freeze #6206

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

Closed
2 tasks done
ItzNotABug opened this issue Sep 9, 2023 · 5 comments
Closed
2 tasks done
Assignees
Labels
bug Something isn't working

Comments

@ItzNotABug
Copy link
Member

👟 Reproduction steps

There's a use of DispatchGroup in Account.swift which most of the time causes the app to freeze when the app opens the Safari App for OAuth.

Flow:

  1. I used this: let status = try account.createOAuth2Session(provider: "google")
  2. App opens Safari browser & goes into background
  3. Sign In with your Account, the generic Missing Redirect page shows up which triggers app open via deep-link
  4. App freezes with above error after deep link open.

I manually commented out the DispatchGroup implementation in the Account.swift and it seems to work smooth!


Note:
As I have multiple deep-links I cannot directly use registerOAuthHandler() on a View.
So, I manually check the URLComponents received if valid, I use WebAuthComponent.handleIncomingCookie(from: url)

👍 Expected behavior

App should not freeze.

👎 Actual Behavior

App freezes, sometimes even before opening.

🎲 Appwrite version

Version 1.3.x

💻 Operating system

Linux

🧱 Your Environment

No response

👀 Have you spent some time to check if this issue has been raised before?

  • I checked and didn't find similar issue

🏢 Have you read the Code of Conduct?

@ItzNotABug ItzNotABug added the bug Something isn't working label Sep 9, 2023
@ItzNotABug ItzNotABug changed the title 🐛 Bug Report: [Apple SDK] XPC Interrupted causes App to Freeze 🐛 Bug Report: [Apple SDK] XPC Connection Interrupted causes App to Freeze Sep 10, 2023
@ItzNotABug
Copy link
Member Author

Another thing is:
WebAuthComponent.swift has below :

#if canImport(SwiftUI)
    openURL(url)
#endif

This will throw a warning: Accessing Environment<OpenURLAction>'s value outside of being installed on a View. This will always read the default value and will not update.

Alternative could be to use the UIApplication.shared.open(url, options: [:], completionHandler: nil).

@abnegate
Copy link
Member

Thanks @ItzNotABug for the report! A fix is in progress, I'll update again when it's released.

@ItzNotABug
Copy link
Member Author

Thanks for the update @abnegate.
Would the fix be targeted against appwrite 1.4x? If so, this wouldn't be backwards compatible I guess...

@abnegate
Copy link
Member

Thanks for the update @abnegate. Would the fix be targeted against appwrite 1.4x? If so, this wouldn't be backwards compatible I guess...

@ItzNotABug Yep it will target 1.4.x, but we can backport it to the 1.3.x SDK since the issue is present there too. Once the fix PR is merged, I'll follow up on that.

@abnegate
Copy link
Member

Closing as resolved in versions 4.0.1 (1.4.x) and 2.0.1 (1.3.x)

cc @ItzNotABug

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

No branches or pull requests

2 participants
0