Skip to content

RNFetchBlob.fs.exists NullPointerException on Android with invalid path syntax #469

Open
@tmaly1980

Description

@tmaly1980

Currently running 0.11.12 (latest) on RN 0.60.5. I've noticed that RNFetchBlob.fs.exists crashes with a NullPointerException on Android when the path provided has an invalid syntax. For example:

      path = "data:image/png;base64,asdasdasdasdasdasdasdasdasdasd" // Invalid path
      const pathExists = await RNFetchBlob.fs.exists(path);

I don't think this would be a common occurrence, but shouldn't the function gracefully fail when the file doesn't/cannot exist (ie due to an invalid path format), rather than let the app crash entirely? iOS is able to return gracefully without crashing.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions