Skip to content
This repository was archived by the owner on Aug 29, 2023. It is now read-only.
This repository was archived by the owner on Aug 29, 2023. It is now read-only.

Error: Attempt to invoke interface method 'int android.database.Cursor.getColumnIndexOrThrow(java.lang.String)' on a null object #12

@taichi-jp

Description

@taichi-jp

When excuting the code below,

RNGRP.getRealPathFromURI(payload.uri)
    .then((filePath: string) => console.log(filePath))
    .catch((error: string) => console.log(error));

It raises an error saying:

Error: Attempt to invoke interface method 'int android.database.Cursor.getColumnIndexOrThrow(java.lang.String)' on a null object reference
    at convertError (GRP.common.js:21)
    at tryCatcher (bluebird.js:4594)
    at Promise._settlePromiseFromHandler (bluebird.js:2698)
    at Promise._settlePromiseAt (bluebird.js:2772)
    at Promise._settlePromises (bluebird.js:2888)
    at Async._drainQueue (bluebird.js:175)
    at Async._drainQueues (bluebird.js:185)
    at Async.drainQueues (bluebird.js:67)
    at JSTimers.js:301
    at _callTimer (JSTimers.js:154)
    at _callImmediatesPass (JSTimers.js:202)
    at Object.callImmediates (JSTimers.js:470)
    at MessageQueue.__callImmediates (MessageQueue.js:329)
    at MessageQueue.js:147
    at MessageQueue.__guardSafe (MessageQueue.js:316)
    at MessageQueue.flushedQueue (MessageQueue.js:146)

(I tried this solution to build successfully: #10 (comment))

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions