Skip to content

Fixed error "com.facebook.react.bridge.ReadableNativeMap cannot be cast to java.lang.String." on event trigger (Android)#158

Merged
aonemd merged 4 commits intopusher:masterfrom
emmanuel-nike:master
Apr 7, 2026
Merged

Fixed error "com.facebook.react.bridge.ReadableNativeMap cannot be cast to java.lang.String." on event trigger (Android)#158
aonemd merged 4 commits intopusher:masterfrom
emmanuel-nike:master

Conversation

@emmanuel-nike
Copy link
Copy Markdown
Contributor

@emmanuel-nike emmanuel-nike commented Jun 1, 2024

Description

The android native pusher instance for triggering events only accepts data as a string but data is defined as any type (or as an object). Currently, the trigger event function returns an error com.facebook.react.bridge.ReadableNativeMap cannot be cast to java.lang.String. Other users have also experienced this issue here #147.

CHANGELOG

  • Fixed error on android "com.facebook.react.bridge.ReadableNativeMap cannot be cast to java.lang.String." when triggering an event to private or presence channels.

@emmanuel-nike emmanuel-nike changed the title Pass string to android native instance Fixed error on android "com.facebook.react.bridge.ReadableNativeMap cannot be cast to java.lang.String." on event trigger Jun 2, 2024
@emmanuel-nike emmanuel-nike changed the title Fixed error on android "com.facebook.react.bridge.ReadableNativeMap cannot be cast to java.lang.String." on event trigger Fixed error "com.facebook.react.bridge.ReadableNativeMap cannot be cast to java.lang.String." on event trigger (Android) Jun 2, 2024
Copy link
Copy Markdown
Member

@aonemd aonemd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @emmanuel-nike, merging this!

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

Successfully merging this pull request may close these issues.

2 participants