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

onRemovedFromRoom throwing error - unhandled Exception: type '_InternalLinkedHashMap<Object?, Object?>' is not a subtype of type 'HMSPeer' in type cast #207

Closed
abbas2501 opened this issue Nov 8, 2021 · 8 comments

Comments

@abbas2501
Copy link

This issue lies in the 3rd line in following code snippet, map value needs to be passed thru the factory method fromMap in order to type cast properly

factory HMSPeerRemovedFromPeer.fromMap(Map map) {
    return HMSPeerRemovedFromPeer(
      peerWhoRemoved: map['peer_who_removed'] as HMSPeer,
      reason: map['reason'] as String,
      roomWasEnded: map['room_was_ended'] as bool,
    );
  }
@ygit
Copy link
Member

ygit commented Nov 8, 2021

@abbas2501 Ensure that you are using the latest version of both the Flutter & underlying Android SDK.

Flutter - 0.4.0
Android - 2.1.8

@abbas2501
Copy link
Author

@abbas2501 Ensure that you are using the latest version of both the Flutter & underlying Android SDK.

Flutter - 0.4.0 Android - 2.1.8

The issue still exists on flutter 0.4.0 as I can see currently. Have updated to 2.1.8 android also now.

@ygit
Copy link
Member

ygit commented Nov 8, 2021

@abbas2501 you are facing the issue only on android or iOS as well?

@abbas2501
Copy link
Author

Have tested only on android, but this clearly is a flutter issue, isn't it ? We are basically trying type casting a map to an object of type HMSPeer

@abbas2501
Copy link
Author

abbas2501 commented Nov 8, 2021

@abbas2501 you are facing the issue only on android or iOS as well?

Please look for this code snippet in the sdk. I have fixed it for myself and using it as a local sdk. Just informed here so it can be fixed for everyone.

@ygit
Copy link
Member

ygit commented Nov 8, 2021

Sure

@ygit
Copy link
Member

ygit commented Nov 8, 2021

@abbas2501 We have resolved the issue & will release it soon

@ygit
Copy link
Member

ygit commented Jan 16, 2022

Resolved in version 0.5.0

@ygit ygit closed this as completed Jan 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants