Skip to content

Troubleshooting

Alex H edited this page Oct 23, 2024 · 9 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.

Error running yarn iOS

You may get the following error:

Your computer requires some additional setup before you can build onto physical iOS devices. Learn more: https://expo.fyi/setup-xcode-signing CommandError: No code signing certificates are available to use. error Command failed with exit code 1. info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

You may need to add your developer account and/or setup signing certificates. As suggested in the error, follow the instructions at:

https://yarnpkg.com/en/docs/cli/run

There might be slight differences from those instructions if you've already got an account and simply need to renew your certificate.

Android Related

(on MAC) Error: EMFILE: too many open files, watch at FSEvent.FSWatcher._handle.onchange (node:internal/fs/watchers:207:21)

Will need to install watchman brew install watchman. If this doesn't work, run watchman: watchman.

Execution failed for task ':react-native-async-storage_async-storage:compileDebugJavaWithJavac'.

LCW works optimally with JDK 17, please refer to this issue: https://github.com/react-native-async-storage/async-storage/issues/1057

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