firebase / flutterfire

πŸ”₯ A collection of Firebase plugins for Flutter apps.
https://firebase.google.com/docs/flutter/setup
BSD 3-Clause "New" or "Revised" License
8.62k stars 3.95k forks source link

πŸ› App Check token generation returns error unknown.. #10866

Closed jopmiddelkamp closed 7 months ago

jopmiddelkamp commented 1 year ago

Bug report

Describe the bug When attempting phone authentication, I consistently encounter the captcha webview. Upon further investigation, I explored the Firebase App Check plugin. However, when attempting to obtain a token, the resulting token is encoded as eyJlcnJvciI6IlVOS05PV05fRVJST1IifQ==, and upon decoding, it reveals an unknown error. I suspect that the getToken result may be related to my continued encounter with the captcha webview.

Token content:

Click To Expand ```json { "error":"UNKNOWN_ERROR" } ```

My Dart code:

Click To Expand ```dart Future main() async { WidgetsFlutterBinding.ensureInitialized(); await Firebase.initializeApp( options: DefaultFirebaseOptions.currentPlatform, ); await FirebaseAppCheck.instance.activate( androidProvider: AndroidProvider.playIntegrity, ); runApp(const MyApp()); } class MyApp extends StatelessWidget { const MyApp({super.key}); @override Widget build(BuildContext context) { return MaterialApp( title: 'Flutter Demo', theme: ThemeData( primarySwatch: Colors.blue, ), home: const MyHomePage( title: 'Flutter Demo Home Page', ), ); } } class MyHomePage extends StatefulWidget { const MyHomePage({ super.key, required this.title, }); final String title; @override State createState() => _MyHomePageState(); } class _MyHomePageState extends State { String? token; @override Widget build(BuildContext context) { return Scaffold( appBar: AppBar( title: Text(widget.title), ), body: Center( child: Column( mainAxisAlignment: MainAxisAlignment.center, children: [ ElevatedButton( onPressed: () async { token = await FirebaseAppCheck.instance.getToken(); setState(() {}); }, child: const Text('Get AppCheck token'), ), ], ), ), ); } } ```

Steps to reproduce

Steps to reproduce the behavior:

  1. Create a Firebase project
  2. Add your SHA-256
  3. Configure app check
  4. Install the following packages: firebase_auth: ^4.4.2 firebase_core: ^2.10.0 firebase_app_check: ^0.1.2+2
  5. Configure your project with flutterfire configure
  6. Run the code I've attached above

Expected behavior

To get a valid token.

Sample project

https://github.com/jopmiddelkamp/firebase_app_check_issue


Additional context

image

Flutter doctor

Run flutter doctor and paste the output below:

Click To Expand ``` Doctor summary (to see all details, run flutter doctor -v): [βœ“] Flutter (Channel stable, 3.7.12, on macOS 13.3.1 22E261 darwin-arm64, locale en-GB) [βœ“] Android toolchain - develop for Android devices (Android SDK version 33.0.0) [βœ“] Xcode - develop for iOS and macOS (Xcode 14.2) [βœ“] Android Studio (version 2022.1) [βœ“] Android Studio (version 2022.1) [βœ“] VS Code (version 1.77.3) [βœ“] Connected device (2 available) [βœ“] HTTP Host Availability β€’ No issues found! ```

Flutter dependencies

Run flutter pub deps -- --style=compact and paste the output below:

Click To Expand ``` Dart SDK 2.19.6 Flutter SDK 3.7.12 firebase_auth_poc 1.0.0+1 dependencies: - cupertino_icons 1.0.5 - dio 5.1.1 [http_parser meta path] - firebase_app_check 0.1.2+2 [firebase_app_check_platform_interface firebase_app_check_web firebase_core firebase_core_platform_interface flutter] - firebase_auth 4.4.2 [firebase_auth_platform_interface firebase_auth_web firebase_core firebase_core_platform_interface flutter meta] - firebase_core 2.10.0 [firebase_core_platform_interface firebase_core_web flutter meta] - flutter 0.0.0 [characters collection js material_color_utilities meta vector_math sky_engine] - freezed_annotation 2.2.0 [collection json_annotation meta] dev dependencies: - flutter_lints 2.0.1 [lints] - flutter_test 0.0.0 [flutter test_api path fake_async clock stack_trace vector_math async boolean_selector characters collection js matcher material_color_utilities meta source_span stream_channel string_scanner term_glyph] - freezed 2.3.2 [analyzer build build_config collection meta source_gen freezed_annotation json_annotation] transitive dependencies: - _fe_analyzer_shared 59.0.0 [meta] - _flutterfire_internals 1.1.1 [collection firebase_core firebase_core_platform_interface flutter meta] - analyzer 5.11.1 [_fe_analyzer_shared collection convert crypto glob meta package_config path pub_semver source_span watcher yaml] - args 2.4.0 - async 2.10.0 [collection meta] - boolean_selector 2.1.1 [source_span string_scanner] - build 2.3.1 [analyzer async convert crypto glob logging meta path] - build_config 1.1.1 [checked_yaml json_annotation path pubspec_parse yaml] - characters 1.2.1 - checked_yaml 2.0.2 [json_annotation source_span yaml] - clock 1.1.1 - collection 1.17.0 - convert 3.1.1 [typed_data] - crypto 3.0.2 [typed_data] - dart_style 2.3.0 [analyzer args path pub_semver source_span] - fake_async 1.3.1 [clock collection] - file 6.1.4 [meta path] - firebase_app_check_platform_interface 0.0.6+1 [_flutterfire_internals firebase_core flutter meta plugin_platform_interface] - firebase_app_check_web 0.0.8+1 [_flutterfire_internals firebase_app_check_platform_interface firebase_core firebase_core_web flutter flutter_web_plugins js] - firebase_auth_platform_interface 6.13.1 [_flutterfire_internals collection firebase_core flutter meta plugin_platform_interface] - firebase_auth_web 5.3.2 [firebase_auth_platform_interface firebase_core firebase_core_web flutter flutter_web_plugins http_parser intl js meta] - firebase_core_platform_interface 4.6.0 [collection flutter flutter_test meta plugin_platform_interface] - firebase_core_web 2.3.0 [firebase_core_platform_interface flutter flutter_web_plugins js meta] - flutter_web_plugins 0.0.0 [flutter js characters collection material_color_utilities meta vector_math] - glob 2.1.1 [async collection file path string_scanner] - http_parser 4.0.2 [collection source_span string_scanner typed_data] - intl 0.17.0 [clock path] - js 0.6.5 [meta] - json_annotation 4.8.0 [meta] - lints 2.0.1 - logging 1.1.1 - matcher 0.12.13 [meta stack_trace] - material_color_utilities 0.2.0 - meta 1.8.0 - package_config 2.1.0 [path] - path 1.8.2 - plugin_platform_interface 2.1.4 [meta] - pub_semver 2.1.3 [collection meta] - pubspec_parse 1.2.2 [checked_yaml collection json_annotation pub_semver yaml] - sky_engine 0.0.99 - source_gen 1.2.7 [analyzer async build dart_style glob path source_span yaml] - source_span 1.9.1 [collection path term_glyph] - stack_trace 1.11.0 [path] - stream_channel 2.1.1 [async] - string_scanner 1.2.0 [source_span] - term_glyph 1.2.1 - test_api 0.4.16 [async boolean_selector collection meta source_span stack_trace stream_channel string_scanner term_glyph matcher] - typed_data 1.3.1 [collection] - vector_math 2.1.4 - watcher 1.0.2 [async path] - yaml 3.1.1 [collection source_span string_scanner] ```

danagbemava-nc commented 1 year ago

Hi @jopmiddelkamp, what platform are you experiencing this issue on? Can you also share the code that is used to verify the token? I see that you make a network request to verify the token but the URL is localhost.

Thank you

jopmiddelkamp commented 1 year ago

@danagbemava-nc I'm experiencing this on Android.

Here is the code I use for validation.

// Import the necessary packages
const express = require('express');
const app = express();
const admin = require('firebase-admin');
var serviceAccount = require("./firebase-adminsdk.json");

// Initialize the Firebase app
const firebaseApp = admin.initializeApp({
  credential: admin.credential.cert(serviceAccount)
});

// Middleware function to verify the App Check token
const appCheckVerification = async (req, res, next) => {
    const appCheckToken = req.header('X-Firebase-AppCheck');
    console.log('App Check token: \'' + appCheckToken + '\'');

    if (!appCheckToken) {
        res.status(401);
        return next('Unauthorized');
    }

    try {
        const appCheckClaims = await admin.appCheck().verifyToken(appCheckToken);
        console.log(appCheckClaims);

        // If verifyToken() succeeds, continue with the next middleware
        // function in the stack.
        return next();
    } catch (err) {
        console.log(err);
        res.status(401);
        return next('Unauthorized');
    }
}

// Define your API endpoint and use the middleware function
app.get('/check-token', [appCheckVerification], (req, res) => {
    console.log('App Check token is valid');
});

// Start the Express app
app.listen(3000, () => {
    console.log('App listening on port 3000!');
});

Just note that in this context it is irrelevant as the problem seems to be in the FirebaseAppCheck.instance.getToken(); call returning a UNKNOWN_ERROR so there is no point in verifying the token. That is also why I excluded it from my original post.

danagbemava-nc commented 1 year ago

I think I might not have set it up correctly. This is my log when I attempt to get the token.

@jopmiddelkamp, can you share your logs when you run the app and try to get the token?

Syncing files to device Pixel 7...
I/.example.app_ct(20803): Compiler allocated 4413KB to compile void android.view.ViewRootImpl.performTraversals()
E/SurfaceSyncer(20803): Failed to find sync for id=0
D/TrafficStats(20803): tagSocket(141) with statsTag=0xffffffff, statsUid=-1
I/PlayCore(20803): UID: [10288]  PID: [20803] IntegrityService : requestIntegrityToken(IntegrityTokenRequest{nonce=AaK4wXBWXZN88MO8Y31agLE98zf3-XzRpO--JfmdUuihKGR15Bf3NUq6YdyOdRysbbsCBfZiWeJeNkEm4PMgsiYFrjUbrlzvilXZs0G7Z95cg3_5uhkDClolMaPgdy4BVERtKeDG4JNh5UQCi6FBlmpVINTWfEa3gUVNkenAlgZK34E=, cloudProjectNumber=192368888880})
I/PlayCore(20803): UID: [10288]  PID: [20803] IntegrityService : Initiate binding to the service.
I/PlayCore(20803): UID: [10288]  PID: [20803] IntegrityService : ServiceConnectionImpl.onServiceConnected(ComponentInfo{com.android.vending/com.google.android.finsky.integrityservice.IntegrityService})
I/PlayCore(20803): UID: [10288]  PID: [20803] IntegrityService : linkToDeath
I/PlayCore(20803): UID: [10288]  PID: [20803] OnRequestIntegrityTokenCallback : onRequestIntegrityToken
I/PlayCore(20803): UID: [10288]  PID: [20803] IntegrityService : Unbind from service.
E/flutter (20803): [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: [firebase_app_check/unknown] com.google.firebase.FirebaseException: Error returned from API. code: 403 body: App attestation failed.
E/flutter (20803): #0      StandardMethodCodec.decodeEnvelope (package:flutter/src/services/message_codecs.dart:653:7)
E/flutter (20803): #1      MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:315:18)
E/flutter (20803): <asynchronous suspension>
E/flutter (20803): #2      MethodChannelFirebaseAppCheck.getToken (package:firebase_app_check_platform_interface/src/method_channel/method_channel_firebase_app_check.dart:100:22)
E/flutter (20803): <asynchronous suspension>
E/flutter (20803): #3      _MyHomePageState.build.<anonymous closure> (package:app_ct/main.dart:62:25)
E/flutter (20803): <asynchronous suspension>
E/flutter (20803): 
I/.example.app_ct(20803): Background concurrent copying GC freed 43660(4147KB) AllocSpace objects, 13(516KB) LOS objects, 90% free, 2729KB/26MB, paused 223us,115us total 102.927ms
W/JavaBinder(20803): BinderProxy is being destroyed but the application did not call unlinkToDeath to unlink all of its death recipients beforehand.  Releasing leaked death recipient: com.google.android.play.integrity.internal.zzk
I/BpBinder(20803): onLastStrongRef automatically unlinking death recipients: <uncached descriptor>
jopmiddelkamp commented 1 year ago

I'm a bit busy at the moment. I'll reply as soon as possible.

google-oss-bot commented 1 year ago

Hey @jopmiddelkamp. We need more information to resolve this issue but there hasn't been an update in 7 weekdays. I'm marking the issue as stale and if there are no new updates in the next 7 days I will close it automatically.

If you have more information that will help us get to the bottom of this, just add a comment!

google-oss-bot commented 1 year ago

Since there haven't been any recent updates here, I am going to close this issue.

@jopmiddelkamp if you're still experiencing this problem and want to continue the discussion just leave a comment here and we are happy to re-open this.

jopmiddelkamp commented 1 year ago

@danagbemava-nc

Sorry for this very late reply.. Some things came in between and I lost track of this issue. This is what I see when I press the get token button.

Launching lib/main.dart on SM G973F in debug mode...
main.dart:1
βœ“  Built build/app/outputs/flutter-apk/app-debug.apk.
Connecting to VM Service at ws://127.0.0.1:62930/bBmK00ihH4A=/ws
I/Gralloc4( 3151): mapper 4.x is not supported
W/Gralloc3( 3151): mapper 3.x is not supported
I/gralloc ( 3151): Arm Module v1.0
W/Gralloc4( 3151): allocator 4.x is not supported
W/Gralloc3( 3151): allocator 3.x is not supported
D/ViewRootImpl@6294ba9[MainActivity]( 3151): Creating frameDrawingCallback nextDrawUseBlastSync=false reportNextDraw=true hasBlurUpdates=false
D/ViewRootImpl@6294ba9[MainActivity]( 3151): Creating frameCompleteCallback
D/ViewRootImpl@6294ba9[MainActivity]( 3151): Received frameDrawingCallback frameNum=1. Creating transactionCompleteCallback=false
I/SurfaceView@4bcc918( 3151): uSP: rtp = Rect(0, 0 - 1080, 2241) rtsw = 1080 rtsh = 2241
I/SurfaceView@4bcc918( 3151): onSSPAndSRT: pl = 0 pt = 0 sx = 1.0 sy = 1.0
I/SurfaceView@4bcc918( 3151): aOrMT: uB = true t = android.view.SurfaceControl$Transaction@36c0e45 fN = 1 android.view.SurfaceView.access$500:124 android.view.SurfaceView$SurfaceViewPositionUpdateListener.positionChanged:1728 android.graphics.RenderNode$CompositePositionUpdateListener.positionChanged:319
I/SurfaceView@4bcc918( 3151): aOrMT: vR.mWNT, vR = ViewRootImpl@6294ba9[MainActivity]
I/ViewRootImpl@6294ba9[MainActivity]( 3151): mWNT: t = android.view.SurfaceControl$Transaction@36c0e45 fN = 1 android.view.SurfaceView.applyOrMergeTransaction:1628 android.view.SurfaceView.access$500:124 android.view.SurfaceView$SurfaceViewPositionUpdateListener.positionChanged:1728
I/ViewRootImpl@6294ba9[MainActivity]( 3151): mWNT: merge t to BBQ
D/ViewRootImpl@6294ba9[MainActivity]( 3151): Received frameCompleteCallback  lastAcquiredFrameNum=1 lastAttemptedDrawFrameNum=1
I/ViewRootImpl@6294ba9[MainActivity]( 3151): [DP] pdf(0) 1 android.view.ViewRootImpl.lambda$addFrameCompleteCallbackIfNeeded$3$ViewRootImpl:5000 android.view.ViewRootImpl$$ExternalSyntheticLambda16.run:6 android.os.Handler.handleCallback:938
I/ViewRootImpl@6294ba9[MainActivity]( 3151): [DP] rdf()
D/ViewRootImpl@6294ba9[MainActivity]( 3151): reportDrawFinished (fn: -1)
I/ViewRootImpl@6294ba9[MainActivity]( 3151): MSG_WINDOW_FOCUS_CHANGED 1 1
D/InputMethodManager( 3151): startInputInner - Id : 0
I/InputMethodManager( 3151): startInputInner - mService.startInputOrWindowGainedFocus
D/InputMethodManager( 3151): startInputInner - Id : 0
I/ViewRootImpl@6294ba9[MainActivity]( 3151): ViewPostIme pointer 0
I/ViewRootImpl@6294ba9[MainActivity]( 3151): ViewPostIme pointer 1
I/PlayCore( 3151): UID: [10604]  PID: [3151] IntegrityService : requestIntegrityToken(IntegrityTokenRequest{nonce=AaK4wXDXhYBFbCDgj-dmB7NGmUCfqG7crs8A8NNUR1APmj5W-hD9U8ZgWvW72tpx6gt2UdPVLbMUuCirBKMT7EKQtbQ7NB4u-G_4JjqbDT4RSO-L-Ovfz507DA45gVbhKefeKqp9ZIG6vTt0FbQ5j1i3NB-zAdA_HgkwlAiTo1N0bw==, cloudProjectNumber=859123377401})
I/PlayCore( 3151): UID: [10604]  PID: [3151] IntegrityService : Initiate binding to the service.
I/PlayCore( 3151): UID: [10604]  PID: [3151] IntegrityService : ServiceConnectionImpl.onServiceConnected(ComponentInfo{com.android.vending/com.google.android.finsky.integrityservice.IntegrityService})
I/PlayCore( 3151): UID: [10604]  PID: [3151] IntegrityService : linkToDeath
I/PlayCore( 3151): UID: [10604]  PID: [3151] OnRequestIntegrityTokenCallback : onRequestIntegrityToken
I/PlayCore( 3151): UID: [10604]  PID: [3151] IntegrityService : Unbind from service.
jopmiddelkamp commented 1 year ago

Could you also reopen this @danagbemava-nc?

danagbemava-nc commented 1 year ago

Hi @jopmiddelkamp, I was OoO. I resumed today.

Looking at the setup process for play integrity, it seems like you'll need to link your firebase gcp project to an app on the playstore. Have you linked your app on the playstore? https://firebase.google.com/docs/app-check/android/play-integrity-provider#project-setup

jopmiddelkamp commented 1 year ago

@danagbemava-nc I only have our production app available in the play store. We do have a staging app setup in the play console but it is internal test only. Is that also enough?

How do you normally set this up? I would like to test it before pushing anything to production.

danagbemava-nc commented 1 year ago

Hi @jopmiddelkamp, I'm not entirely sure. I'm not too familiar with app_check.

Can you check https://github.com/firebase/flutterfire/issues/10593 to see if any of the comments in there help you out?

shreyas411 commented 1 year ago

@danagbemava-nc I only have our production app available in the play store. We do have a staging app setup in the play console but it is internal test only. Is that also enough?

How do you normally set this up? I would like to test it before pushing anything to production.

Hi @jopmiddelkamp, That's the same issue i am facing now. so if you fix the issue. please tell me how to do it?

jopmiddelkamp commented 1 year ago

@danagbemava-nc can you not ask some other people (maybe even the people that created the service) from the Google team how they intended this to be used?

danagbemava-nc commented 1 year ago

Labeling for further insight from the team.

/cc @russellwheatley

salim97 commented 1 year ago

any update on this issue ?

jopmiddelkamp commented 1 year ago

Would also love to know a status update.

jopmiddelkamp commented 12 months ago

@danagbemava-nc

Do you know if Firebase Remote Config, just as Firestore, uses Firebase App Check as part of its security designed to protect its access from unauthorised or abusive requests?

Otherwise I might use Firebase Remote Config te set an API key and store this key in the phone its memory and use this key in the HTTP headers on my HTTPS endpoint requests to verify if the request is coming from a real device. But it only works if Firebase Remote Config is using Firebase App Check as part of its security. What are your thoughts on this?

danagbemava-nc commented 12 months ago

@jopmiddelkamp, Firebase Remote config doesn't seem to use app check. See https://firebase.google.com/docs/app-check.

skonsoftSASU commented 10 months ago

After days spent to just make it work. I followed all documentation and it works with success when using de debug token. But in production, no way. All installed all certeficates SHA-256, SHA-1 (play store and sign deploy certifcates) both in firebase app settings and in appcheck... But no way, i got 403 error.

As a good solution was: Remove Appcheck from the project and rollback the project and implement my custom verication app. I took just one day to do that rather than using Google AppCheck that never will work in production.

I hope that it works for you. For me it's a just a big useless api that makes you losing your time and your money for something will never work.

jopmiddelkamp commented 10 months ago

After days spent to just make it work. I followed all documentation and it works with success when using de debug token. But in production, no way. All installed all certeficates SHA-256, SHA-1 (play store and sign deploy certifcates) both in firebase app settings and in appcheck... But no way, i got 403 error.

As a good solution was: Remove Appcheck from the project and rollback the project and implement my custom verication app. I took just one day to do that rather than using Google AppCheck that never will work in production.

I hope that it works for you. For me it's a just a big useless api that makes you losing your time and your money for something will never work.

@skonsoftSASU wat is your previous solution if you mind me asking?

skonsoftSASU commented 10 months ago

@jopmiddelkamp I ended by using a package_info_plus (buildSignature) to generate a runtime signature and for critical operation, i join the signature to request which compared to the reference signature stored in the server. If they did not match, the app was cracked. This is valid only for android. I will check how to implement same logic for ios. This solution is more simple and secures the APP... it took 2 hours of work rather than a couple of days for appcheck without any success.

russellwheatley commented 7 months ago

@danagbemava-nc

Sorry for this very late reply.. Some things came in between and I lost track of this issue. This is what I see when I press the get token button.

Launching lib/main.dart on SM G973F in debug mode...
main.dart:1
βœ“  Built build/app/outputs/flutter-apk/app-debug.apk.
Connecting to VM Service at ws://127.0.0.1:62930/bBmK00ihH4A=/ws
I/Gralloc4( 3151): mapper 4.x is not supported
W/Gralloc3( 3151): mapper 3.x is not supported
I/gralloc ( 3151): Arm Module v1.0
W/Gralloc4( 3151): allocator 4.x is not supported
W/Gralloc3( 3151): allocator 3.x is not supported
D/ViewRootImpl@6294ba9[MainActivity]( 3151): Creating frameDrawingCallback nextDrawUseBlastSync=false reportNextDraw=true hasBlurUpdates=false
D/ViewRootImpl@6294ba9[MainActivity]( 3151): Creating frameCompleteCallback
D/ViewRootImpl@6294ba9[MainActivity]( 3151): Received frameDrawingCallback frameNum=1. Creating transactionCompleteCallback=false
I/SurfaceView@4bcc918( 3151): uSP: rtp = Rect(0, 0 - 1080, 2241) rtsw = 1080 rtsh = 2241
I/SurfaceView@4bcc918( 3151): onSSPAndSRT: pl = 0 pt = 0 sx = 1.0 sy = 1.0
I/SurfaceView@4bcc918( 3151): aOrMT: uB = true t = android.view.SurfaceControl$Transaction@36c0e45 fN = 1 android.view.SurfaceView.access$500:124 android.view.SurfaceView$SurfaceViewPositionUpdateListener.positionChanged:1728 android.graphics.RenderNode$CompositePositionUpdateListener.positionChanged:319
I/SurfaceView@4bcc918( 3151): aOrMT: vR.mWNT, vR = ViewRootImpl@6294ba9[MainActivity]
I/ViewRootImpl@6294ba9[MainActivity]( 3151): mWNT: t = android.view.SurfaceControl$Transaction@36c0e45 fN = 1 android.view.SurfaceView.applyOrMergeTransaction:1628 android.view.SurfaceView.access$500:124 android.view.SurfaceView$SurfaceViewPositionUpdateListener.positionChanged:1728
I/ViewRootImpl@6294ba9[MainActivity]( 3151): mWNT: merge t to BBQ
D/ViewRootImpl@6294ba9[MainActivity]( 3151): Received frameCompleteCallback  lastAcquiredFrameNum=1 lastAttemptedDrawFrameNum=1
I/ViewRootImpl@6294ba9[MainActivity]( 3151): [DP] pdf(0) 1 android.view.ViewRootImpl.lambda$addFrameCompleteCallbackIfNeeded$3$ViewRootImpl:5000 android.view.ViewRootImpl$$ExternalSyntheticLambda16.run:6 android.os.Handler.handleCallback:938
I/ViewRootImpl@6294ba9[MainActivity]( 3151): [DP] rdf()
D/ViewRootImpl@6294ba9[MainActivity]( 3151): reportDrawFinished (fn: -1)
I/ViewRootImpl@6294ba9[MainActivity]( 3151): MSG_WINDOW_FOCUS_CHANGED 1 1
D/InputMethodManager( 3151): startInputInner - Id : 0
I/InputMethodManager( 3151): startInputInner - mService.startInputOrWindowGainedFocus
D/InputMethodManager( 3151): startInputInner - Id : 0
I/ViewRootImpl@6294ba9[MainActivity]( 3151): ViewPostIme pointer 0
I/ViewRootImpl@6294ba9[MainActivity]( 3151): ViewPostIme pointer 1
I/PlayCore( 3151): UID: [10604]  PID: [3151] IntegrityService : requestIntegrityToken(IntegrityTokenRequest{nonce=AaK4wXDXhYBFbCDgj-dmB7NGmUCfqG7crs8A8NNUR1APmj5W-hD9U8ZgWvW72tpx6gt2UdPVLbMUuCirBKMT7EKQtbQ7NB4u-G_4JjqbDT4RSO-L-Ovfz507DA45gVbhKefeKqp9ZIG6vTt0FbQ5j1i3NB-zAdA_HgkwlAiTo1N0bw==, cloudProjectNumber=859123377401})
I/PlayCore( 3151): UID: [10604]  PID: [3151] IntegrityService : Initiate binding to the service.
I/PlayCore( 3151): UID: [10604]  PID: [3151] IntegrityService : ServiceConnectionImpl.onServiceConnected(ComponentInfo{com.android.vending/com.google.android.finsky.integrityservice.IntegrityService})
I/PlayCore( 3151): UID: [10604]  PID: [3151] IntegrityService : linkToDeath
I/PlayCore( 3151): UID: [10604]  PID: [3151] OnRequestIntegrityTokenCallback : onRequestIntegrityToken
I/PlayCore( 3151): UID: [10604]  PID: [3151] IntegrityService : Unbind from service.

There is no exception in these logs. We already have an issue open for exceptions that occur when calling getToken() when the Play Integrity provider is used. I'm going to close this out and move the discussion there.