-
Notifications
You must be signed in to change notification settings - Fork 26
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
Causes the whole app to slow down before login #104
Comments
I assume y'all didn't intentionally add merge conflicts to the bug report template. With that assumption in-mind, I've filed #105 |
Hey @BenLeggiero, is your app linking against MSAL? This sounds a lot like this issue, which was fixed in 12.6.1. Could you try upgrading to the latest release and let me know if that addresses this for you? |
That issue looks unrelated, @Kyle-Reis, but I'll try using the latest releases just in case. |
This was never easy to reproduce - often one device would exhibit this bug consistently for days before suddenly working as expected. Other devices might never exhibit this behavior, some of these would suddenly start after awhile. All that said, after updating Intune and MSAL, we cannot reproduce this on the devices which could reproduce it yesterday. |
We're still investigating, but after updating the IntuneMAM and MSAL frameworks, we're getting this crash. We aren't 100% sure where it's coming from, but IntuneMAM/MSAL might be contributors. Downgrading them once again, and running the IntuneMAMConfigurator, had no effect. Reverting to our commit for our shipped product also had no effect; the crash persisted:
I've seen a similar crash when trying to use 1Password to fill in the same login field. |
Hi @BenLeggiero, this doesn't look like a crash to me... It looks like the OS is putting up a dialog informing the user of an MSAL auth attempt that is using ASWebAuthenticationSession? Is there any particular reason that you chose to use ASWebAuthenticationSession over WKWebView? If you do need it, have you enabled the SafariViewControllerBlockedOverride setting in the Info.plist as mentioned here? Also, just wanted to point out that there is potential for data leak when using this flag, as mentioned in the linked section above. |
@Kyle-Reis it is a crash. The above screenshot is the last app state before the crash. Without the debugger, the app disappears and Springboard is shown. With the debugger, it pauses here in Here's a crash report file (there are many very similar to this): Our code never references |
@BenLeggiero, Ah, MSAL actually uses ASWebAuthenticationSection by default. Could you try using a WKWebView instead as described here: https://docs.microsoft.com/azure/active-directory/develop/customize-webviews#change-per-interactive-request |
After changing our code to pass It seems odd to use a discouraged approach as the default. Is there any particular reason that you chose to use ASWebAuthenticationSession over WKWebView? |
@BenLeggiero, Great to hear the issue is resolved! MSAL and Intune are two separate products, and app developers may integrate MSAL for authentication without integrating the Intune SDK. The MSAL team decided to make ASWebAuthenticationSession the default web view for interactive auth. I'm not sure what their reasoning for doing so was. My guess would be that for ASWebAuthenticationSession, tokens can be cached in the system keychain allowing for SSO between apps from different publishers. In any case, ASWebAuthenticationSession in only discouraged from the Intune perspective, and when the Intune SDK handles interactive authentication (for apps that call our loginAndEnrollAccount method), it does configure MSAL to use WKWebView. So the recommendation for apps initiating their own interactive auth and then enrolling in Intune silently is to not use the default and instead use WKWebView. I'll update our documentation to make it clear that ASWebAuthenticationSession is the default web view used by MSAL and that developers should explicitly use WKWebView in this scenario. |
Describe the bug:
When running an app with the Intune SDK linked, it is so slow before login that it takes multiple seconds for the system keyboard and app to recognize a keystroke. This makes it unusable by customers.
My investigation seems to indicate that this is associated with excessive logging, allocations, and a memory leak. This is borne out in the screenshots.
To Reproduce
Steps to reproduce the behavior:
Expected behavior:
App is responsive
Screenshots and logs:
Smartphone (please complete the following information):
Intune App SDK for iOS (please complete the following information):
Additional context:
This appears to be a critical flaw which causes both massive logs and unnecessary allocations. It appears to also involve memory leaks.
Intune took up so many memory allocations that just debugging it crushed my 2020 MacBook Pro 16" to a crawl, and filled up its hard drive with swap files.
The text was updated successfully, but these errors were encountered: