Open MSL-BIT opened 2 months ago
I have exactly the same issue!
I have the same issue. The thing is that when I run the package in a clean app it works with xcode 16 RC and iOS 18 simulator. @MSL-BIT can you confirm if for you it also works in a clean flutter app?
@MSL-BIT Did you also check if this happens using a real device?
For me this only happens on iOS 18 simulators (also building with Xcode 15). When targetting a physical device I do not see the issue.
The issue seems to happen when arm64 is excluded for simulator.
Any solution for this? I am able to test on a real device (Iphone SE) but unable to run any testing on simulators.
[Edit] Using Simulator with iOS 17.5 allows me to test.
I've tried the example app on an iPhone 16 simulator with iOS 18 and works fine
https://github.com/user-attachments/assets/c2324360-38e8-4244-b7a8-10d73aad1916
The example app doesn't have any excluded architectures either so whilst I've not tried it out myself, I'm inclined to believe what @RutgerVleuten shared is the reason. Has everyone here already checked this? This would be a setting for your individual apps
I was having the same issue for days and erasing excluded archs resolved for me
For us, removing arm from the excluded archs is not really a possibility as the App is afterwards unable to be built. We then get an error like: Building for 'iOS-simulator', but linking in object file (...) built for 'iOS' where Stack Overflow mentions to add arm64 to the excluded archs: https://stackoverflow.com/questions/63607158/xcode-building-for-ios-simulator-but-linking-in-an-object-file-built-for-ios-f
@sillydomnom and me aligned to also try to run xCode 16.1 Beta 2 and the same issue is happening again.
So I did nothing but with the latest Flutter version it worked automatically. I do not know if this is connected to the Flutter upgrade but now the website is loaded successfully.
@sillydomnom we have the same issue because there dependencies on MLKit that has no ARM64 simulator slice.
I managed to isolate the issue and it's on Apple's side. Seems running an app as Intel using Rosetta fails on an iOS 18.x simulator when starting an ASWebAuthenticationSession.
I reported it to Apple DTS with an example (see below) and waiting for response.
func authenticateWithGoogle() {
// Google OAuth 2.0 Authorization URL (example)
let clientID = "your-google-client-id.apps.googleusercontent.com"
let redirectURI = "com.yourapp:/oauth2redirect"
let scope = "profile%20email"
let responseType = "code"
let authURLString = """
https://accounts.google.com/o/oauth2/v2/auth?client_id=\(clientID)&redirect_uri=\(redirectURI)&response_type=\(responseType)&scope=\(scope)
"""
guard let authURL = URL(string: authURLString) else {
print("Invalid authentication URL")
return
}
let authSession = ASWebAuthenticationSession(
url: authURL,
callbackURLScheme: "com.yourapp"
) { callbackURL, error in
if let error = error {
print("Authentication failed: \(error.localizedDescription)")
} else if let callbackURL = callbackURL {
self.handleCallbackURL(callbackURL)
}
}
authSession.presentationContextProvider = self
authSession.start()
}
@MaikuB Issue is there when you exclude Arm64 from your build. When you have nothing filled in it is included, like in your example app, this app will run native on an Apple silicon machines.
If you exclude arm64 (by filling this in the excluded architectures) it runs your app's process as "Intel" using rosetta 2.
And in this case you have the issue of the login WebView getting stuck on an iOS 18 simulator.
See also my previous post
I don't use ios simulator for 2 weeks already because of it. So we have to wait for Xcode 16.1 or AppAuth lib update?
Same here...
Xcode 16.1 with iOS 18.1 simulator, still does not work.
Please tell us what to wait for.. we can't use ios simulators for more than a month already. Deleting excluded architectures is not an option, because then something else stops working
@Shakle did you read/see https://github.com/MaikuB/flutter_appauth/issues/534#issuecomment-2378886680?
@MaikuB yes, but feels like it can be fixed even in a year or more, because Apple does not respond and care. So i thought that maybe some workaround is present, because i can't believe that everyone has just stopped using ios simulators.
Had a call with Apple yesterday night to clarify the issue. It has now been escalated to the development team that's responsible for Simulators. They will send me an update if the issue is already on their backlog or if it's new.
Keep you posted.
note: since it's not a issue on a actual device and only i.c.w. Rosetta it will probably be not prioritised very high.
@RutgerVleuten thanks. Based on what I could see online, this technically shouldn't be new to them and have seen some comments that it was raised during beta
https://forums.developer.apple.com/forums/thread/764367 https://forums.developer.apple.com/forums/thread/764468
@MaikuB thanks for the links, have added them to the submitted case.
I confirm.
Removing arm from excluded architectures list next to simulator fixes the issue.
The app gets stuck after login on an iOS 18 device. The shell build from updated Mac, using the latest Xcode, works without involving Appium. However, the simulator displays the following console error: IntegrationApp(769,0x1f0094c00) malloc: xzm: failed to initialize deferred reclamation buffer (46).
I wanted to ensure that my app runs smoothly on iOS 18, so I downloaded Xcode 16.0 beta 3 (16A5202i) and attempted to log in using AppAuth.
During testing on the simulator, I encountered an issue where the Safari ViewController appeared to freeze. The app didn’t crash, but it stopped producing console logs.
I'm using the flutter_appauth: ^7.0.0 version, and I also tested with version 6.0.7, but I experienced the same issue with both.