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

[firebase_app_check]: MacOS : The attestation provider AppAttestProvider is not supported on current platform and OS version #17057

Open
1 task done
Tom3652 opened this issue Feb 5, 2025 · 3 comments
Labels
blocked: firebase-sdk platform: macos Issues / PRs which are specifically for MacOS. plugin: app_check type: enhancement New feature or request

Comments

@Tom3652
Copy link

Tom3652 commented Feb 5, 2025

Is there an existing issue for this?

  • I have searched the existing issues.

Which plugins are affected?

App Check

Which platforms are affected?

macOS

Description

I would like to re-open #10934 because i have hundreds of crashlytics reports for my live app on the Mac App Store (MacOS).

I would like to draw your attention on 2 specific cases :

  1. The error : The attestation provider AppAttestProvider is not supported on current platform and OS version is thrown but my FirebaseAppCheck setup is the following :
await FirebaseAppCheck.instance.activate(
      androidProvider: kDebugMode || kProfileMode
          ? AndroidProvider.debug
          : AndroidProvider.playIntegrity,
      appleProvider: kDebugMode || kProfileMode
          ? AppleProvider.debug
          : Platform.isMacOS
              ? AppleProvider.deviceCheck
              : AppleProvider.appAttestWithDeviceCheckFallback);

So the first problem is that this error is thrown while i specify only AppleProvider.deviceCheck on MacOS.

  1. This same error means that AppAttest is not supported on MacOS, but nothing prevents us from using it inside the app which leads to this kind of errors.

Reproducing the issue

  1. Setup a flutter app to support MacOS
  2. Add the app check code with the multiple values deviceCheck - appAttest - appAttestWithDeviceCheckFallback to see the different cases: await FirebaseAppCheck.instance.activate(appleProvider: AppleProvider.appAttestWithDeviceCheckFallback);
  3. See the errors

Firebase Core version

firebase_core: ^3.10.1

Flutter Version

3.27.3

Relevant Log Output

Flutter dependencies

Expand Flutter dependencies snippet
Dart SDK 3.6.1
Flutter SDK 3.27.3
test_database 1.0.0+1

dependencies:
- firebase_app_check 0.3.2+1 [firebase_app_check_platform_interface firebase_app_check_web firebase_core firebase_core_platform_interface flutter]
- firebase_core 3.10.1 [firebase_core_platform_interface firebase_core_web flutter meta]
- flutter 0.0.0 [characters collection material_color_utilities meta vector_math sky_engine]

dev dependencies:
- flutter_lints 4.0.0 [lints]
- flutter_test 0.0.0 [flutter test_api matcher path fake_async clock stack_trace vector_math leak_tracker_flutter_testing async boolean_selector characters collection leak_tracker leak_tracker_testing material_color_utilities meta source_span stream_channel string_scanner term_glyph vm_service]

transitive dependencies:
- _flutterfire_internals 1.3.50 [collection firebase_core firebase_core_platform_interface flutter meta]
- async 2.11.0 [collection meta]
- boolean_selector 2.1.1 [source_span string_scanner]
- characters 1.3.0
- clock 1.1.1
- collection 1.19.0
- fake_async 1.3.1 [clock collection]
- firebase_app_check_platform_interface 0.1.1+1 [_flutterfire_internals firebase_core flutter meta plugin_platform_interface]
- firebase_app_check_web 0.2.0+5 [_flutterfire_internals firebase_app_check_platform_interface firebase_core firebase_core_web flutter flutter_web_plugins web]
- firebase_core_platform_interface 5.4.0 [collection flutter flutter_test meta plugin_platform_interface]
- firebase_core_web 2.19.0 [firebase_core_platform_interface flutter flutter_web_plugins meta web]
- flutter_web_plugins 0.0.0 [flutter characters collection material_color_utilities meta vector_math]
- leak_tracker 10.0.7 [clock collection meta path vm_service]
- leak_tracker_flutter_testing 3.0.8 [flutter leak_tracker leak_tracker_testing matcher meta]
- leak_tracker_testing 3.0.1 [leak_tracker matcher meta]
- lints 4.0.0
- matcher 0.12.16+1 [async meta stack_trace term_glyph test_api]
- material_color_utilities 0.11.1 [collection]
- meta 1.15.0
- path 1.9.0
- plugin_platform_interface 2.1.8 [meta]
- sky_engine 0.0.0
- source_span 1.10.0 [collection path term_glyph]
- stack_trace 1.12.0 [path]
- stream_channel 2.1.2 [async]
- string_scanner 1.3.0 [source_span]
- term_glyph 1.2.1
- test_api 0.7.3 [async boolean_selector collection meta source_span stack_trace stream_channel string_scanner term_glyph]
- vector_math 2.1.4
- vm_service 14.3.0
- web 1.1.0

Additional context and comments

No response

@Tom3652 Tom3652 added Needs Attention This issue needs maintainer attention. type: bug Something isn't working labels Feb 5, 2025
@SelaseKay SelaseKay added platform: macos Issues / PRs which are specifically for MacOS. plugin: app_check labels Feb 5, 2025
@SelaseKay
Copy link
Contributor

Hi @Tom3652, thanks for the report. I couldn’t find any documentation indicating that App Attestation is supported on macOS. According to this page, macOS support is still in beta, which might explain the issue.

@SelaseKay SelaseKay added blocked: customer-response Waiting for customer response, e.g. more information was requested. and removed Needs Attention This issue needs maintainer attention. labels Feb 5, 2025
@Tom3652
Copy link
Author

Tom3652 commented Feb 5, 2025

Hi @SelaseKay, yes indeed you are right this is still in beta but i assumed this was supported based on pub.dev :

Image

That's why i have raised the issue, but you are probably right and we need to wait for the native SDK to support AppAttest on MacOS.

Regarding the other part of my issue, my concern is that i have this error The attestation provider AppAttestProvider is not supported on current platform and OS version whereas i am forcing deviceCheck in the activate method for MacOS.
Why is it trying to request App Attest in that case ?

@google-oss-bot google-oss-bot added Needs Attention This issue needs maintainer attention. and removed blocked: customer-response Waiting for customer response, e.g. more information was requested. labels Feb 5, 2025
@MichaelVerdon MichaelVerdon added type: enhancement New feature or request and removed type: bug Something isn't working labels Feb 6, 2025
@MichaelVerdon
Copy link
Contributor

Hey there, the MacOS version you are using might have an influence on it. It is a known problem that on some versions of Mac the device check API always fails making app attest always execute in your case and given the feature request ticket is still open I also suspect this is an issue upstream: firebase/firebase-ios-sdk#10095 I would encourage you to report this as an issue here aswell.

@SelaseKay SelaseKay removed type: bug Something isn't working Needs Attention This issue needs maintainer attention. labels Feb 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked: firebase-sdk platform: macos Issues / PRs which are specifically for MacOS. plugin: app_check type: enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants