Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bridge extractArgument: doubleValue() on a null object reference #19423

Closed
3 tasks done
tapz opened this issue May 24, 2018 · 20 comments
Closed
3 tasks done

Bridge extractArgument: doubleValue() on a null object reference #19423

tapz opened this issue May 24, 2018 · 20 comments
Labels
Ran Commands One of our bots successfully processed a command. Resolution: Locked This issue was locked by the bot. Type: Invalid This issue does not belong here. Applying this label will cause issue to be closed.

Comments

@tapz
Copy link

tapz commented May 24, 2018

I got this to Crashlytics from one of the users of my app. Would be nice to get more information and the actual cause of the error.

Fatal Exception: java.lang.NullPointerException: Attempt to invoke virtual method 'double java.lang.Double.doubleValue()' on a null object reference
       at com.facebook.react.bridge.ReadableNativeArray.getDouble(ReadableNativeArray.java:114)
       at com.facebook.react.bridge.JavaMethodWrapper$4.extractArgument(JavaMethodWrapper.java:64)
       at com.facebook.react.bridge.JavaMethodWrapper$4.extractArgument(JavaMethodWrapper.java:60)
       at com.facebook.react.bridge.JavaMethodWrapper.invoke(JavaMethodWrapper.java:359)
       at com.facebook.react.bridge.JavaModuleWrapper.invoke(JavaModuleWrapper.java:160)
       at com.facebook.react.bridge.queue.NativeRunnable.run(NativeRunnable.java)
       at android.os.Handler.handleCallback(Handler.java:789)
       at android.os.Handler.dispatchMessage(Handler.java:98)
       at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(MessageQueueThreadHandler.java:29)
       at android.os.Looper.loop(Looper.java:164)
       at com.facebook.react.bridge.queue.MessageQueueThreadImpl$3.run(MessageQueueThreadImpl.java:192)
       at java.lang.Thread.run(Thread.java:764)

Environment

Environment:
OS: macOS High Sierra 10.13.4
Node: 8.11.1
Yarn: 1.6.0
npm: 5.6.0
Watchman: 4.9.0
Xcode: Xcode 9.3.1 Build version 9E501
Android Studio: 3.1 AI-173.4697961

Packages: (wanted => installed)
react: 16.3.2 => 16.3.2
react-native: 0.55.4 => 0.55.4

Steps to Reproduce

No idea.

Expected Behavior

No crash

Actual Behavior

Crash

@react-native-bot react-native-bot added the Type: Invalid This issue does not belong here. Applying this label will cause issue to be closed. label May 24, 2018
@react-native-bot
Copy link
Collaborator

We use GitHub Issues exclusively for tracking bugs in React Native. See the React Native Community Support page for a list of places where you may ask for help.

@react-native-bot react-native-bot added the Ran Commands One of our bots successfully processed a command. label May 24, 2018
@coderdave
Copy link

coderdave commented May 24, 2018

This IS a bug. Why was it closed?

I've attached the red screen if that helps. I also noticed that it happens more often when I navigate quickly around the app.

screenshot_1527198582

@tapz
Copy link
Author

tapz commented May 29, 2018

This is a React Native issue. It has something to do with the bridge, state changes and updating the UI. I changed the order in which I set the state and call native methods and the error does not occur anymore.

@tapz
Copy link
Author

tapz commented May 29, 2018

Anything I did in my code had nothing to do with any double argument. So clearly some screen drawing issue in RN.

@pilot4u
Copy link

pilot4u commented Jun 23, 2018

I'm having the same issue while executing this method:
https://reactnavigation.org/docs/en/navigating-without-navigation-prop.html
and navigating within componentWillReceiveProps

@bondansebastian
Copy link

Hi @tapz , i'm having the same issues as everyone here
Can you elaborate more what do you mean by

I changed the order in which I set the state an call native methods

@tapz
Copy link
Author

tapz commented Jun 26, 2018

Hi @bondansebastian , I modified my code to change the component state in one place instead of setting different fields separately. Also moved the calls to native bridge to different places. Can't really tell any systematic way. Just doing things differently seems to have bypassed the bug.

@witalobenicio
Copy link

witalobenicio commented Jul 7, 2018

Also moved the calls to native bridge to different places

What do you mean by this @tapz ?

@mjugger
Copy link

mjugger commented Jul 13, 2018

@tapz
Can you give us a code example of what you mean?

@mjugger
Copy link

mjugger commented Jul 13, 2018

So far this error only seems to happen when I use hot reload

@seanmorton
Copy link

seanmorton commented Jul 17, 2018

I'm seeing this error in release mode, so likely not just related to hot reload. I'm on RN 0.56.0.

@jnrepo
Copy link

jnrepo commented Jul 30, 2018

I'm also seeing this in release mode w/ Android. Using react-native 0.55.3.

@gluons
Copy link

gluons commented Aug 9, 2018

I also face this problem.

@tapz Can you reopen this issue?

@gluons
Copy link

gluons commented Aug 9, 2018

I found the solution for my problem. My fault. 😅 🤦‍♀

I forget to give a second parameter (duration) to ToastAndroid.show.

@seanmorton
Copy link

For me, this was also an issue with my own codebase. No need to reopen.

@noahtallen
Copy link

I'm trying to use StatusBar.setBackgroundColor(color, true) and getting this error. Only reason I'm using imperative API is because the status bar component isn't working for one specific component for some reason.

@tuononh
Copy link

tuononh commented Aug 30, 2018

@ntomallen Have you solve it? I have the same problem. Others StatusBar methods work fine.

@noahtallen
Copy link

I stopped trying to use that method. I think it was set incorrectly on the android side of things; maybe in the manifest

@im-aditya
Copy link

Having the same issue.

@serhiipalash
Copy link

I have this error when I pass NaN to animatedScale.setValue(newScale). If anyone else is experiencing this issue during animation handling, check your calculation so that new value always should be a real number.

@facebook facebook locked as resolved and limited conversation to collaborators May 24, 2019
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label May 24, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Ran Commands One of our bots successfully processed a command. Resolution: Locked This issue was locked by the bot. Type: Invalid This issue does not belong here. Applying this label will cause issue to be closed.
Projects
None yet
Development

No branches or pull requests