react-native-photo-view icon indicating copy to clipboard operation
react-native-photo-view copied to clipboard

iOS not loading image -> <error>: CGAffineTransformInvert: singular matrix.

Open Axort opened this issue 8 years ago • 6 comments
trafficstars

Hi!

Sometimes In iOS the images doesn't load. In Android works perfectly.

I'm using: react-native: 0.45.1 [email protected]

This is my code:

<PhotoView 
                source={{uri: this.props.photo.url}} 
                minimumZoomScale={1}
                maximumZoomScale={3}
                androidScaleType='fitCenter'
                onLoad={() => this.setState({ imageLoading: false })}
                onLoadStart={() => console.log('download started')}
                onLoadEnd={() => console.log('download ended')}
                style={styles.imageFullScreen} />

I noticed that when the images don't load, the console show this error:

<Error>: CGAffineTransformInvert: singular matrix.

Also when the image loads successfully, the 'download started' console log appears. When the image fail to load, it only shows the 'download ended' console log.

Am i doing something wrong? or is there a property am I missing?

Thanks in advance.

Axort avatar Aug 19 '17 01:08 Axort

I can confirm this

samanthacampisi avatar Aug 24 '17 14:08 samanthacampisi

Not seeing the error, but every few times you view an image it will return a black area after onLoadEnd

zackify avatar Aug 25 '17 18:08 zackify

Yes! Same here. I can confirm this. I dont see any logs in the simulator logger when the image fails to load. Just a blank screen. My images are being served over https. Did anyone find a solution for this?

srameshr avatar Aug 30 '17 05:08 srameshr

Same issue here guys. I discover that if I change the image, it would load perfectly the first time. If I navigate, changing route and go back (or either refresh the app), it will show a black area. When tapping in the black area where the image is supossed to be it yields: Error calling RCTEventEmitter.receiveEvent folly::toJson: JSON object value was a NaN or INF If I change the image for a new one, it will work again (until I change route or reload, then the black box again.) Couldn't find a solution yet.

igMartin avatar Aug 31 '17 12:08 igMartin

@igMartin Same here. Both on 1.3.x and 1.4.x

srameshr avatar Aug 31 '17 13:08 srameshr

I also face same problem, the image sometimes load sometimes not load in IOS.

fschai89 avatar Dec 04 '17 06:12 fschai89