triniwiz / nativescript-image-cache-it

Image caching plugin for nativescript
Apache License 2.0
45 stars 21 forks source link

Crashing on iOS (Invalid value: right) #46

Closed fhackenb closed 5 years ago

fhackenb commented 5 years ago

Which platform(s) does your issue occur on?

Please, provide the following version numbers that your issue occurs with:

Please, tell us how to recreate the issue in as much detail as possible.

I have a RadListView with some items in it and when I attempt to use this plugin the app crashes. Adding some debug logic, I found the Error:

TypeError: undefined is not a function (near '...this.nativeView.sd_setImageWithURLPlaceholderImageCompleted...')

The source is:

this.nativeView.sd_setImageWithURLPlaceholderImageCompleted(src, this.placeHolder
                        ? imageSrc.fromFileOrResource(this.placeHolder).ios
                        : null, function (p1, p2, p3, p4) {
                            _this.isLoading = false;
                            if (p2 && _this.errorHolder) {
                                var source = imageSrc.fromFileOrResource(_this.errorHolder);
                                _this.nativeView.image = source ? source.ios : null;
                            }
                        });

My code is:

<ImageCacheIt stretch="aspectFit" resize="150,150" placeHolder="res://user_3x" [imageUri]="item.imageUrl" *ngIf="item.imageUrl"></ImageCacheIt>

I've tried w/ and w/o the placeholder and resize but I'm consistently getting the same error

Any ideas?

triniwiz commented 5 years ago

fixed in the latest alpha