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
Cycle in dependencies between targets 'LottieLibraryIOS' and 'LottieReactNative' #385
Comments
@p-grzelczak I'm having the same issue, did you manage to fix yours? |
Weird thing is that is works perfectly in the simulator ...
|
@Darwin-Ming I've said I followed installation instructions to the letter and you have pointed me to same installation instructions, what's the point? @nicksmetBagaar This is being weird. Seems like it's connected with another issue ( facebook/react-native#20774 ) - doing a fix with a postinstall step seemed to help in my case, however my buddy working on same repository still has this issue : / |
sorry, I missed that step. it works to me. Xcode 10. |
Just reporting that we are experiencing the same issue; using the linked post-install script (to install third party dependencies) does not fix it our case. As others have reported, despite the |
this should be fixed on 2.5.9 |
I'm trying to add react-native-lottie (version 2.5.9) and running into a very similar issue -
react-native version - 0.57.2 The build does seem to work ok, other than the error making noise in the console. |
I can confirm @robwalkerco error after upgrading react-native-lottie to 2.5.9. Though my build failed, the app would not launch and give this error:
Running react-native: 0.55.3. |
The only way I've managed to work around this issue so far, is by using the XCode Legacy build preference. |
Hi guys, doing a bit of research, the fix for this one is a bit tricky because of the way the new build system works. After you include |
Target 'RCTBlob' has target dependency on Target 'Lottie_iOS' due to target order in a “Target Dependencies” build phase or the scheme That is the issue I am having, and none of the above mentioned solutions work. Like with the others, the build fails but the app still runs in the simulator. |
Hi @1pocketaces1, Could you please share the steps you followed? I've just created the steps mentioned above (and in the tutorial) and did not get any dependency added to RCTBlob. The only place I've found where the dependency is specified in in the actual app, which it has to because you link the framework. My steps to create the new project were: react-native init lotest
cd lotest
yarn add lottie-react-native
react-native link lottie-ios
react-native link lottie-react-native
open ios/lotest.xcodeproj And in XCode, tap on the project, general tab, add lottie as an embedded framework and go into the linked frameworks and remove the faded lottie.framework (as that one is a mistake, I think). |
I tried switching around the target orders and putting Headers before Compile Sources as recommended by the debugger, and still had no success. I am getting the above error even though I don't see any target dependencies for RCTBlob or any of the libraries that are included in the dependency loop. Temp fixed by using Legacy Build, but would love to see a fix for production. I will keep trying to find one when I have time |
@rodrigoelp yes I removed the faded binary, and I do not have any dependencies listed for RCTBlob or any other RCT libs, which is why this error is so puzzling. |
And I am using RN 0.56, lottie-ios 2.5.0 and lottie-RN 2.5.9 |
@1pocketaces1 may I ask how did you setup the project? Are you using There is a sample project I've created here. It is configured to compile ts into js... but you should be able to easily change the index.js to register your component solving the issue. Another point you need to be aware is, there is a problem with react native and xcode 10, super annoying that will give you a compilation error while is building the obj library. Unfortunately, the only real workaround to this is to run |
@rodrigoelp the last paragraph of your post is where my issue is, the issue with XCode 10 building the libraries. For some reason it runs into a dependency loop, and thinks all of the RCT libraries have dependencies even though there are none in the project. I have not yet tried in release mode. As to your question, I have been developing this project for a few months, I started with RN 0.54 and I am using yarn for package management. As for linking the libraries I used react-native link ... and then double check them all manually to make sure they're correct. |
Hi @1pocketaces1, unfortunately this is an issue an open issue in react native. That race condition I mentioned before is affecting react native development and facebook has not paid attention to it yet as they haven't moved their tools to xcode 10. XCode is trying to build libraries in parallel, then it understands these libraries depend between each other and tries to build them (again) clashing with the previous version. If you move RN to frameworks you do not have this issue... but that isn't the way react native works :\ I know it is frustrating, some people has submitted pull requests to get this fix but it has not been merged yet. I do suggest you to move to RN 0.57.4 as fb has introduce lots of breaking changes. Not a quick fix but it goes more in-line with the general direction the libraries are moving. |
@rodrigoelp thanks for the info. I have kept use of a minimal amount of third party libraries so hopefully the change won't be too difficult aside from the react-native core changes, and will keep an eye on this issue |
same issue Any solution yet? |
Ok, I'm reopening this as more people are being affected by this build issue. |
I also catalogued this here: #440 For those affected by this, at least in my experience, cleaning your build cache (cmd + shift + option + k) effectively "resets" the issue. It's not a fix, but it will ensure that you can continue development. |
In mi case
|
What's going on ? This is very annoying, someone has a real fix out there ? |
I have the same issue and every time i want to run on simulator and remove the
and after that it's takes at least 5 minutes to complete the steps everytime!!! very boring .... |
@hemedani same here |
@VincenzoCarlino 's suggestion fixed the issue for me |
This solution #385 (comment) doesn't seem apply to xcode 10.2.1. Maybe I'm missing something? Embedded frameworks and libraries are separate in the Build Phases tab. |
@cspicuzza re #385 (comment) -- I just "fixed" this on my system by clearing the metro cache. I"m on macos. # After some exploring, I found the metro cache directory with this command
ls $TMPDIR | grep metro
metro-cache
# removed it
rm -rf $TMPDIR/metro-cache
# this then worked
react-native run-ios |
It's a Xcode problem. |
it's not a fix. it's a temporary workaround. |
Enabling "Parallelize Build" in your scheme's build settings should help resolve the issue without having to clean the build folder each time |
@syntheticencounters I've tried that and was able to develop locally. In return it caused my TestFlight builds to crash. |
* Mobile: Remove RN 0.57.5 patch * Mobile: Upgrade to RN 0.58.6 and React 16.6.3 * Mobile: Upgrade to RNN 2.13.0 * Mobile/iOS: Link JavaScriptCore and switch to new build system * Bump realm to 2.26.1 * Mobile: Update RN patch * Mobile/iOS: Fix Lottie build order See lottie-react-native/lottie-react-native#385 * Revert "Bump realm to 2.26.1" This reverts commit 16e69cd. * Mobile: Update to 0.59.10 * Mobile: Remove patches that are no longer needed * Mobile: Revert unrelated dependency updates These dependencies can be upgraded in a separate PR * Mobile/Android: Use Gradle 'bin' version instead of 'all' 'all' includes documentation and other things that will bloat the download size * Mobile: Bump react-native-navigation * Mobile/Android: Use intl version of new JSC * Mobile/Android: Use RNN config for 0.57.5+ * Mobile: Fix failing tests * Mobile: Ensure react-native-navigation does not use vulnerable lodash * Mobile: Finish RN upgrade * Mobile: Fix react-native-modal-translucent bug See listenzz/react-native-modal-translucent#26 * Mobile: Update react-native-svg and victory-native * Mobile: Fix bugs introduced in RN 0.59 upgrade (#2087) * Mobile: Fix topbar padding * Mobile: Fix statusbar style regression * Mobile: Fix linting errors * Mobile: Fix prop types * Mobile: Fix page transition animation regression
You can use https://github.com/taboulot/rn-game-over for a relatively fast workaround (faster than removing node_modules).
And whenever you got the cycle dependencies issue with lottie, do:
It will clean your XCode builds and be able to launch the app again. |
Hey guys, it's throwing me this on LottieiOS: Using on React-Native 0.60.4.
What is wrong here? |
@msqar did you follow the install instruction for RN 0.60+? That doesn’t look right IIRC. |
@adteague yes, im not using cocoapods.
Versions:
|
@adteague There seems to be an issue on 3.0.3 that is going to be solved on 3.0.6 but hasn't been released yet. I'd like to know how to solve it for now, though. Any ideas? |
I was able to solve the error above by removing the extra reference within the Lottie.xcodeproj. But now, i get a different error: "No such module Lottie" on react-native-lottie files. |
This solved my issue |
Yes, works awesome for me now :) thanks everybody. |
Clear xCode cache on each build solved this problem for me (command + shift + K) |
This always work, clear previous build |
Description
Getting this on
react-native run-ios
:Interestingly - the app builds and runs fine, lottie animations work fine - but the build is failed and obviously I'd like to avoid it.
I've followed installation steps to the letter (both automatic and manual), tried unlinking, removing, adding everything back again. Cleaning build folder doesn't help. Only first application build succeeds, if I'd run
react-native run-ios
again - I get the BUILD FAILED. Need to remove and readd lottie back again. Passing --reset-cache flag doesn't change anything.Versions
react-native: 0.57.0
lottie-react-native: 2.5.8
lottie-ios: 2.5.0
xcode: 10 (new build system)
The text was updated successfully, but these errors were encountered: