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

App crashes with abort message "availableHeight is indefinite so heightMeasureMode must be YGMeasureModeUndefined" when user resumes app from background. #19719

Closed
herlarb opened this issue Jun 14, 2018 · 22 comments
Labels
Bug Resolution: Locked This issue was locked by the bot.

Comments

@herlarb
Copy link

herlarb commented Jun 14, 2018

Environment

OS: Windows 10
Node: 8.9.4
Yarn: 1.5.1
npm: 5.6.0
Watchman: Not Found
XCode: N/A
Android Studio: Version 2.3.0 AI-162.4069837

Packages: (wanted => installed)
react: 16.3.1 => 16.3.1
react-native: 0.55.1 => 0.55.1

Description

The app crashes when the user attempts to resume an app from the background on android
Crash log : https://gist.github.com/herlarb/7a8820dbfc56d3dffd35ba235b8e888a

Steps to Reproduce

  1. Launch any given app built using the environment provided
  2. Using the android back button send app to background
  3. Relaunch the app from background using the opened apps tray or by tapping on the app icon
  4. Observe

Expected Behavior

App should not crash when the user attempts to resume app from background

Actual Behavior

The app crashes unexpectedly when the user resumes the app from the background

@hramos
Copy link
Contributor

hramos commented Jun 14, 2018

Looks like your report is for an old version (0.55.1). Your repro steps are not specific enough and require a lot of effort for a contributor. In general, you want to file an issue that is complete and ready to be picked up by someone who is interested in providing a fix (see https://stackoverflow.com/help/mcve).

Closing as debugging individual crashes is out of scope for this issue tracker unless a minimum repro is provided.

@hramos hramos closed this as completed Jun 14, 2018
@herlarb
Copy link
Author

herlarb commented Jun 14, 2018

@hramos Seems the react native contributors are quick to close issues. You can't say 0.55 is old when 0.56 has just been released (Documentation has not even been updated to 0.56). This issue has been recurring in react native as #9550 and #16727 all for which have been shelved aside like this. It gives an impression that contributors don't want to look through the code or don't have a fix for the issue

The Abort message raised during the crash lies in react-native/ReactCommon/yoga/yoga/Yoga.cpp lines
2556 -2560(react native 0.56 ) appears like a yoga issue

@hramos
Copy link
Contributor

hramos commented Jun 14, 2018

The latest stable version is 0.55.4, and is already two months old. We encourage everyone to use the release candidate versions whenever possible, especially when filing bug reports. With over 600 issues currently open, we have to prioritize, so you're right, I don't want to look at an issue that has not been tested in the release that I'm curating at this moment.

@herlarb
Copy link
Author

herlarb commented Jun 15, 2018

@hramos So what if I'm able to reproduce the issue on 0.55.4. Would you be willing to look at it

@hramos
Copy link
Contributor

hramos commented Jun 15, 2018

Your issue would not be auto-closed if it's reported against 0.55.4, but like I said above, the train is moving fast and we're focusing on getting the 0.56.0 release candidate ready for release. Issues that can be reproduced on 0.56.0-rc.1 are our highest priority at the moment.

@DavidNorena
Copy link

Its happening with 0.56.0

@ivanzotov
Copy link
Contributor

Reopen the issue, please. It's happening with 0.56

@Huzaifaak

This comment has been minimized.

@Huzaifaak
Copy link

Happening in 0.55.4.
availableHeight is indefinite so heightMeasureMode must be YGMeasureModeUndefined

@herlarb
Copy link
Author

herlarb commented Aug 31, 2018

I raised this issue and @hramos replied that it was an individual crash case. It appears it isn't an individual crash case obviously. As I'm not a collaborator I can't reopen this issue. Hopefully @hramos gets this mention and reopens the ticket.

@ivanzotov

This comment has been minimized.

@pramodsharma403
Copy link

pramodsharma403 commented Sep 10, 2018

Quick fix:- Please add below method in your MainActivity.java

@Override public void invokeDefaultOnBackPressed() { moveTaskToBack(true); }

@kjs104901
Copy link

@pramodsharma403
Thanks. It occurs in 0.57.1 and fixed by

Quick fix:- Please add below method in your MainActivity.java

@Override public void invokeDefaultOnBackPressed() { moveTaskToBack(true); }

Anyone can fix react native by pull request?

@hramos hramos reopened this Oct 1, 2018
@Radilx
Copy link

Radilx commented Nov 4, 2018

I am still getting this issue:

react-native 0.57.1

I added @Override public void invokeDefaultOnBackPressed() { moveTaskToBack(true); } my MainActivity.java but it still does not work. I am getting this error when trying to start up my app, it shows up immediately and I can't even test...

@Radilx
Copy link

Radilx commented Nov 4, 2018

Quick update: This was an obscure issue with another library I am using (https://github.com/APSL/react-native-keyboard-aware-scroll-view). My report here can be disregarded.

@whiffsalot
Copy link

@Sam-DevZ

I'm on 0.57.1 and am still running into this issue. We also use React-Native-Navigation and 'react-native-keyboard-aware-scroll-view'. What was your solution?

@phantom1299
Copy link

This is still present on 0.57.8
I'm using wix navigaton and this happens when I'm in my auth app wich has a ScrollView rendered and then the user logs in and I start my normal app.

If I don't render a ScrollView it doesn't happen

@thecodrr
Copy link
Contributor

Occurring in 0.59.1. I am using react-native-navigation as well. If there's any fix please tell.

@rickhanlonii
Copy link
Member

Hey all, sorry to hear so many are experiencing this

Unfortunately we can't debug an issue from a single crash report and a number of +1s

If anyone can provide a way for us to reproduce this issue so that we can determine if this is a core issue or and issue with a third-party lib then I am happy to re-open and investigate

@pratham014
Copy link

This issue happens when you are specifying values for margin and padding in %.

Remove the % values from your stylesheet and use flex or DP values and this issue should resolve.

@tsirolnik
Copy link

I had this issue when I've rendered multiple views inside an horizontal ScrollView with the views having width and padding values as percentages, .

Something like this -

<ScrollView horizontal={true}>
    <View style={{ width: '20%', paddingLeft: '5%', paddingRight: '5%'}}>
        <View>
             .....
        </View>
    </View>
    <View style={{ width: '20%', paddingLeft: '5%', paddingRight: '5%'}}>
        <View>
             .....
        </View>
    </View>
</ScrollView>

Changing the styles of the views to absolute values, like @Pratham104 suggested, resolved this issue.

RN 0.60.5

@mangBert
Copy link

any update on this?

@facebook facebook locked as resolved and limited conversation to collaborators Mar 19, 2020
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Mar 19, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

No branches or pull requests