Android: Text ellipsizeMode="clip" crashes on Android
See original GitHub issue- I have reviewed the documentation
- I have searched existing issues
- I am using the latest React Native version
Environment
Environment: OS: macOS High Sierra 10.13.3 Node: 9.0.0 Yarn: 1.3.2 npm: 5.5.1 Watchman: 4.7.0 Xcode: Xcode 9.2 Build version 9C40b Android Studio: 3.0 AI-171.4408382
Packages: (wanted => installed) react: 16.2.0 => 16.2.0 react-native: ^0.54.2 => 0.54.2
Steps to Reproduce
- Use a
<Text />
component - Set ellipsizeMode to “clip”
Expected Behavior
While the documentation clearly states clip is working only for iOS
I assumed this will have no effect on Android.
Actual Behavior
Causes an exception manifesting as a crash inside the app:
RuntimeException com.facebook.react.bridge.JSApplicationIllegalArgumentException: Error while updating property 'ellipsizeMode' of a view managed by: RCTText
com.facebook.react.bridge.ReactContext in handleException at line 313
com.facebook.react.uimanager.GuardedFrameCallback in doFrame at line 33
com.facebook.react.modules.core.ReactChoreographer$ReactChoreographerDispatcher in doFrame at line 136
com.facebook.react.modules.core.ChoreographerCompat$FrameCallback$1 in doFrame at line 107
android.view.Choreographer$CallbackRecord in run at line 909
android.view.Choreographer in doCallbacks at line 723
android.view.Choreographer in doFrame at line 655
android.view.Choreographer$FrameDisplayEventReceiver in run at line 897
android.os.Handler in handleCallback at line 790
android.os.Handler in dispatchMessage at line 99
android.os.Looper in loop at line 164
android.app.ActivityThread in main at line 6494
java.lang.reflect.Method in invoke
com.android.internal.os.RuntimeInit$MethodAndArgsCaller in run at line 438
com.android.internal.os.ZygoteInit in main at line 807
Issue Analytics
- State:
- Created 6 years ago
- Reactions:3
- Comments:11 (9 by maintainers)
Top Results From Across the Web
Android app crashes on Long click on the Edit text
Basically the logs shows that whenever the user clicks on one of the edit text in the app, it crashes. Crashed: main at...
Read more >Crashes - Android Developers
An Android app crashes whenever there's an unexpected exit caused by an unhandled exception or signal. An app that is written using Java...
Read more >This Text Will CRASH ANY ANDROID APP!!! - YouTube
This Text will Crash any Android Application.. WhatsApp, WeChat, Text Msg.. It can crash any Android App.. Don't Touch It..
Read more >App Center Crashes for React Native - Microsoft Learn
Open the project's android/app/src/main/res/values/strings.xml file and verify that appCenterCrashes_whenToSendCrashes is set to ASK_JAVASCRIPT ...
Read more >How to fix Maps when it crashes - Android - Google Maps Help
If the Google Maps app on your phone or tablet crashes or has other issues that affect your experience on Maps, try the...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Let us know if you have a PR that changes this behavior.
I strongly disagree. This is not a documentation issue. Setting a property on a component should not crash the app.