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

Carthage update is failing #902

Closed
MacMeDan opened this issue Oct 11, 2017 · 28 comments
Closed

Carthage update is failing #902

MacMeDan opened this issue Oct 11, 2017 · 28 comments

Comments

@MacMeDan
Copy link

Versions:

  • Running Xcode 9.0
  • Material 2.11.2

I am using Carthage as my package manager and within the last two days I have not been able to get the project to build because of this error
dyld: Library not loaded: @rpath/Motion.framework/Motion Referenced from: /Users/macmedan/Library/Developer/CoreSimulator/Devices/43F98839-6A55-4C7F-917A-196EB7585DDC/data/Containers/Bundle/Application/4EF67EC1-9605-4AB7-9E5C-B0ECC9846C7D/Shipper Dev.app/Frameworks/Material.framework/Material Reason: image not found

I have also noticed that this gets executed now when I do a carthage update
A shell task (/usr/bin/env git clone --quiet git@github.com:CosmicMind/Motion.git

I am using material version 2.11.2 and 2.11.0 gave me the same issue.

Any guidance would be greatly appreciated.

@daniel-jonathan
Copy link
Member

Hey @MacMeDan :)

Yes, I would be happy to help. Basically, now Motion is a submodule for Material. This is why it is making the clone call. This is a good issue, as it will help many people down the road. I am going to install now using Carthage and will get back to you in a moment.

@MacMeDan
Copy link
Author

So I may have made some progress on it but it throws a new issue.
If you first run carthage update The module should get checked out and then run carthage build to get it to install. I did not have trouble the first time and now the app will build but and subsequent times you do it this error is thrown.

Build Failed Task failed with exit code 65: /usr/bin/xcrun xcodebuild -project /Users/macmedan/Swift/straightline/Shipper/Carthage/Checkouts/Material/Material.xcodeproj -scheme Material -configuration Release -derivedDataPath /Users/macmedan/Library/Caches/org.carthage.CarthageKit/DerivedData/9.0_9A235/Material/2.11.2 -sdk iphoneos ONLY_ACTIVE_ARCH=NO BITCODE_GENERATION_MODE=bitcode CODE_SIGNING_REQUIRED=NO CODE_SIGN_IDENTITY= CARTHAGE=YES archive -archivePath ./ GCC_INSTRUMENT_PROGRAM_FLOW_ARCS=NO CLANG_ENABLE_CODE_COVERAGE=NO (launched in /Users/macmedan/Swift/straightline/Shipper/Carthage/Checkouts/Material)

is Bitcode enabled on the motion module by change?

Hope that helps. Let me know if there is more I can do. Also I would assume that if motion is a dependency that it would show up under the Material project's Checkout files in the Carthage Folder. At least that is what I see on other projects that have dependencies. I don't know how you enable that but it may be a place to look. 🤘🏼

Also I did have to update Carthage itself to version 27 recently.

@daniel-jonathan
Copy link
Member

Are you running this carthage update --use-submodules ?

@MacMeDan
Copy link
Author

No, I am not. Should I be?

@daniel-jonathan
Copy link
Member

Give that a try.

@MacMeDan
Copy link
Author

Ahh I see where I may have missed that. You need to use https://www.cosmicmind.com/danieldahan/lesson/6
Not
https://github.com/CosmicMind/Samples/wiki/Installation
The second link is found if you go to the samples Project and follow the installation link.

@daniel-jonathan
Copy link
Member

Ah yes, I am in the process of updating all the samples / repos / etc... Did it work with that flag being set?

@MacMeDan
Copy link
Author

MacMeDan commented Oct 11, 2017

No I got this

A shell task (/usr/bin/env git submodule --quiet update --init --recursive (launched in /Users/macmedan/Swift/straightline/Shipper/Carthage/Checkouts/Material)) failed with exit code 1:
Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
fatal: clone of 'git@github.com:CosmicMind/Motion.git' into submodule path '/Users/macmedan/Swift/straightline/Shipper/Carthage/Checkouts/Material/Sources/Frameworks/Motion' failed
Failed to clone 'Sources/Frameworks/Motion'. Retry scheduled
Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
fatal: clone of 'git@github.com:CosmicMind/Motion.git' into submodule path '/Users/macmedan/Swift/straightline/Shipper/Carthage/Checkouts/Material/Sources/Frameworks/Motion' failed
Failed to clone 'Sources/Frameworks/Motion' a second time, aborting

@daniel-jonathan
Copy link
Member

Okay, I need to change it to https. One sec, I will make a change for that

@daniel-jonathan
Copy link
Member

Can you try this version Material 2.11.3 please :)

@MacMeDan
Copy link
Author

It looks like we are good. Thank you for your help.

To anyone reading this thread to solve the same problem you will need to delete your
Cartfile.resolvedfolder and your Carthage folder. Then run
carthage update --platform iOS --use-submodules in your terminal.

@MacMeDan
Copy link
Author

MacMeDan commented Oct 11, 2017

I lied I am back to this error.
dyld: Library not loaded: @rpath/Motion.framework/Motion Referenced from: /Users/macmedan/Library/Developer/CoreSimulator/Devices/43F98839-6A55-4C7F-917A-196EB7585DDC/data/Containers/Bundle/Application/04B49666-5B10-4CB7-B174-30AE1E45F447/Shipper Dev.app/Frameworks/Material.framework/Material Reason: image not found

@MacMeDan
Copy link
Author

ahh, it seems this may be the problem.

From Carthage project README

Note: At this time --cache-builds is incompatible with --use-submodules. Using both will result in working copy and committed changes to your submodule dependency not being correctly rebuilt. See #1785 for details.

@MacMeDan
Copy link
Author

Now I get this
A shell task (/usr/bin/env git submodule --quiet init -- Carthage/Checkouts/Material (launched in /Users/macmedan/Swift/straightline/Shipper)) failed with exit code 128: fatal: No url found for submodule path 'Carthage/Checkouts/Material/Sources/Frameworks/Motion' in .gitmodules

@daniel-jonathan
Copy link
Member

Are you including the Motion framework ?

@daniel-jonathan
Copy link
Member

Sorry that was for a previous comment. I’ll be back at my computer momentarily.

@MacMeDan
Copy link
Author

No, not implicitly. Which I was wondering about. So do I need to add it to my Cartfile b/c I did not see it as a built framework in the Carthage Folder.

@daniel-jonathan
Copy link
Member

Here is the .gitmodules file

submodule "Sources/Frameworks/Motion"]
        path = Sources/Frameworks/Motion
        url = https://github.com/CosmicMind/Motion.git

Can you try this --use-submodules --no-build ?

@daniel-jonathan
Copy link
Member

I don't personally use Carthage and never have, so I am a bit green on this. @mohpor maybe you know how to do this?

@MacMeDan
Copy link
Author

Well my question is the Material framework actually dependent on the Motion framework. I thought they were separate.

@daniel-jonathan
Copy link
Member

100%. Motion is the animation and transition arm in Material. As we add more animation based components, it will be pulling more from Motion. I separated them as Motion could be used without Material. Prior to this, Material copied the files over, and that was causing a maintenance issue. At the end of the day, I am happy that there are package managers out there, and I am sure this is not the first time this issue has come up, so there must be an easy solution for this. I will try and add Material and Motion to a new project tonight.

@MacMeDan
Copy link
Author

Awesome Let me know how it goes. I tried adding motion just like Material but it said the url was unresolved.

github "CosmicMind/Motion"

@daniel-jonathan
Copy link
Member

So I believe the issue was that I was missing a Cartfile that had the Motion dependency. So I added that in Material 2.11.4. Please read the installation guide if needed. Thank you for bringing this to our attention and if there continues to be an issue, please reopen this.

@MacMeDan
Copy link
Author

MacMeDan commented Oct 13, 2017

Awesome Thank You. 🎉

It looks like it is working. Users will need to delete their Carthage.resolved and Carthage folder and then run carthage update.

@wflores96
Copy link

I'm experiencing a similar issue on Material 2.12.13. I tried deleting Cartfile.resolved and Carthage and using carthage update --platform iOS --no-use-binaries. I can see in the terminal that it is building Motion, however, I still get the same error as the original post.

@daniel-jonathan
Copy link
Member

@wflores96 Is this your first update to having Motion separate? Are you adding both Motion and Material to your project?

@wflores96
Copy link

@DanielDahan adding Motion framework fixed it! thank you

@mobdim
Copy link

mobdim commented Dec 11, 2017

Add $(SRCROOT)/Carthage/Build/iOS/Motion.framework in "Input Files" section of "Run Script Phase" /usr/local/bin/carthage copy-frameworks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

4 participants