-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
AppCheck + AppAttest getAppCheckToken failing for 10% of users in production #12629
Comments
I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight. |
@jacobsapps Thanks for sharing the detailed issue report and analysis. Are there any patterns on iOS version for the users that are seeing the issue? |
Hey @paulb777, it seems to be mostly iOS 17 users, but this isn't surprising as it's the latest version. Full results here: Notably we target 15+ and found zero errors from them. Fairly even device distribution across iPhone models. Noticed a couple issues were mentioned - #11264 is definitely experiencing the same issue ( Is this likely to be an AppCheck issue, or perhaps AppAttest itself on Apple's side? Let me know anything more I can do to help debug the issue. |
Thanks for sharing @jacobsapps. It's looking more and more like an issue on Apple's side. We've added additional error logging in a 10.18.2 version of AppCheckCore just published. In addition to the iOS version, there may be a pattern in the clientDataHash's that fail. |
Just to add +1 to this issue, I am experiencing the same issue since today afternoon.
for unknown reason the AppCheck stopped working for my project. |
@themtaysw As described above, the |
Hi there, experiencing the same issue. I am not getting the Note, similar to above comments, our implementation was working fine for a while and recently started failing with this error:
This is a really big issue for our team and any insight or workarounds would be greatly appreciated (besides turning off the enforcement itself). It is breaking a whole set of major workflows that rely on a valid App Check token. In the last 24 hours, we are seeing that our live app store build is getting: This is from ~30k calls, so its a very broad sample size, so something is definitely going wrong here with the 22% failure rate. |
Thanks for all the responses so far. So from what I've gathered, this You suspect it's an issue on Apple's side, and the recent Apple forums thread with the same issue has no response from Apple either. At this stage, if the issue is on Apple's side, would you suggest is it reasonable to look for another provider which isn't a wrapper on App Attest / Device Check? What has anyone else done? |
+1 on this issue. Affecting roughly 10% of our users. Following this issue for updates! |
We are experiencing same issue. Would be nice to get a solution |
we seeing this issue in a reproducible way when a user is migrating to a new phone and restoring their apps/data, let me know if additional data can help you |
@JonatanLoop Would you mind sharing if your app is using Firebase 10.17 or newer? (since it included #11986) Any additional failure details you can provide would be helpful in case there's another scenario that the fix didn't cover. Thanks! |
@andrewheard we are using 10.22 the following scenario is reproducible for us every time.
|
Thanks for this @JonatanLoop, you're doing God's work 🙏 |
@paulb777 any update on where it stands after we provided reproduction steps? we'll be forced moving off Firebase if there is no good fix in place in a short term |
Thanks for the repro case, @JonatanLoop. I had filed a feedback with Apple about this error and there are several causes, but one that seems to correspond with your report is that this error may appear when using a key ID that was attested from a previous installation of the app. That seems to explain why the delete and reinstall does the trick. I believe a similar approach to #11986 may work where the key ID is reset when this error is encountered. |
Hi everyone, I just released an update of a core dependency of Firebase App Check. The update should address this issue. The latest version of Firebase will pick up this point release. Please run |
Thanks for picking this up @ncooke3; I'll update to 10.26.0 and report back if I notice anything wrong. Out of interest, what was the root issue? |
Is this fixed in 10.26.0 or are we waiting for a 10.27 release? |
It's available now. The update was for a dependency of Firebase App Check and should be compatible with several of the recent versions of Firebase. Depending on whether you update via |
I'm on 10.26.0 and AppCheck 10.19.1 and am still getting logs that uninstalling then reinstalling the app is not 100% fixing the I have some reports that it is fixing it, however it's not for all users. Anyone else? cc @ncooke3 |
Description
We rolled out Firebase AppCheck to our iOS users last month, however there are a significant minority of users in production who are getting issues from DeviceCheck:
Docs for DCErrorInvalidInput unfortunately tell us less than the error itself:
https://developer.apple.com/documentation/devicecheck/dcerror-swift.struct/code/invalidinput
However there were 2 individuals on the Apple forums experiencing similar issues:
https://forums.developer.apple.com/forums/thread/700819
https://forums.developer.apple.com/forums/thread/744674
Our AppCheck implementation is as defined in the docs:
There was an issue last year, in May 2023, somebody with the exact same problem, getting frequent device check errors (
DCErrorInvalidInput
), as well as some less frequent errors (DCErrorInvalidKey
):#11264
This issue was closed in November 2023 after a bug-fix release, however the OP didn't confirm whether the issue was fixed after the change.
In November 2023, a change was rolled out in
10.18.0
which addressed theDCErrorInvalidKey
issue:#11986
I've not seen any
DCErrorInvalidKey
issues in our logs, so it seems that fix worked, however it didn't seem to prevent theDCErrorInvalidInput
issue I'm seeing. This issue is pretty critical for us; since we are currently blocking a sizeable minority of our users from creating accounts or making purchases.Reproducing the issue
Unsure specifically what's causing the issue but rolling out AppCheck into production caught a large minority of users who have this issue.
Firebase SDK Version
10.23.0
Xcode Version
15.2
Installation Method
Swift Package Manager
Firebase Product(s)
App Check
Targeted Platforms
iOS
Relevant Log Output
If using Swift Package Manager, the project's Package.resolved
No response
If using CocoaPods, the project's Podfile.lock
No response
The text was updated successfully, but these errors were encountered: