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

ld: framework not found Instabug #106

Closed
andrei-sadagurschi opened this issue Jan 9, 2017 · 31 comments
Closed

ld: framework not found Instabug #106

andrei-sadagurschi opened this issue Jan 9, 2017 · 31 comments

Comments

@andrei-sadagurschi
Copy link

After updating to Instabug 6.3.1 (from 6.0.2) I am getting a build error:

ld: framework not found Instabug
clang: error: linker command failed with exit code 1 (use -v to see invocation)

I've updated the Instabug framework through pod update.
I've already tried to completely reinstall all the pods from the project.
The cocoapods version that I am using is 1.1.1.
Any help is much appreciated.

@Figo0o
Copy link
Contributor

Figo0o commented Jan 9, 2017

Hey @andrei-sadagurschi, let me check that and get back to you.

@mcocaro
Copy link

mcocaro commented Jan 9, 2017

same here

@Figo0o
Copy link
Contributor

Figo0o commented Jan 9, 2017

@andrei-sadagurschi, can you share with us a screenshot of 'Framework Search Paths' from your project directory ?

@andrei-sadagurschi
Copy link
Author

andrei-sadagurschi commented Jan 9, 2017

screen shot 2017-01-09 at 10 04 24 pm
Here it is. I hid part of the path for security reasons. Thank you!
CC @Figo0o

@Figo0o
Copy link
Contributor

Figo0o commented Jan 9, 2017

I've tried to reproduce this issue with the same scenario (updating from 6.0.3 to 6.3.1) but I failed, every thing works correctly. I believe its Cocoapods issue.

try to remove Cocoapods and re-install it again
try to remove instabug from Podfile and do a pod install then add instabug again then do a pod install again. Hopping this solves the problem.

cc @andrei-sadagurschi

@andrei-sadagurschi
Copy link
Author

@Figo0o, I've already tried that. It doesn't fix the issue. Any other suggestions?

@andrei-sadagurschi
Copy link
Author

It seems to be something related to the new framework added to the pod. That framework doesn't seem to get linked to the main project. The bundle folder (which is added in a similar way) gets linked properly.

@Figo0o
Copy link
Contributor

Figo0o commented Jan 10, 2017

@andrei-sadagurschi, Could you verify that the framework binary actually exists locally on your machine? You can do that by navigating to the Pods directory in Finder, then selecting Instabug > Instabug.framework and checking that the Instabug binary is there.

@andrei-sadagurschi
Copy link
Author

@Figo0o, the binary is there.

@Figo0o
Copy link
Contributor

Figo0o commented Jan 10, 2017

@andrei-sadagurschi, Okay, Then what happened when removing Instabug from podfile, is this issue fixed or still remains with other frameworks?

@Figo0o
Copy link
Contributor

Figo0o commented Jan 10, 2017

@mcocaro any updates ?

@andrei-sadagurschi
Copy link
Author

@Figo0o, I've removed the pod and manually installed the library (instructions from here: https://instabug.com/developers). Now the build succeeded, but the library is not loaded:

dyld: Library not loaded: @rpath/Instabug.framework/Instabug
Referenced from: /Users/myuser/Library/Developer/CoreSimulator/Devices/73CBA6CC-158D-467B-8549-C6F431CF4BFC/data/Containers/Bundle/Application/48189CA1-7F84-4E84-B279-DC03EEF69713/AppName.app/AppName
Reason: image not found

@Figo0o
Copy link
Contributor

Figo0o commented Jan 10, 2017

@andrei-sadagurschi, Please make sure that Instabug.framework found in your project's "Embedded Binaries" section under the "General" tab. This should solves the problem.

@andrei-sadagurschi
Copy link
Author

@Figo0o, this solves the manual installation. The cocoapods installation is still broken from my point of view.

@mcocaro
Copy link

mcocaro commented Jan 10, 2017

I've had this issue since a few weeks now, I managed to resolve it but pulling the Pod from the Git repo directly as opposed to the CocoaPods version. Yesterday I decided to revert back to the CocoaPods version, did a pod install and the same error popped up again. It seems that version 6.2.1 has the problem, I can see that there is a Typechange for the framework when I do the pod install of that version. Then I removed the pod from the Podfile, did a pod install - added it again and the problem disappeared.

As far as I was able to see, this issue appears when CocoaPods removes the Instabug framework from the install-frameworks script.

typechange: Pods/Instabug/Instabug.framework/Instabug

@Figo0o
Copy link
Contributor

Figo0o commented Jan 10, 2017

@andrei-sadagurschi, Thats good for now, I am still digging deeper into that to figure out what causes this issue. and will get back as soon as possible.

hopping thats not blocking you.

@HeshamMegid
Copy link
Contributor

HeshamMegid commented Jan 10, 2017

@mcocaro out of curiosity, do you commit your Pods directory to your repo?

We've run into similar issues when the Pod directory is in the repo while using a Git client that doesn't play well with typechange (like SourceTree).

@mcocaro
Copy link

mcocaro commented Jan 10, 2017 via email

@andrei-sadagurschi
Copy link
Author

You are right. The Pods directory is committed to the repo and I am using SourceTree.

@HeshamMegid
Copy link
Contributor

@andrei-sadagurschi would you please try what @mcocaro suggested and let us know if that solves the issue for you?

Then I removed the pod from the Podfile, did a pod install - added it again and the problem disappeared.

@andrei-sadagurschi
Copy link
Author

@HeshamMegid, I've already tried that. It does not fix the problem. I've also tried removing the whole Pods directory and installing them again.

@HeshamMegid
Copy link
Contributor

@andrei-sadagurschi this is most likely a Cocoapods issue. Is it okay for you to use the framework without Cocoapods for now while we look more into this, or that would be an issue?

@andrei-sadagurschi
Copy link
Author

@HeshamMegid, I've already switched to manual installation for now. Please let me know if you find a fix for the Cocoapods install. Thank you!

@saiday
Copy link

saiday commented Feb 17, 2017

Any updates?
Integrate Instabug 7.0.2 on CocoaPods have the same issue, 6.1.3 have no problem.

@andrei-sadagurschi
Copy link
Author

@saiday The problem seems to be fixed when using cocoapods 1.2.0 and Instabug 7.0.2. I think we can close this one. Thank you!

@HeshamMegid
Copy link
Contributor

Actually, we've done no changes from our side regrading this, so it's the CocoaPods update that did the trick.

Thanks for reporting that @andrei-sadagurschi!

@saiday
Copy link

saiday commented Feb 18, 2017

Hi, @HeshamMegid @andrei-sadagurschi

Tried CocoaPods 1.2.0, still have no luck with Instabug 7.0.2.
Clean installed cocoapods gem, clean installed Pods with cocoapods 1.2.0, got same error on app launched.

dyld: Library not loaded: @rpath/Instabug.framework/Instabug
  Referenced from: /var/containers/Bundle/Application/51325C5A-F190-4BFB-B63A-8C4DC6F40AA8/myapp.app/myapp
  Reason: image not found

@saiday
Copy link

saiday commented Feb 20, 2017

Hi, Instabug versions >= 6.2 (< 6.2 works fine) had dyld: Library not loaded: @rpath/Instabug.framework/Instabug issue.

Noticed that https://github.com/Instabug/Instabug-iOS/blob/master/Instabug.podspec changes (sources_files, preserve_paths, frameworks, vendored_frameworks, resource) on 6.2 release, is this a possible cause?

@HeshamMegid
Copy link
Contributor

@saiday version >= 6.2 has switched to distributing the SDK as a dynamic framework instead of a static one.

So far we have found that the solution that works in most cases is removing Instabug from your podfile, doing a pod install, adding Instabug again, and finally doing another pod install. Have you tried that?

@saiday
Copy link

saiday commented Feb 20, 2017

@HeshamMegid I tried, it doesn't fix.

My cocoapods version is 1.2.0

@bvanderdrift
Copy link

This issue popped up as the only issue on top of my Google search when searching for Unable to install vendored xcframework 'Instabug' for Pod 'instabug-reactnative', because it contains both static and dynamic frameworks which happened after pod install after my build process had given me a framework not found Instabug.

The solution for me was to upgrade the instabug-reactnative npm package from 10.8.1 from 10.4.0. Hopefully this helps someone else running into the same issue and landing here.

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

No branches or pull requests

6 participants