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

New Relic detected an unrecognized selector, 'reanimated_viewDidLayoutSubviews', sent to 'UIViewController'. It's possible _cmd was renamed by an unsafe method_exchangeImplementations().' #159

Open
panchal-krunal opened this issue May 2, 2024 · 6 comments
Labels
bug Something isn't working

Comments

@panchal-krunal
Copy link

panchal-krunal commented May 2, 2024

I have installed newrelic-react-native-agent (1.3.7) in my project and started getting run time error as below -

New Relic detected an unrecognized selector, 'reanimated_viewDidLayoutSubviews', sent to 'UIViewController'. It's possible _cmd was renamed by an unsafe method_exchangeImplementations().'

I am not at all sure what package is causing this issue, seems to be react-native-reanimated with the error, but not sure if it is only causing the issue. I tried with older versions of newrelic-react-native-agent but doesn't work.

I have below packages installed in my project -

          "@react-native-community/netinfo": "^11.1.1",
	"@react-native-community/push-notification-ios": "^1.11.0",
	"@react-native-firebase/app": "^18.6.2",
	"@react-native-firebase/auth": "^18.6.2",
	"@react-native-firebase/messaging": "^18.6.2",
	"@react-native-masked-view/masked-view": "^0.2.9",
	"@react-native-picker/picker": "^2.5.1",
	"@react-navigation/bottom-tabs": "^6.5.9",
	"@react-navigation/native": "^6.1.7",
	"@react-navigation/stack": "^6.3.17",
	"@reduxjs/toolkit": "^1.9.5",
	"@rudderstack/rudder-sdk-react-native": "^1.11.1",
	"axios": "^1.5.1",
	"i18next": "^23.2.3",
	"jwt-decode": "3.1.2",
	"lodash": "^4.17.21",
	"moment": "^2.29.4",
	"moment-timezone": "^0.5.43",
	"newrelic-react-native-agent": "1.3.7",
	"patch-package": "^8.0.0",
	"path-to-regexp": "^6.2.1",
	"react": "18.2.0",
	"react-i18next": "^13.0.1",
	"react-native": "0.72.1",
	"react-native-app-auth": "^7.1.3",
	"react-native-calendars": "^1.1301.0",
	"react-native-date-picker": "^4.3.3",
	"react-native-device-info": "^10.11.0",
	"react-native-gesture-handler": "^2.12.0",
	"react-native-keyboard-aware-scroll-view": "^0.9.5",
	"react-native-linear-gradient": "^2.8.3",
	"react-native-localize": "^3.0.4",
	"react-native-mask-input": "^1.2.3",
	"react-native-media-controls": "^2.3.0",
	"react-native-mmkv": "^2.10.2",
	"react-native-mmkv-flipper-plugin": "^1.0.0",
	"react-native-orientation-locker": "^1.6.0",
	"react-native-pager-view": "^6.2.2",
	"react-native-permissions": "^4.1.1",
	"react-native-picker-select": "^8.1.0",
	"react-native-progress-steps": "^1.3.4",
	"react-native-push-notification": "^8.1.1",
	"react-native-ratings": "^8.1.0",
	"react-native-reanimated": "^3.3.0",
	"react-native-safe-area-context": "^4.7.2",
	"react-native-screens": "^3.22.0",
	"react-native-scrollable-tab-view": "ptomasroos/react-native-scrollable-tab-view#master",
	"react-native-size-matters": "^0.4.2",
	"react-native-slider": "^0.11.0",
	"react-native-svg": "^13.14.0",
	"react-native-switch-selector": "^2.3.0",
	"react-native-tab-view": "^3.5.2",
	"react-native-toast-notifications": "^3.4.0",
	"react-native-vector-icons": "^10.0.0",
	"react-native-video": "^5.2.1",
	"react-native-webview": "^13.6.2",
	"react-redux": "^8.1.1",
	"redux-persist": "^6.0.0",
	"redux-persist-transform-filter": "^0.0.22"
@panchal-krunal panchal-krunal added the bug Something isn't working label May 2, 2024
@MikeMifel
Copy link

I had the same error with "newrelic-react-native-agent": "1.3.7",

I solved with setting the value of interactionTracingEnabled to false,
interactionTracingEnabled: false

https://forum.newrelic.com/s/hubtopic/aAXPh0000000sA5OAI/application-crash-on-ios
https://knowledge.newrelic.com/s/article/Fatal-Exception-NSInvalidArgumentException

I hope it helps you!

@LcsGrz
Copy link

LcsGrz commented May 17, 2024

Same here, any news?

@ndesai-newrelic
Copy link
Contributor

@Samykills
Copy link

@ndesai-newrelic is there a way to fix this? reanimated is a package that is core to most parts of the app, including navigation and animations, removing reanimated is not an option for my app.

@ndesai-newrelic
Copy link
Contributor

@Samykills can you add this in agent configuration when you start the agent interactionTracingEnabled: false ?

@Samykills
Copy link

Samykills commented May 21, 2024

@Samykills can you add this in agent configuration when you start the agent interactionTracingEnabled: false ?

even when i do add this on JS, the initialisation of the reanimated lib takes place natively at app start since its not turbo modules yet, thus as soon as we start the agent, we get the same error, however i figured, if i disable this natively before agent start func is run then it works fine.

  [NewRelic disableFeatures:NRFeatureFlag_InteractionTracing];
  [NewRelic startWithApplicationToken: @"appkey"];

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants