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

Update FastImageViewManager.java #423

Merged
merged 1 commit into from
Sep 27, 2021
Merged

Conversation

hungvxt
Copy link
Contributor

@hungvxt hungvxt commented Mar 5, 2019

Dear DylanVann,

First of all, I would like to say thank you for your very good library. It's so great.

The next thing, I create this pull request to fix an exception (IMHO) that I faced with my project.

The exception is: **java.lang.IllegalArgumentException** 
The exception detail:
com.facebook.react.bridge.JSApplicationIllegalArgumentException: 
  at com.facebook.react.uimanager.ViewManagersPropertyCache$PropSetter.updateViewProp (ViewManagersPropertyCache.java:95)
  at com.facebook.react.uimanager.ViewManagerPropertyUpdater$FallbackViewManagerSetter.setProperty (ViewManagerPropertyUpdater.java:132)
  at com.facebook.react.uimanager.ViewManagerPropertyUpdater.updateProps (ViewManagerPropertyUpdater.java:51)
  at com.facebook.react.uimanager.ViewManager.updateProperties (ViewManager.java:32)
  at com.facebook.react.uimanager.NativeViewHierarchyManager.updateProperties (NativeViewHierarchyManager.java:138)
  at com.facebook.react.uimanager.UIViewOperationQueue$UpdatePropertiesOperation.execute (UIViewOperationQueue.java:95)
  at com.facebook.react.uimanager.UIViewOperationQueue$1.run (UIViewOperationQueue.java:894)
  at com.facebook.react.uimanager.UIViewOperationQueue.flushPendingBatches (UIViewOperationQueue.java:1001)
  at com.facebook.react.uimanager.UIViewOperationQueue.access$2400 (UIViewOperationQueue.java:46)
  at com.facebook.react.uimanager.UIViewOperationQueue$DispatchUIFrameCallback.doFrameGuarded (UIViewOperationQueue.java:1061)
  at com.facebook.react.uimanager.GuardedFrameCallback.doFrame (GuardedFrameCallback.java:29)
  at com.facebook.react.modules.core.ReactChoreographer$ReactChoreographerDispatcher.doFrame (ReactChoreographer.java:134)
  at com.facebook.react.modules.core.ChoreographerCompat$FrameCallback$1.doFrame (ChoreographerCompat.java:105)
  at android.view.Choreographer$CallbackRecord.run (Choreographer.java:909)
  at android.view.Choreographer.doCallbacks (Choreographer.java:723)
  at android.view.Choreographer.doFrame (Choreographer.java:655)
  at android.view.Choreographer$FrameDisplayEventReceiver.run (Choreographer.java:897)
  at android.os.Handler.handleCallback (Handler.java:789)
  at android.os.Handler.dispatchMessage (Handler.java:98)
  at android.os.Looper.loop (Looper.java:164)
  at android.app.ActivityThread.main (ActivityThread.java:6944)
  at java.lang.reflect.Method.invoke (Native Method)
  at com.android.internal.os.Zygote$MethodAndArgsCaller.run (Zygote.java:327)
  at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1374)
Caused by: java.lang.reflect.InvocationTargetException: 
  at java.lang.reflect.Method.invoke (Native Method)
  at com.facebook.react.uimanager.ViewManagersPropertyCache$PropSetter.updateViewProp (ViewManagersPropertyCache.java:83)
Caused by: java.lang.IllegalArgumentException: 
  at com.bumptech.glide.request.target.ViewTarget.getRequest (**ViewTarget.java:265**)
  at com.bumptech.glide.RequestManager.untrack (RequestManager.java:597)
  at com.bumptech.glide.RequestManager.untrackOrDelegate (RequestManager.java:571)
  at com.bumptech.glide.RequestManager.clear (RequestManager.java:559)
  at com.bumptech.glide.RequestManager.clear (RequestManager.java:544)
  at com.dylanvann.fastimage.FastImageViewManager.setSrc (**FastImageViewManager.java:78**)

Best Regard.
Hung Vo

@codecov
Copy link

codecov bot commented Mar 5, 2019

Codecov Report

Merging #423 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #423   +/-   ##
=======================================
  Coverage   94.11%   94.11%           
=======================================
  Files           1        1           
  Lines          17       17           
=======================================
  Hits           16       16           
  Misses          1        1

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 89c0e2e...834ffd8. Read the comment docs.

1 similar comment
@codecov
Copy link

codecov bot commented Mar 5, 2019

Codecov Report

Merging #423 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #423   +/-   ##
=======================================
  Coverage   94.11%   94.11%           
=======================================
  Files           1        1           
  Lines          17       17           
=======================================
  Hits           16       16           
  Misses          1        1

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 89c0e2e...834ffd8. Read the comment docs.

@DylanVann DylanVann merged commit a7a8643 into DylanVann:main Sep 27, 2021
github-actions bot pushed a commit that referenced this pull request Sep 27, 2021
## [8.5.11](v8.5.10...v8.5.11) (2021-09-27)

### Bug Fixes

* null exception in FastImageViewManager.java ([#423](#423)) ([a7a8643](a7a8643))
@github-actions
Copy link

🎉 This PR is included in version 8.5.11 🎉

The release is available on:

Your semantic-release bot 📦🚀

anaisbetts added a commit to chatterbugapp/react-native-fast-image that referenced this pull request Sep 28, 2021
* upstream/main:
  release(version): Release 8.5.11 [skip ci]
  fix: null exception in FastImageViewManager.java (DylanVann#423)
  release(version): Release 8.5.10 [skip ci]
  chore: convert examples to hooks (DylanVann#830)
  release(version): Release 8.5.9 [skip ci]
  fix: FastImage extends ViewProps (DylanVann#829)
  ci: update CI and (re)enable coverage (DylanVann#826) [skip ci]
  release(version): Release 8.5.8 [skip ci]
  docs: fix gifs
  release(version): Release 8.5.7 [skip ci]
  chore: upgrade example to react-native@0.65.1
  release(version): Release 8.5.6 [skip ci]
  fix: make corresponding flow file for .cjs file
alicayan008 pushed a commit to alicayan008/ReactNative-fast-image that referenced this pull request Jul 4, 2023
billouboq pushed a commit to beedeez/react-native-fast-image that referenced this pull request Aug 6, 2023
tungxuan1656 pushed a commit to tungxuan1656/react-native-fast-image that referenced this pull request Dec 26, 2023
tungxuan1656 pushed a commit to tungxuan1656/react-native-fast-image that referenced this pull request Dec 26, 2023
## [8.5.11](DylanVann/react-native-fast-image@v8.5.10...v8.5.11) (2021-09-27)

### Bug Fixes

* null exception in FastImageViewManager.java ([DylanVann#423](DylanVann#423)) ([a7a8643](DylanVann@a7a8643))
github-actions bot pushed a commit to johto-breakroom/react-native-fast-image that referenced this pull request Nov 15, 2024
# 1.0.0 (2024-11-15)

### Bug Fixes

* accessibilityIgnoresInvertColors prop not recognised when using TypeScript ([DylanVann#666](https://github.com/johto-breakroom/react-native-fast-image/issues/666)) ([22f89e4](22f89e4)), closes [/github.com/DylanVann/react-native-fast-image/blob/master/src/index.tsx#L150-L160](https://github.com//github.com/DylanVann/react-native-fast-image/blob/master/src/index.tsx/issues/L150-L160)
* Add git tag to CocoaPods source property ([DylanVann#601](https://github.com/johto-breakroom/react-native-fast-image/issues/601)) ([2d706ad](2d706ad))
* add react@17 as peer dependency ([DylanVann#790](https://github.com/johto-breakroom/react-native-fast-image/issues/790)) ([27bd586](27bd586))
* Add tintColor to Flow FastImageProps type ([DylanVann#871](https://github.com/johto-breakroom/react-native-fast-image/issues/871)) ([37abecd](37abecd))
* Add tintColor type definition. ([4adf42f](4adf42f))
* Bump Glide version number to v4.11.0. ([DylanVann#649](https://github.com/johto-breakroom/react-native-fast-image/issues/649)) ([c4e4306](c4e4306)), closes [DylanVann#536](https://github.com/johto-breakroom/react-native-fast-image/issues/536)
* do not crash when source is invalid ([DylanVann#782](https://github.com/johto-breakroom/react-native-fast-image/issues/782)) ([5c5fefa](5c5fefa))
* export FastImageStaticProperties ([DylanVann#822](https://github.com/johto-breakroom/react-native-fast-image/issues/822)) ([d69f692](d69f692))
* FastImage extends ViewProps ([DylanVann#829](https://github.com/johto-breakroom/react-native-fast-image/issues/829)) ([68db871](68db871)), closes [DylanVann#819](https://github.com/johto-breakroom/react-native-fast-image/issues/819)
* Fix dependency versions not specified in podfile. ([89f3379](89f3379)), closes [DylanVann#456](https://github.com/johto-breakroom/react-native-fast-image/issues/456)
* Fix fallback prop not working. ([DylanVann#420](https://github.com/johto-breakroom/react-native-fast-image/issues/420)) ([487d410](487d410))
* Fix IllegalArgumentException crash (Android). ([DylanVann#511](https://github.com/johto-breakroom/react-native-fast-image/issues/511)) ([b6c4677](b6c4677))
* Fix incorrect syntax. ([11f6047](11f6047))
* Fix local resource cache issue on Android. ([DylanVann#472](https://github.com/johto-breakroom/react-native-fast-image/issues/472)) ([5f65383](5f65383)), closes [DylanVann#402](https://github.com/johto-breakroom/react-native-fast-image/issues/402)
* Fix memory leak on iOS. ([DylanVann#433](https://github.com/johto-breakroom/react-native-fast-image/issues/433)) ([70be744](70be744))
* Fix peer dependency and remove prop-types. ([44a4c8b](44a4c8b))
* Fix setting props order issue for iOS. ([DylanVann#303](https://github.com/johto-breakroom/react-native-fast-image/issues/303)) ([5597ed0](5597ed0)), closes [DylanVann#304](https://github.com/johto-breakroom/react-native-fast-image/issues/304)
* Fix wildcard peer dependencies. ([7149420](7149420)), closes [DylanVann#440](https://github.com/johto-breakroom/react-native-fast-image/issues/440)
* Fixes cacheControl types. ([DylanVann#382](https://github.com/johto-breakroom/react-native-fast-image/issues/382)) ([e13db7d](e13db7d)), closes [DylanVann#325](https://github.com/johto-breakroom/react-native-fast-image/issues/325)
* Fixes podspec syntax. ([b627646](b627646))
* Fixes WebP rendering on iOS 12. ([DylanVann#412](https://github.com/johto-breakroom/react-native-fast-image/issues/412)) ([97630c8](97630c8)), closes [DylanVann#298](https://github.com/johto-breakroom/react-native-fast-image/issues/298) [DylanVann#385](https://github.com/johto-breakroom/react-native-fast-image/issues/385)
* Flow syntax error ([DylanVann#924](https://github.com/johto-breakroom/react-native-fast-image/issues/924)) ([a10ab3f](a10ab3f))
* improve/update build.gradle ([1f04c55](1f04c55))
* lint ([780d41f](780d41f))
* Loading images by reverting "bug: Use device scale when loading images.". ([0326c3e](0326c3e)), closes [DylanVann#509](https://github.com/johto-breakroom/react-native-fast-image/issues/509)
* make corresponding flow file for .cjs file ([77326e8](77326e8)), closes [DylanVann#784](https://github.com/johto-breakroom/react-native-fast-image/issues/784)
* null exception in FastImageViewManager.java ([DylanVann#423](https://github.com/johto-breakroom/react-native-fast-image/issues/423)) ([a7a8643](a7a8643))
* peer dependency warning ([DylanVann#653](https://github.com/johto-breakroom/react-native-fast-image/issues/653)) ([cd81b1b](cd81b1b))
* Replace 'Component' with 'ComponentType' ([DylanVann#647](https://github.com/johto-breakroom/react-native-fast-image/issues/647)) ([6abb273](6abb273))
* tintColor in fallback Image ([DylanVann#882](https://github.com/johto-breakroom/react-native-fast-image/issues/882)) ([fbb6b68](fbb6b68))
* use ColorValue type ([DylanVann#939](https://github.com/johto-breakroom/react-native-fast-image/issues/939)) ([54376d8](54376d8))
* **android:** make center ResizeMode work correctly ([d648ef8](d648ef8))
* **android:** remove explicit use of UI thread ([DylanVann#698](https://github.com/johto-breakroom/react-native-fast-image/issues/698)) ([5d2894e](5d2894e))
* **android:** replace jcenter with mavenCentral ([69c9422](69c9422))
* **android:** update Glide ([86edd7f](86edd7f))
* **ios:** update SDWebImage ([DylanVann#740](https://github.com/johto-breakroom/react-native-fast-image/issues/740)) ([a1eeb75](a1eeb75))
* remove cache property if using fallback ([ba0f238](ba0f238))
* update dv-scripts ([61fab12](61fab12))
* update dv-scripts ([3c6d0f4](3c6d0f4))
* update SDWebImage and SDWebImageWebPCoder ([DylanVann#689](https://github.com/johto-breakroom/react-native-fast-image/issues/689)) ([9646456](9646456))
* Updates SDWebImageWebPCoder. ([DylanVann#628](https://github.com/johto-breakroom/react-native-fast-image/issues/628)) ([325d77f](325d77f))
* Upgrade vendored SDWebImage to v5.0.5. ([5016172](5016172)), closes [DylanVann#489](https://github.com/johto-breakroom/react-native-fast-image/issues/489)
* wrong cache type ([DylanVann#688](https://github.com/johto-breakroom/react-native-fast-image/issues/688)) [skip ci] ([94e2256](94e2256))
* xcode 12 compatibility ([DylanVann#732](https://github.com/johto-breakroom/react-native-fast-image/issues/732)) ([23c3955](23c3955))

### chore

* Update React peerDependency to "^17 || ^18" ([6255fc4](6255fc4))

### Features

* add a dependency with glide-pluin to support APNG ([c0eae3c](c0eae3c))
* add clear image cache from memory and disk ([DylanVann#425](https://github.com/johto-breakroom/react-native-fast-image/issues/425)) ([818ed0c](818ed0c))
* Add cookie support for iOS. ([DylanVann#284](https://github.com/johto-breakroom/react-native-fast-image/issues/284)) ([ae47bff](ae47bff))
* Add tint color support. ([03c50f0](03c50f0)), closes [DylanVann#124](https://github.com/johto-breakroom/react-native-fast-image/issues/124)
* Add tvOS target. ([DylanVann#486](https://github.com/johto-breakroom/react-native-fast-image/issues/486)) ([6805972](6805972))
* apply patch to react native fast image ([fe3bb5f](fe3bb5f))
* converts to TypeScript ([DylanVann#642](https://github.com/johto-breakroom/react-native-fast-image/issues/642)) ([ac11706](ac11706))
* export ResizeMode and Priority types ([DylanVann#678](https://github.com/johto-breakroom/react-native-fast-image/issues/678)) ([e33664f](e33664f))
* support defaultSource on iOS and Android ([DylanVann#921](https://github.com/johto-breakroom/react-native-fast-image/issues/921)) ([ec7c453](ec7c453))
* **ios:** allow for for per-image-request-headers ([DylanVann#691](https://github.com/johto-breakroom/react-native-fast-image/issues/691)) ([4a7cd64](4a7cd64))
* **ios:** cancel image load when unmounted ([DylanVann#787](https://github.com/johto-breakroom/react-native-fast-image/issues/787)) ([f1588be](f1588be))
* Upgrade example apps. ([DylanVann#453](https://github.com/johto-breakroom/react-native-fast-image/issues/453)) ([25f8f0d](25f8f0d))
* Upgrade to React Native 0.60.0 / CocoaPods / Android X. ([DylanVann#513](https://github.com/johto-breakroom/react-native-fast-image/issues/513)) ([5489f9e](5489f9e))
* Upgrade to SDWebImage 5.0. ([DylanVann#454](https://github.com/johto-breakroom/react-native-fast-image/issues/454)) ([8a216e2](8a216e2)), closes [DylanVann#447](https://github.com/johto-breakroom/react-native-fast-image/issues/447)
* Use forwardRef to allow access to ref.measure and others. ([DylanVann#419](https://github.com/johto-breakroom/react-native-fast-image/issues/419)) ([2b4fba3](2b4fba3)), closes [DylanVann#69](https://github.com/johto-breakroom/react-native-fast-image/issues/69)

### Performance Improvements

* Use React.memo for FastImage. ([DylanVann#449](https://github.com/johto-breakroom/react-native-fast-image/issues/449)) ([5c2b4af](5c2b4af))

### Reverts

* Remove functionality for notifying other images on load. ([DylanVann#452](https://github.com/johto-breakroom/react-native-fast-image/issues/452)) ([292223d](292223d))
* Revert "deleted exampleCode" ([26042d4](26042d4))

### BREAKING CHANGES

* This package will no longer support React 16.
* This changes how network requests are handled on iOS. Make sure they still work for you.
* You should upgrade React Native. See https://facebook.github.io/react-native/blog/2019/07/03/version-60
* Upgrade SDWebImage, may affect some projects and CocoaPods users.

Fix the bug of `cacheOnly` behavior
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants