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

Android crash - getImageSize...error={"framesToPop":1,"code":"E_GET_SIZE_FAILURE"} #15

Open
VlCTORlOUS opened this issue Jan 30, 2017 · 8 comments

Comments

@VlCTORlOUS
Copy link

VlCTORlOUS commented Jan 30, 2017

When using this module on Android my App crashes and I get the following error:

getImageSize...error={"framesToPop":1,"code":"E_GET_SIZE_FAILURE"}, source={"uri":"https://s3.eu-central-1.amazonaws.com/partyboote-staging/media/58598a1de2c26.jpg"}

On iOS it workes perfectly fine!
Here is how I try to use it:

...
import TransformableImage from 'react-native-transformable-image';
...
const screenHeight = Dimensions.get('window').height;
const screenWidth = Dimensions.get('window').width;
...

render() {
   ...
   return (
      ...
      <View style={{flex: 1}}>
          <TransformableImage
              resizeMode={'contain'}
              source={{uri: mediaUrl}}
              style={{height: screenHeight, width: screenWidth}}/>
      </View>
      ...
   )
}

Did I do something wrong?
I know that I used this module in an older project the same way I am trying to do here, and it worked.

Thanks in advance :)

Here is a screenshot:

screenshot-2017-01-30_11 54 11 661

@pewh
Copy link

pewh commented Mar 1, 2017

+1 get same issue too

EDIT:
Add pixels props solve this error

@HananeAlSamrout
Copy link

my problem was solved by transforming images from .jpg to .png

@andrey-skl
Copy link

I get this issue because my server returns image only if auth cookie is set. But there is no way to pass cookie to react native's Image.getSize()...

@rgoldiez
Copy link

@huston007 - I've faced the same issue as you described. My work around was to fetch the image with an API call using a token and storing it locally. Then I used getSize and render the local copy.

@andrey-skl
Copy link

In my case it worked before and works on iOS. But looks like cookies passing to image load requests is broken on android now. I created an issue facebook/react-native#13630

@tuckg
Copy link

tuckg commented Jul 21, 2017

I have the same problem when I try to show Image from CameraRoll.getPhotos, Anyone know how to solve it?

@ducpt2
Copy link

ducpt2 commented Nov 24, 2017

I set pixel like @pewh did, but i choose a big number like {{ width: 10000, height: 10000 }}, don't know what is right. :)

@maraujop
Copy link

This is actually triggered by a bug in React Native quite old
facebook/react-native#10002

When you pass pixels property you are preventing react-native-transformable-image to call getSize which is obviously buggy.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants