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

Fix login crash on Xcode 14 builds #6728

Merged
merged 2 commits into from
Sep 16, 2022
Merged

Conversation

Johennes
Copy link
Contributor

Fixes #6722

To be honest, I'm not sure if this is a Swift bug or not but the additional @MainActor appears to force the awaited call onto the main thread which prevents the assertion.

Pull Request Checklist

  • I read the contributing guide
  • UI change has been tested on both light and dark themes, in portrait and landscape orientations and on iPhone and iPad simulators
  • Accessibility has been taken into account.
  • Pull request is based on the develop branch
  • Pull request contains a changelog file in ./changelog.d
  • You've made a self review of your PR
  • Pull request includes screenshots or videos of UI changes
  • Pull request includes a sign off

@Johennes Johennes requested a review from pixlwave September 15, 2022 19:23
@github-actions
Copy link

github-actions bot commented Sep 15, 2022

📱 Scan the QR code below to install the build for this PR.
🔒 This build is for internal testing purpose. Only devices listed in the ad-hoc provisioning profile can install Element Alpha.

QR code

If you can't scan the QR code you can install the build via this link: https://i.diawi.com/fsALxs

@codecov
Copy link

codecov bot commented Sep 15, 2022

Codecov Report

Base: 9.92% // Head: 9.96% // Increases project coverage by +0.03% 🎉

Coverage data is based on head (9a1c12f) compared to base (75bd23d).
Patch coverage: 57.14% of modified lines in pull request are covered.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #6728      +/-   ##
===========================================
+ Coverage     9.92%    9.96%   +0.03%     
===========================================
  Files         1484     1484              
  Lines       150486   150506      +20     
  Branches     60742    60752      +10     
===========================================
+ Hits         14934    14992      +58     
+ Misses      135006   134960      -46     
- Partials       546      554       +8     
Impacted Files Coverage Δ
...tion/Common/Service/MatrixSDK/SessionCreator.swift 67.74% <ø> (ø)
...ication/Common/Service/MatrixSDK/LoginWizard.swift 35.93% <50.00%> (ø)
.../Common/Service/MatrixSDK/RegistrationWizard.swift 36.31% <100.00%> (ø)
...iot/Modules/Analytics/SentryMonitoringClient.swift 0.00% <0.00%> (ø)
...Recents/Service/MatrixSDK/RecentsListService.swift 12.32% <0.00%> (+0.15%) ⬆️
Riot/Modules/Application/LegacyAppDelegate.m 13.40% <0.00%> (+0.60%) ⬆️
...anagers/PushNotification/PushNotificationService.m 11.45% <0.00%> (+1.04%) ⬆️
...ing/SplashScreen/View/OnboardingSplashScreen.swift 58.66% <0.00%> (+4.00%) ⬆️
Riot/Modules/Application/AppDelegate.swift 55.38% <0.00%> (+4.61%) ⬆️
...calAuthentication/LocalAuthenticationService.swift 54.54% <0.00%> (+27.27%) ⬆️
... and 1 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

This covers all login and registration options.
@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

Copy link
Member

@pixlwave pixlwave left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've pushed another commit on here that puts the session creator method on the main actor instead. This fixes registration and SSO login as well.

@Johennes Johennes merged commit 60c8be0 into develop Sep 16, 2022
@Johennes Johennes deleted the johannes/xcode14-login-crasher branch September 16, 2022 12:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Xcode 14: There's a thread assertion hit when logging in to an account.
2 participants