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

StackNavigator crashing on Android with 1.0.0-beta.16 #2853

Closed
richeterre opened this issue Oct 31, 2017 · 15 comments
Closed

StackNavigator crashing on Android with 1.0.0-beta.16 #2853

richeterre opened this issue Oct 31, 2017 · 15 comments
Labels

Comments

@richeterre
Copy link

Current Behavior

  1. Create a blank RN project using react-native init
  2. Add a dead-simple StackNavigator:
const DemoNavigator = StackNavigator({
  Blank: { screen: () => <Text>Blank</Text> }
})

export default class App extends Component<{}> {
  render() {
    return (
      <DemoNavigator  />
    );
  }
}
  1. Run project on Android (I'm using an API level 23 emulator)

Result:

screenshot_1509481707

Expected Behavior

The app should render a StackNavigator with a screen containing the text "Blank". On iOS this works as expected.

Your Environment

software version
react-navigation 0.49.5
react-native 1.0.0-beta.16
node 8.8.1
npm or yarn yarn 1.2.1
@kelset
Copy link

kelset commented Oct 31, 2017

Thanks for reporting, we'll look into it asap.

@kelset kelset added the bug label Oct 31, 2017
@spencercarli
Copy link
Member

spencercarli commented Oct 31, 2017

Interesting - can't reproduce on Android https://snack.expo.io/B1pzVPURZ

Checking on a nexus 5. Need to check what version of android Looks like I'm running Android 6.0.1, which seems is also API level 23?

@richeterre
Copy link
Author

I'm running it on a Nexus 5X emulator with API level 23. Not super familiar with Expo tbh, but I wonder if the behavior can differ between Expo and react-native init?

@matthamil
Copy link
Member

matthamil commented Oct 31, 2017

I can reproduce with react-native init, same error as OP.

@spencercarli
Copy link
Member

Yeah must be a discrepancy between expo and react native

@spencercarli
Copy link
Member

It's due to the JSC version on Android (Expo specifies a higher one, which is why we didn't see that error before). If you turn on remote debugging on Android the app will render.

Still trying to figure out why this occurs and how to fix it.

@mitchellhuang
Copy link

Getting the exact same error. Nexus 5X real device, API level 25.

"react": "^16.0.0-beta.5",
"react-native": "^0.49.5",

@allmaxgit
Copy link

allmaxgit commented Nov 1, 2017

@huangbong
For fix you can change react-navigation dependency in package.json:

"react-navigation": "git+https://github.com/react-community/react-navigation.git#ed2fc9a09e2f562ae9d3fc7f5df17c593989db0a",

for directly install react-navigation from this repository with commit where it bug fixed.
And run yarn.

@mitchellhuang
Copy link

@allmaxgit works perfect now. Thanks!

@h0rac
Copy link

h0rac commented Nov 1, 2017

dave solution works with editing src/views/SafeAreaView.js

@johngoren
Copy link

I don't know if I should open up a separate issue for this, but I found that under beta.16, my stack developed an unsightly white gap over the toolbar that went away when I rolled back to beta.15.

@clickclickonsal
Copy link

clickclickonsal commented Nov 2, 2017

@johngoren I've experienced that issue with beta.15
(Before)
image
I'm pointing to the version @allmaxgit pointed out because that fixes the original issue. In using that version, that as well fixes that weird white gap over the toolbar in beta.15.
(After)
image

@kelset
Copy link

kelset commented Nov 2, 2017

@johngoren @clickclickonsal yeah we already fixed the header issue, I suggest you point to master if you have the necessity to be on beta.16. But we are going to do a new release soon 💪

@kelset
Copy link

kelset commented Nov 3, 2017

Quick update: we released ´beta.17´, @richeterre can you please update and close this issue if it's fixed?

@richeterre
Copy link
Author

It's a fix! Thank you for the quick response, and keep up the good work ❤️

sourcecode911 pushed a commit to sourcecode911/react-navigation that referenced this issue Mar 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

9 participants