React-native-fast-image: IOS invariant violation: requireNativeComponent FastImageView was not found in the UI manager

Created on 1 Aug 2018  ·  27Comments  ·  Source: DylanVann/react-native-fast-image

how can I fix this error??????

Most helpful comment

Make sure you run pod install and re-build your entire project.

All 27 comments

You will have to properly link the native library.

Follow this guide: https://github.com/DylanVann/react-native-fast-image#usage

If for some reason react-native link react-native-fast-image is not working for you, I recommend checking https://github.com/DylanVann/react-native-fast-image/blob/master/docs/installation-manual.md or https://github.com/DylanVann/react-native-fast-image/blob/master/docs/installation-cocoapods.md (if you are using cocoapods)

I had the same issue after I install and link the library.
I realised that I forgot to rebuild the project. Maybe is the same case for you.

react-native run-ios

I have the same problem. Rebuilt, tried manual linking and Cocoapods. Always with the same result: invariant violation:

Error: Invariant Violation: requireNativeComponent: "FastImageView" was not found in the UIManager.

I have this problem as well.

Make sure you run pod install and re-build your entire project.

I'm getting this error too on iOS.

I've followed all the instructions, I think. But when I went to try and link the libFastImage.a library manually in Xcode, I could not find it anywhere.

libFastImage.a is listed under the FastImage.xcodeproj/Products/ "folder" in Xcode, but it's coloured red (i.e. missing). It's actual path is somewhere under a /DerivedData temporary folder, so is this library built on the fly by some step that I've either missed or has not worked?

Update: FIxed!
So I dragged the libFastImage.a entry to the Build Phases->Copy Bundle Resources list in Xcode and it worked! It doesn't seem to matter that it's not actually, physically present when being dragged over. It must get created later in he process, I guess.

I'm facing the same issue, building the project with xcode yield the following error:
Screen Shot 2019-04-11 at 2 14 53 AM

steps I did to install the lib.

  • npm install
  • react-native link
  • cd ios; pod install
  • add xcode project to libraries and added libFastImage.a to build phases.

Stille not working for me @a-eid . I cant find libFastImage.a Do you have any ideas?

I have tried react-native link react-native-fast-image which set pod 'react-native-fast-image', :path => '../node_modules/react-native-fast-image' in my Podfile and it doesn't work for some reason.
then i follow the manual link way which works as https://github.com/DylanVann/react-native-fast-image/blob/master/docs/installation-manual.md#ios shows.

In Xcode:

  • Add FastImage.xcodeproj to Libraries.
  • Add libFastImage.a to Link Binary With Libraries under Build Phases.

I am working on Xcode 10.2.1 and while adding FastImage.xcodeproj to Libraries I am getting a Xcode Crash every time.

@amit2908 I'm running into the same issue - did you find a solution?

@jmoraes7 Sorry but I am not using this package anymore.

https://facebook.github.io/react-native/blog/2019/07/03/version-60#native-modules-are-now-autolinked

  • You need to be running React Native 0.60.0 or higher.
  • You can run pod install within the ios folder after installing this package.
  • You should open ios/ProjectName.xcworkspace instead of ios/ProjectName.xcodeproj. (assuming you aren't using react-native run-ios)

You will have to properly link the native library.

Follow this guide: https://github.com/DylanVann/react-native-fast-image#usage

If for some reason react-native link react-native-fast-image is not working for you, I recommend checking https://github.com/DylanVann/react-native-fast-image/blob/master/docs/installation-manual.md or https://github.com/DylanVann/react-native-fast-image/blob/master/docs/installation-cocoapods.md (if you are using cocoapods)

There's no mention in the readme you need to link the library. So it's very unclear how to use this library.

Just realized how old this issue is 🤦‍♂ .

Linking isn't even a thing anymore since React Native 0.60.0 does autolinking.

The newest version of React Native Fast Image only supports React Native 0.60.0 and higher.

https://github.com/DylanVann/react-native-fast-image/releases/tag/v7.0.0

The problem still exists in the newest version("react-native-fast-image": "^7.0.2") with "react-native": "0.60.4" on my computer.

@ghyzx i'm also having the same issues, any fix?

@akinolu52
In my case, it was ‘installing libwebp failed’ lead the problem.
The problem was disappeared after installing libwebp success.

@ghyzx I am seeing the same issue on 0.60.4 and 7.0.2 did you link the package manually or use the autolinker?

@ghyzx I am seeing the same issue on 0.60.4 and 7.0.2 did you link the package manually or use the autolinker?

0.60.0 , had to do it manually also

I'm also using RN 0.60.4 with the latest version of react-native-fast-image 7.0.2

The autolinking seems to work to an extent, as the terminal output shows the following

[...]
Installing RNFastImage (7.0.2)
Installing SDWebImage (5.1.0)
Installing SDWebImageWebPCoder (0.2.3)
Installing libwebp (1.0.3)
[...]

But to actually get this working and avoid the red screen with "FastImageView was not found in the UI manager", I had to add the following line to my Podfile.

pod 'RNFastImage', :path => '../node_modules/react-native-fast-image'

@DylanVann
In my view this should either be part of the usage instructions or be configured somehow so that the autolinking modifies the podfile as well.

ps: trying to manually link the xcodeproj makes my Xcode crash immediately, but this is not necessay with the fix above.

Thanks for your hard work mate, this is an incredibly nice plugin!

534 <-- this solved it for me, running "pod repo update" and then "pod install"

In case you are using React Native Navigation, you have to do it manually.

do

import com.dylanvann.fastimage.FastImageViewPackage; // <-- Add this

public class MainApplication extends NavigationApplication {

    @Override
    protected ReactGateway createReactGateway() {
        ReactNativeHost host = new NavigationReactNativeHost(this, isDebug(), createAdditionalReactPackages()) {
            @Override
            protected String getJSMainModuleName() {
                return "index";
            }
        };
        return new ReactGateway(this, isDebug(), host);
    }

    protected List<ReactPackage> getPackages() {
        // Add additional packages you require here
        // No need to add RnnPackage and MainReactPackage
        return Arrays.<ReactPackage>asList(
            new FastImageViewPackage() // <-- Add this
        );
    }

Make sure you run pod install and re-build your entire project.

it is just me or not. I feel all react native should say if pod install is required or not

if you in china, see that article: https://www.jianshu.com/p/9e3eec3d8fe0

Was this page helpful?
0 / 5 - 0 ratings