React-native-image-crop-picker: Image is not loaded in crop screen. Infinity loading.

Created on 21 Jan 2019  路  29Comments  路  Source: ivpusic/react-native-image-crop-picker

Version

Tell us which versions you are using:

  • react-native-image-crop-picker v0.21.3
  • react-native v0.57.4

Platform

Tell us to which platform this issue is related

  • Android

Expected behavior

Always possible to crop a picture, after selection image shows in crop screen.

Actual behaviour

After some time of using app and picking images, it stuck in loading state on crop screen.
photo_2019-01-21_15-01-40

Steps to reproduce

  1. Pick and crop several images (all the time, it happens after undefined number of repetition) - either gallery or camera. Standard options
    { width: 400, height: 300, cropping: true }

  2. At some point of time, when user tries to pick and crop another picture, he gets Infiniti loading indicator on crop screen (with no image on it)

Attachments

I've tried to find anything in logcat, but there is no error/warning/specific debug info at the point of time when it happens.

Another (hopefully) useful info:
when it happens, the top left button to dismiss picker is still active, and if tap it, as expected, it goes back to app.
When it happens, all the next attempts to pick image (either camera or gallery) gives the same result - stuck in crop screen.
No "memoryWarning" events happen during testing.

Most helpful comment

I'm having the same error, so far, I did not find a good solution beyond restarting the application that worked for me some times

All 29 comments

I'm having the same error, so far, I did not find a good solution beyond restarting the application that worked for me some times

re-starting app helps me too, but it isn't good for users :/

I encounter the same issue in my app. Any updates on that? The ImagePicker only works for me on Android if cropping is disabled. :/

Same issue for me.

same issue, any solution?? @dominikdnd @magicismight @EJohnF @vinicius741 @mromarreyes

@adirzoari not yet

same issue too ..

Same for the latest versions :
"react-native-image-crop-picker": "0.22.0",
"react-native": "0.58.4",

Getting same error.
Anything on this yet?
"react-native-image-crop-picker": "0.22.0",
"react-native": "0.58.4",

I have the exact same problem

"react-native-image-crop-picker": "0.22.0",
"react-native": "0.57.2",

I didn't succeed to find the exact pattern, it seems really random.
I tried to log a bit in the android sources to see if everything was correctly set-up, I am even wondering if it does not come from uCrop itself (the library used to crop the images).
Will try to investigate a bit more when I'll have some free time

Edit -> I tried on emulator and on real device, happens on both, real device runs on Android 7.0 and emulator 6.0

+1 to this issue, would love to see any possible solution.

Same issue.

same issue.

same to

Same. Wonder if this issue will disappear after building an apk?

same issue here :(

Here it is always fixed after killing/restarting the app.
And it always happens again after an app reload (either from shake and press reload, or live reload).
So it makes me think that it might not happen to users in production... Can anyone confirm this?

I am able to successfully crop on Android in production. It seems this issue might be only present in testing. I, however, only tested Camera. I will try to test picker later.

@Eralyne me too i tested it in the production and i think this issues appeared only in the dev version.

Glad to hear that it works for more than just me. I tested picker as well and it works fine. Seems this is a dev-only issue and should help alleviate a lot of concerns. It would still be great to have it fixed on that end, though, for just the peace of mind.

Any update on this? ETA on a fix?

same issue on [email protected]

Same issue appears occasionally on [email protected] and [email protected]

It is an uCrop related issue. Check this out:

I read the ucrop's source code, I guess I found the problem. BitmapLoadTask is extend AsyncTask, and every instance of AsyncTask is using the same serial executor by default. When our app use AsyncTask first in other place, then open crop page, BitmapLoadTask has to wait to execute until other instance of AsyncTask's execution finished. I think the author should execute BitmapLoadTask on a custom non-serial executor.

Found it here: https://github.com/Yalantis/uCrop/issues/141

Basically make sure there is no AsyncTask running on your app while cropping a photo.

Hope it helps.

Can confirm the issue persists in react .60, only with android:
"react-native-image-crop-picker": "0.25.0",
"react-native": "0.60.5",

Broken for me as well
"react-native": "0.60.5",
"react-native-image-crop-picker": "^0.25.0",

all the same
"react-native":"^0.59.8"
"react-native-image-crop-picker": "^0.24.1",

same issue on
"react-native":"^0.59.9"
"react-native-image-crop-picker": "^0.24.1",

Same happens on
"react-native": "0.61.5",
"react-native-image-crop-picker": "^0.28.0",

Was this page helpful?
0 / 5 - 0 ratings

Related issues

JodiWarren picture JodiWarren  路  3Comments

althurzard picture althurzard  路  3Comments

sergiulucaci picture sergiulucaci  路  3Comments

pavsidhu picture pavsidhu  路  3Comments

zhangjunhou picture zhangjunhou  路  3Comments