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

CameraRoll error on android java.lang.NumberFormatException: null #18023

Closed
m-cho opened this issue Feb 19, 2018 · 1 comment
Closed

CameraRoll error on android java.lang.NumberFormatException: null #18023

m-cho opened this issue Feb 19, 2018 · 1 comment
Labels
Ran Commands One of our bots successfully processed a command. Resolution: Locked This issue was locked by the bot.

Comments

@m-cho
Copy link

m-cho commented Feb 19, 2018

Is this a bug report?

Yes

Have you read the Contributing Guidelines?

Yes

Environment

Environment:
OS: macOS High Sierra 10.13.3
Node: 9.3.0
Yarn: 1.3.2
npm: 5.6.0
Watchman: 4.9.0
Xcode: Xcode 9.2 Build version 9C40b
Android Studio: 3.0 AI-171.4443003

Packages: (wanted => installed)
react: 16.0.0-beta.5 => 16.0.0-beta.5
react-native: 0.49.3 => 0.49.3

Steps to Reproduce

  1. Try to access videos on Nokia 3 from JS CameraRoll.getPhotos({assetType: "Videos", first: 40})

Expected Behavior

Get list of videos.

Actual Behavior

CameraRollManager throws an error java.lang.NumberFormatException: null. When I try the same code on Xiaomi Redmi note 4x or on Lenovo k6, everything works fine. I also try to remove all videos from Nokia 3 phone and i still get this error. When I try to get gifs on these three phones with CameraRoll.getPhotos({ { mimeTypes: ['image/gif'] } }) everything works fine.

This is log i captured with logcat:

E/unknown:ReactNative: Exception in native call
                                                                            java.lang.NumberFormatException: null
                                                                                at java.lang.Integer.parseInt(Integer.java:483)
                                                                                at java.lang.Integer.parseInt(Integer.java:556)
                                                                                at com.facebook.react.modules.camera.CameraRollManager.putImageInfo(CameraRollManager.java:425)
                                                                                at com.facebook.react.modules.camera.CameraRollManager.putEdges(CameraRollManager.java:364)
                                                                                at com.facebook.react.modules.camera.CameraRollManager.access$300(CameraRollManager.java:59)
                                                                                at com.facebook.react.modules.camera.CameraRollManager$GetPhotosTask.doInBackgroundGuarded(CameraRollManager.java:315)
                                                                                at com.facebook.react.modules.camera.CameraRollManager$GetPhotosTask.doInBackgroundGuarded(CameraRollManager.java:247)
                                                                                at com.facebook.react.bridge.GuardedAsyncTask.doInBackground(GuardedAsyncTask.java:34)
                                                                                at com.facebook.react.bridge.GuardedAsyncTask.doInBackground(GuardedAsyncTask.java:22)
                                                                                at android.os.AsyncTask$2.call(AsyncTask.java:305)
                                                                                at java.util.concurrent.FutureTask.run(FutureTask.java:237)
                                                                                at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
                                                                                at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
                                                                                at java.lang.Thread.run(Thread.java:761)

screenshot_20180219-162124

Reproducible Demo

https://snack.expo.io/SJhq5F_wf

@react-native-bot
Copy link
Collaborator

Thanks for posting this! It looks like you may not be using the latest version of React Native, v0.53.0, released on January 2018. Can you make sure this issue can still be reproduced in the latest version?

I am going to close this, but please feel free to open a new issue if you are able to confirm that this is still a problem in v0.53.0 or newer.

How to ContributeWhat to Expect from Maintainers

@react-native-bot react-native-bot added Ran Commands One of our bots successfully processed a command. Stale There has been a lack of activity on this issue and it may be closed soon. labels Feb 24, 2018
@stale stale bot removed the Stale There has been a lack of activity on this issue and it may be closed soon. label Feb 24, 2018
@facebook facebook locked as resolved and limited conversation to collaborators Feb 24, 2019
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Feb 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.
Projects
None yet
Development

No branches or pull requests

2 participants