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

Library not found for -lAppAuth #973

Open
vic2tee4u opened this issue May 15, 2024 · 17 comments
Open

Library not found for -lAppAuth #973

vic2tee4u opened this issue May 15, 2024 · 17 comments

Comments

@vic2tee4u
Copy link

Issue

I just recently upgraded my company's React native from 0.68.0 to 0.73.6. When attempting to build, I run into the issue above alongside

Library not found for -lAppAuth
Linker command failed with exit code 1 (use -v to see invocation)

We used to be on react-native-app-auth version 6.4.3 but since the issue started, I moved up to 7.1.3 but to no avail.
We are also using x-code 15. I am on Mac M2 (already using xcodeworkspace). We have bee stuck on this for about three weeks now.


Environment

  • Your Identity Provider: e.g. IdentityServer 4 / Okta / Azure
  • Okta
  • Platform that you're experiencing the issue on: iOS / Android / both
  • iOS
  • Your react-native Version: e.g. 0.72.1
  • 0.73.6
  • Your react-native-app-auth Version: e.g. 7.0.0
  • 7.1.3
  • Are you using Expo?
  • NO

System:
OS: macOS 14.4.1
CPU: (12) x64 Apple M2 Pro
Memory: 11.58 MB / 16.00 GB
Shell:
version: 3.2.57
path: /bin/bash
Binaries:
Node:
version: 20.13.1
path: ~/.nvm/versions/node/v20.13.1/bin/node
Yarn:
version: 1.22.21
path: /opt/homebrew/bin/yarn
npm:
version: 10.5.2
path: ~/.nvm/versions/node/v20.13.1/bin/npm
Watchman:
version: 2024.04.08.00
path: /opt/homebrew/bin/watchman
Managers:
CocoaPods:
version: 1.15.2
path: /usr/local/bin/pod
SDKs:
iOS SDK:
Platforms:
- DriverKit 23.0
- iOS 17.0
- macOS 14.0
- tvOS 17.0
- watchOS 10.0
Android SDK: Not Found
IDEs:
Android Studio: 2023.1 AI-231.9392.1.2311.11330709
Xcode:
version: 15.0.1/15A507
path: /usr/bin/xcodebuild
Languages:
Java:
version: 17.0.10
path: /usr/bin/javac
Ruby:
version: 2.7.4
path: /Users/cs214440/.rbenv/shims/ruby
npmPackages:
"@react-native-community/cli": Not Found
react: Not Found
react-native: Not Found
react-native-macos: Not Found
npmGlobalPackages:
"react-native": Not Found
Android:
hermesEnabled: true
newArchEnabled: false
iOS:
hermesEnabled: true
newArchEnabled: false

@fant0mex
Copy link

Hi @vic2tee4u, I've managed to build an app on iOS using the react native and react-native-app-auth versions you have listed. Assume you've tried the usual rm -rf Pods/ Podfile.lock ; pod install?

@vic2tee4u
Copy link
Author

Yes, I've gone through that. I also noticed that this issue has happened in the past for other folks here but it never seems to have a resolve.

@fant0mex
Copy link

Seems people have had some success with changing the deployment target Would this perhaps be a viable option? Or upgrading to the latest versions of both this lib and react native?

@vic2tee4u
Copy link
Author

vic2tee4u commented May 16, 2024

Because we are already in xcode 15 (Apple mandated this) and the minimum target cannot be below 12.4, that is not a viable option for us.

@fant0mex
Copy link

Any joy with removing $(inherited) from "Library Search Paths" in Project Build Settings?

@vic2tee4u
Copy link
Author

I will give that a try now and see if that helps

@vic2tee4u
Copy link
Author

Just tried but got a failed
Screenshot 2024-05-16 at 7 32 20 AM

@carbonrobot
Copy link
Contributor

Which install method did you use for installing the native dependencies? Ref: https://github.com/FormidableLabs/react-native-app-auth?tab=readme-ov-file#install-native-dependencies

@vic2tee4u
Copy link
Author

I used the first method. Cocoapod.

@carbonrobot
Copy link
Contributor

carbonrobot commented May 16, 2024

Check your pod versions in the ios folder and ensure you have all the native modules installed. An easy way to do this is run pod outdated from the ios folder in terminal/bash/etc. You are looking specifically for AppAuth-iOS pod.

In general, the error for Library not found for {X} is your local React Native project is unable to find the dependency due to either a project misconfiguration and/or dependency/build cache. The RNAA library does not perform that linking for you, so all we can offer is advice.

Usually when you run into this situation its best to first check the dependencies, then check your linker configuration. Finally, perform a clean of the project build and dependency output.

@fant0mex
Copy link

If all else fails, could also try the nuclear approach

@vic2tee4u
Copy link
Author

Let me give the above two options a try and report back.

@vic2tee4u
Copy link
Author

Gave the above two approaches a try and they still yield the same error. pod outdated didn't show AppAuth as outdated.

@fant0mex
Copy link

@vic2tee4u Just wondering if you used the diff generated by https://react-native-community.github.io/upgrade-helper/ to upgrade?

@vic2tee4u
Copy link
Author

Yes I used the helper

@taha200
Copy link

taha200 commented Jul 9, 2024

I am getting this issue?
Any update on this?

@zibs
Copy link
Contributor

zibs commented Jul 24, 2024

I've just tried this a couple of times on the latest RN with both bridgeless enabled and disabled, and it seems to be working, so please provide more information for anyone who is still having an issue.

You can also check in Xcode to see if the AppAuth library is showing in your pods.

Screenshot 2024-07-24 at 8 57 32 AM

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

5 participants