Skip to content

[FirebaseAuth]: Unhandled Exception: type 'List<Object?>' is not a subtype of type 'PigeonUserInfo' in type cast #13077

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

Closed
1 task done
EgHubs opened this issue Jul 17, 2024 · 5 comments
Labels
blocked: customer-response Waiting for customer response, e.g. more information was requested. platform: ios Issues / PRs which are specifically for iOS. type: bug Something isn't working

Comments

@EgHubs
Copy link

EgHubs commented Jul 17, 2024

Is there an existing issue for this?

  • I have searched the existing issues.

Which plugins are affected?

Auth

Which platforms are affected?

iOS

Description

i get this error when i click on home to got to the simulator home and put the app in the background

[ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: type 'List<Object?>' is not a subtype of type 'PigeonUserInfo' in type cast
#0      PigeonUserDetails.decode (package:firebase_auth_platform_interface/src/pigeon/messages.pigeon.dart:401:28)
#1      _FirebaseAuthUserHostApiCodec.readValueOfType (package:firebase_auth_platform_interface/src/pigeon/messages.pigeon.dart:1573:34)
#2      StandardMessageCodec.readValue (package:flutter/src/services/message_codecs.dart:477:12)
#3      StandardMessageCodec.readValueOfType (package:flutter/src/services/message_codecs.dart:522:23)
#4      _FirebaseAuthUserHostApiCodec.readValueOfType (package:firebase_auth_platform_interface/src/pigeon/messages.pigeon.dart:1581:22)
#5      StandardMessageCodec.readValue (package:flutter/src/services/message_codecs.dart:477:12)
#6      StandardMessageCodec.decodeMessage (package:flutter/src/services/message_codecs.dart:341:28)
#7      BasicMessageChannel.send (package:flutter/src/services/platform_channel.<…>

these

Reproducing the issue

on the latest ios version in the simulator click the home button while running the app

Firebase Core version

3.2.0

Flutter Version

Channel stable, 3.22.2

Relevant Log Output

[ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: type 'List<Object?>' is not a subtype of type 'PigeonUserInfo' in type cast
#0      PigeonUserDetails.decode (package:firebase_auth_platform_interface/src/pigeon/messages.pigeon.dart:401:28)
#1      _FirebaseAuthUserHostApiCodec.readValueOfType (package:firebase_auth_platform_interface/src/pigeon/messages.pigeon.dart:1573:34)
#2      StandardMessageCodec.readValue (package:flutter/src/services/message_codecs.dart:477:12)
#3      StandardMessageCodec.readValueOfType (package:flutter/src/services/message_codecs.dart:522:23)
#4      _FirebaseAuthUserHostApiCodec.readValueOfType (package:firebase_auth_platform_interface/src/pigeon/messages.pigeon.dart:1581:22)
#5      StandardMessageCodec.readValue (package:flutter/src/services/message_codecs.dart:477:12)
#6      StandardMessageCodec.decodeMessage (package:flutter/src/services/message_codecs.dart:341:28)
#7      BasicMessageChannel.send (package:flutter/src/services/platform_channel.<…>

Flutter dependencies

dependencies:
firebase_messaging: ^15.0.3
firebase_core: ^3.2.0
firebase_auth: ^5.1.2
cloud_firestore: ^5.1.0
firebase_database: ^11.0.3
firebase_storage: ^12.1.1
cloud_functions: ^5.0.3
firebase_analytics: ^11.2.0

@EgHubs EgHubs added Needs Attention This issue needs maintainer attention. type: bug Something isn't working labels Jul 17, 2024
@Lyokone Lyokone added platform: ios Issues / PRs which are specifically for iOS. and removed Needs Attention This issue needs maintainer attention. labels Jul 17, 2024
@Lyokone
Copy link
Contributor

Lyokone commented Jul 17, 2024

Hello @EgHubs I cannot reproduce this issue on my end, can you provide a full sample app?

@Lyokone Lyokone added the blocked: customer-response Waiting for customer response, e.g. more information was requested. label Jul 17, 2024
@muqeetkhan01
Copy link

Hi @EgHubs is there any update on this issue?

@Muhammad-Abubakr
Copy link

Can you try running flutter pub upgrade firebase_auth and re-run the application. It solved the issue on my end.

Checking what upgrade does reveals that it updates the dependencies of the specified package.

@EgHubs
Copy link
Author

EgHubs commented Jul 26, 2024

Can you try running flutter pub upgrade firebase_auth and re-run the application. It solved the issue on my end.

Checking what upgrade does reveals that it updates the dependencies of the specified package.

Solved the Issue.
Thanks and sorry for the late reply!

@EgHubs EgHubs closed this as completed Jul 26, 2024
@myproblemchild
Copy link

I'm having the same issue, no suggestions from this thread or other sources worked so far.

try {
      final googleAccount = await _googleSignIn?.signIn();
      final googleAuth = await googleAccount?.authentication;
      final googleCredential = GoogleAuthProvider.credential(
        accessToken: googleAuth?.accessToken,
        idToken: googleAuth?.idToken,
      );
      await FirebaseAuth.instance.signInWithCredential(googleCredential);
    } catch (error, st) {
      //
    }

And I see it's printing

I/flutter (31925): error caught: type 'List<Object?>' is not a subtype of type 'PigeonUserDetails?' in type cast #0      PigeonUserCredential.decode (package:firebase_auth_platform_interface/src/pigeon/messages.pigeon.dart:432:23)
I/flutter (31925): #1      _FirebaseAuthHostApiCodec.readValueOfType (package:firebase_auth_platform_interface/src/pigeon/messages.pigeon.dart:830:37)
I/flutter (31925): #2      StandardMessageCodec.readValue (package:flutter/src/services/message_codecs.dart:477:12)
I/flutter (31925): #3      StandardMessageCodec.readValueOfType (package:flutter/src/services/message_codecs.dart:522:23)
I/flutter (31925): #4      _FirebaseAuthHostApiCodec.readValueOfType (package:firebase_auth_platform_interface/src/pigeon/messages.pigeon.dart:840:22)
I/flutter (31925): #5      StandardMessageCodec.readValue (package:flutter/src/services/message_codecs.dart:477:12)
I/flutter (31925): #6      StandardMessageCodec.decodeMessage (package:flutter/src/services/message_codecs.dart:341:28)
I/flutter (31925): #7      BasicMessageChannel.send (package:flutter/src/services/platform_channel.dart:218:18)

Versions:

  firebase_core: ^3.3.0
  firebase_auth: ^5.1.4
  google_sign_in: ^6.2.1
  cloud_firestore: ^5.2.1
  firebase_crashlytics: ^4.0.4
  firebase_analytics: ^11.2.1

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
blocked: customer-response Waiting for customer response, e.g. more information was requested. platform: ios Issues / PRs which are specifically for iOS. type: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants