Skip to content

Image with invalid source URI crashes in 0.18 on Android #5465

@thomdixon

Description

@thomdixon

Easy enough to reproduce:

Use <Image source={{uri: null}} /> and it will crash your application. Likewise, invalid URIs, such as <Image source={{uri: '//facebook.github.io/react-native/img/header_logo.png'}} /> will also crash.

This is because line 279 in ReactImageView.java of ReactAndroid passes a null URI to line 103 in ImageRequestBuilder.java of fresco that calls Preconditions.checkNotNull on the null uri, which throws a NPE.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions