React-native-navigation: [V6] Navbar button with showAsAction crashes on Android

Created on 10 May 2020  路  3Comments  路  Source: wix/react-native-navigation

Steps to Reproduce / Code Snippets / Screenshots

  • Define buttons with showAsAction prop
  • Press on button

Result: RuntimeException: Tried to get null value!


Environment

  • React Native Navigation version: 6.5.0
  • React Native version: 0.62.2
  • Platform(s) (iOS, Android, or both?): Android
  • Device info (Simulator/Device? OS version? Debug/Release?): Simulator -Android 10 (API 29) - Both on debug and release
馃彋 stale

Most helpful comment

Yes, I have a similar issue when I try to update the buttons (enable/disable) using the merge options. It works just fine on 6.4.0 but with 6.5.0/6.6.0 it crashes the app

All 3 comments

hello) me to Android

Process: ru.tvil.guest, PID: 6391 java.lang.RuntimeException: Tried to get null value! at com.reactnativenavigation.parse.params.Param.get(Param.java:27) at com.reactnativenavigation.utils.ButtonSpan.apply(ButtonSpan.kt:22) at com.reactnativenavigation.utils.ButtonSpan.updateDrawState(ButtonSpan.kt:12) at android.text.TextLine.handleRun(TextLine.java:943) at android.text.TextLine.measureRun(TextLine.java:408) at android.text.TextLine.measure(TextLine.java:298) at android.text.TextLine.metrics(TextLine.java:272) at android.text.BoringLayout.isBoring(BoringLayout.java:294)

my code:
Navigation.push(componentId, { component: { name: SEARCH_MAP, options: { topBar: { title: { text: title, }, rightButtons: [{ id: 'menuButton', icon: menu, color: colors.WHITE, disabledColor: colors.RGBA_WHITE_1, enabled: false }], }, }, }, }); });

Yes, I have a similar issue when I try to update the buttons (enable/disable) using the merge options. It works just fine on 6.4.0 but with 6.5.0/6.6.0 it crashes the app

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
If you believe the issue is still relevant, please test on the latest version and report back. Thank you for your contributions.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

zhanguangao picture zhanguangao  路  3Comments

kiroukou picture kiroukou  路  3Comments

EliSadaka picture EliSadaka  路  3Comments

tmaly1980 picture tmaly1980  路  3Comments

bdrobinson picture bdrobinson  路  3Comments