microsoft / clarity-apps

Repo for distributing Clarity Apps packages
MIT License
46 stars 2 forks source link

[IOS] NSInvalidArgumentException: Attempt to add script message handler with name 'clarityMessageHandler6156' when one already exists. #68

Closed LIND96 closed 1 month ago

LIND96 commented 1 month ago

In my application there was an error when implementing Clarity on iOS,

[IOS] NSInvalidArgumentException: Attempt to add script message handler with name 'clarityMessageHandler6156' when one already exists.

any suggestions on how to fix it?

amralaa-MSFT commented 1 month ago

@LIND96 I assume your app uses an older version of Clarity. Could you please upgrade to latest Clarity version 2.1.2 and let us know if your app still crashes?

LIND96 commented 1 month ago

hello @amralaa-MSFT in my project using react-native-clarity 3.0.1

LIND96 commented 1 month ago

okay maybe I should upgrade the react-native-clarity version to 3.0.4

LIND96 commented 1 month ago

thanks bro @amralaa-MSFT

amralaa-MSFT commented 1 month ago

okay maybe I should upgrade the react-native-clarity version to 3.0.4

Yes. please use react-native-clarity version 3.0.4 for React Native apps. I just assumed it was a native iOS app.

thanks bro @amralaa-MSFT

I hope the issue has been resolved. I'll close the issue for now but feel free to reopen it if the issue persists.