Skip to content

Troubleshooting

Dmitri Zagidulin edited this page Mar 13, 2024 · 6 revisions

Errors Encountered

Try Clearing Your Cache

  • npm cache clean --force
  • pod cache clean --all
  • yarn cache clean

Troubles with installation?

  • rm -rf node_modules
  • rm -rf package-lock.json

After the cache is cleared, re-setup the LCW app on your command line and try again.

iOS Related

  • If you experience failures running the iOS simulator go into XCode and select Product in the menu bar at the top. Then select build. Once XCode indicates a build failure, click the red circle with an x in it to be shown the error.

Error running npm run prebuild:ios

On latest main (post-React Native/Expo upgrade), when running npm run prebuild:ios, generates error:

✔ Finished prebuild
⚠️  Something went wrong running `pod install` in the `ios` directory.
Command `pod install` failed.
└─ Cause: Invalid `Podfile` file:
[!] Invalid `RNKeychain.podspec` file: undefined method `visionos' for #<Pod::Specification name="RNKeychain">.

This is due to an older install of the cocoapods library. To fix:

Determine which cocoapods lib you have installed, and by what method. Run: gem which cocoapods and brew ls cocoapods

  1. If you have both a gem-installed cocoapods AND a brew-installed, this is bad, you must delete one of those.
  2. If your cocoapods has been installed via gem, upgrade it: gem install cocoapods -v 1.14.3
  3. If your cocoapods has been installed view brew, upgrade it: brew switch cocoapods@1.14.3

Current Known Bug as of Dec 2023 for iOS

An error about the RTC_Folly Pod. To fix this, you'll need to fix the syntax of a function call (as of writing) on line 131 from std::unary_function to std::__unary_function in a file named hash. You'll be able to access this and fix it via the XCode GUI and the steps directly above.

Archived / No Longer Applicable Errors

This project was started with Expo, but had to be ejected because some libraries did not support it. Do not develop using Expo, even if it might still launch. That being said, we are still using unimodules, so feel free to install and use packages from the Expo community.

If you get cryptic errors like the following:

** BUILD FAILED **

The following build commands failed:
	CompileC /Users/jc/Library/Developer/Xcode/DerivedData/eduwallet-cikpfctcsrnvkqflqlievgbjvnfr/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/RealmJS.build/Objects-normal/x86_64/RealmReact.o /Users/jc/gitlab\ github/digitalcredentials/learner-credential-wallet/node_modules/realm/react-native/ios/RealmReact/RealmReact.mm normal x86_64 objective-c++ com.apple.compilers.llvm.clang.1_0.compiler (in target 'RealmJS' from project 'Pods')
(1 failure)

Then check your version of cocoa pods. If it is 1.9.3, try upgrading it to something newer, like 1.11.2_1