Skip to content

[0.58.2] StatusBar Attempt to invoke virtual method 'double java.lang.Double.doubleValue()' on a null object reference #23193

Closed
@abendi

Description

@abendi

EDIT: Seems to be fixed in 0.58.3.

Environment

 React Native Environment Info:
    System:
      OS: Windows 10
      CPU: (4) x64 Intel(R) Core(TM) i7-6600U CPU @ 2.60GHz
      Memory: 699.78 MB / 7.83 GB
    Binaries:
      Yarn: 1.10.1 - C:\Program Files (x86)\Yarn\bin\yarn.CMD
      npm: 6.4.1 - C:\Program Files\nodejs\npm.CMD
    IDEs:
      Android Studio: Version  3.2.0.0 AI-181.5540.7.32.5056338

Description

After upgrading from 0.58.1 to 0.58.2, using StatusBar's declarative API now throws an exception on Android (haven't tested on IOS).

render() {
  return (
    <View>
      <StatusBar barStyle={"dark-content"} animated={true} />
    </View>
  );
}

I fiddled around with props and after adding backgroundColor={"transparent"} hidden={false} it stopped throwing the exception.

Using imperative API instead of declarative, e.g. StatusBar.setBarStyle("dark-content", true); seems to be working fine.

Not sure if it's a bug or breaking change, but after adding those props, status bar now seems to overwrite previously set translucent={true} to false and needs to be explicitly set again.

Reproducible Demo

See description.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions