Skip to content
This repository has been archived by the owner on Nov 12, 2023. It is now read-only.

[BUG] null is not an object (evaluating 'RNDominantColor.getColorFromURL') #10

Open
wobsoriano opened this issue Aug 15, 2020 · 7 comments
Assignees
Labels
bug Something isn't working work in progress

Comments

@wobsoriano
Copy link

wobsoriano commented Aug 15, 2020

Trying to test in both bare and managed workflow expo app with RN v0.62.2. Happens in both ios and android.

Code:

getColorFromURL('https://randomuser.me/api/portraits/men/37.jpg')
        .then((colors) => {
          console.log(colors.primary);
        })
        .catch((err) => {
          console.log(err);
        });

Got this error:

null is not an object (evaluating 'RNDominantColor.getColorFromURL')
- node_modules/rn-dominant-color/index.js:9:21 in Promise$argument_0
- node_modules/promise/setimmediate/core.js:45:6 in tryCallTwo
- node_modules/promise/setimmediate/core.js:200:22 in doResolve
- node_modules/promise/setimmediate/core.js:66:11 in Promise
- node_modules/rn-dominant-color/index.js:8:11 in getColorFromURL
- node_modules/react-native/Libraries/Core/Timers/JSTimers.js:135:14 in _callTimer
- node_modules/react-native/Libraries/Core/Timers/JSTimers.js:387:16 in callTimers
- node_modules/react-native/Libraries/BatchedBridge/MessageQueue.js:425:19 in __callFunction
- node_modules/react-native/Libraries/BatchedBridge/MessageQueue.js:112:6 in __guard$argument_0
- node_modules/react-native/Libraries/BatchedBridge/MessageQueue.js:373:10 in __guard
- node_modules/react-native/Libraries/BatchedBridge/MessageQueue.js:111:4 in callFunctionReturnFlushedQueue
* [native code]:null in callFunctionReturnFlushedQueue
@wobsoriano wobsoriano added the bug Something isn't working label Aug 15, 2020
@patpij2
Copy link

patpij2 commented Aug 15, 2020

I also have this issue
Screenshot 2020-08-16 at 00 34 44

Screenshot 2020-08-16 at 00 35 15

@wobsoriano
Copy link
Author

Related to these issues

facebook/react-native#26813
facebook/react-native#29228

@matinzd matinzd self-assigned this Aug 18, 2020
@matinzd matinzd pinned this issue Aug 18, 2020
@CharliBregnballe
Copy link

I am getting the same error.
Did any of you find a solution to this?

@patpij2
Copy link

patpij2 commented Dec 11, 2020

I am getting the same error.
Did any of you find a solution to this?

Unfortunately not :(

@CharliBregnballe
Copy link

Ah alright.
Did you go with another solution? Or?

@quinnjaymeo
Copy link

@CharliBregnballe I experienced the same issue, and upon a bit of investigation, it turns out react native did not auto-link (despite having RN version 0.60), so I ran npx react-native link rn-dominant-color to link it manually, and voila! everything works fine. It may not help, but I just thought I'd share.

@matinzd matinzd added enhancement New feature or request work in progress and removed enhancement New feature or request labels Jun 4, 2021
@matinzd
Copy link
Member

matinzd commented Jun 4, 2021

We are trying to refactor the whole project.

Thanks for your patient.

@matinzd matinzd unpinned this issue Nov 12, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working work in progress
Projects
None yet
Development

No branches or pull requests

5 participants