bug: "DeviceCheckProvider is not supported" when running on Simulator with debug enabled #631
Closed
5 of 16 tasks
Labels
bug/fix
Something isn't working
duplicate
This issue or pull request already exists
needs: triage
package: app-check
platform: ios
iOS platform
Plugin(s)
Version
6.0.0
Platform(s)
Current behavior
Even when initialising app check as per https://github.com/robingenz/capacitor-firebase-plugin-demo/blob/main/src/app/modules/firebase-app-check/firebase-app-check.page.ts, when running in an iOS 17 simulator I get
This is despite setting debug to true on initialise:
Which should use the
AppCheckDebugProviderFactory
. It should also be using AppAttest instead of DeviceCheck however after reading up on some similar issues I believe that's a red herring. It seems that the real issue is that in this plugin,Firebase.configure()
is being called BEFORE the AppCheck provider factory is being initialised, which makes it default to DeviceCheck, when as per the docs it should be called after.I think the solution will simply be to remove the override init that configures firebase before calling the initialize provider function. I've tested adding the DebugProvider init code to my
AppDelegate
so that it happens before the Capacitor code is executed and that has worked.Expected behavior
For the AppCheckDebugProvider to be used as expected when debug is enabled.
Reproduction
https://github.com/robingenz/capacitor-firebase-plugin-demo
Steps to reproduce
cap sync ios
Other information
No response
Capacitor doctor
💊 Capacitor Doctor 💊
Latest Dependencies:
@capacitor/cli: 6.0.0
@capacitor/core: 6.0.0
@capacitor/android: 6.0.0
@capacitor/ios: 6.0.0
Installed Dependencies:
@capacitor/cli: 6.0.0
@capacitor/ios: 6.0.0
@capacitor/android: 6.0.0
@capacitor/core: 6.0.0
[success] iOS looking great! 👌
[success] Android looking great! 👌
Before submitting
The text was updated successfully, but these errors were encountered: