Detox field CFBundleIdentifier not found inside Info.plist - react-native

Following Expo usage guide for detox and getting error below when running detox test.
Using:
"detox": "^10.0.10",
"detox-expo-helpers": "^0.6.0",
"expo-detox-hook": "^1.0.10"
IPA made with :
xcode v 9.4.1
expo v 31.0.6
Also tried IPAs built with xcode v10 and expo v 32.0.0, same error.
Error:
Error: field CFBundleIdentifier not found inside Info.plist of app binary at /Users/admin/Desktop/expo-test/bin/gogonow.app
at SimulatorDriver.getBundleIdFromBinary (/Users/admin/Desktop/expo-test/node_modules/detox/src/devices/drivers/SimulatorDriver.js:70:13)

Try with in the detox configuration
you should take care of .app path, xcodeproj path, Scheme[The app name] and the info.plist path.
This should work..

Related

React native run-ios fails. ios build fails. Android works. Xcode upgraded to 14 is only change

No code changes on my side. Xcode update happened and now the build fails. Android works just fine. here is the error I get:
** BUILD FAILED **
The following build commands failed:
SwiftEmitModule normal x86_64 Emitting\ module\ for\ Stripe (in target 'Stripe' from project 'Pods')
SwiftCompile normal x86_64 Compiling\ AddPaymentMethodViewController.swift,\ AfterpayPriceBreakdownView.swift,\ Analytic.swift,\ Analytic+Payments.swift,\ APIRequest.swift,\ ApplePayHeaderView.swift,\ Async.swift,\ BackwardsCompatibleColors.swift,\ BillingAddressEditView.swift,\ BottomSheet3DS2ViewController.swift,\ BottomSheetViewController.swift,\ CardDetailsEditView.swift,\ CardScanningView.swift,\ CheckboxButton.swift,\ CheckboxElement.swift,\ ChoosePaymentOptionViewController.swift,\ CircularButton.swift,\ ConfirmButton.swift,\ ContainerView.swift,\ DefaultPaymentMethodStore.swift,\ DimmedView.swift,\ Dropd
package.json:
"#stripe/stripe-react-native": "^0.1.4",
i saw some other folks got this error and it solved for them to update to ios 14.0. i did the same but does not seem to solve my issue. here is my podfile:
platform :ios, '14.0'
xcode version:
Version 14.0.1 (14A400)
Try upgrading stripe to 0.19.0 in package.json, then run "pod update Stripe" in the ios folder.
https://github.com/stripe/stripe-react-native/issues/1183#issuecomment-1299967570

React native link fails with no package found

I'm not sure what exactly is happening but I am unable to run react-native link without errors occuring
CLI Output:
react-native link --verbose
debug Available platforms: iOS, Android
debug Targeted platforms: iOS, Android
debug Getting project config for iOS...
debug Getting project config for Android...
error No package found. Are you sure this is a React Native project?
error Unexpected close tag
Line: 22
Column: 24
Char: >
debug Error: Unexpected close tag
Line: 22
Column: 24
Char: >
at error (/Users/Dellybro/Desktop/App/AppReactNativeApp/node_modules/xmldoc/node_modules/sax/lib/sax.js:666:10)
at strictFail (/Users/Dellybro/Desktop/App/AppReactNativeApp/node_modules/xmldoc/node_modules/sax/lib/sax.js:692:7)
at closeTag (/Users/Dellybro/Desktop/App/AppReactNativeApp/node_modules/xmldoc/node_modules/sax/lib/sax.js:885:9)
at SAXParser.write (/Users/Dellybro/Desktop/App/AppReactNativeApp/node_modules/xmldoc/node_modules/sax/lib/sax.js:1447:13)
at new XmlDocument (/Users/Dellybro/Desktop/App/AppReactNativeApp/node_modules/xmldoc/lib/xmldoc.js:199:15)
at readManifest (/Users/Dellybro/Desktop/App/AppReactNativeApp/node_modules/#react-native-community/cli/build/tools/android/readManifest.js:44:10)
at Object.projectConfig (/Users/Dellybro/Desktop/App/AppReactNativeApp/node_modules/#react-native-community/cli/build/tools/android/index.js:66:46)
at Object.keys.forEach.platform (/Users/Dellybro/Desktop/App/AppReactNativeApp/node_modules/#react-native-community/cli/build/commands/link/getProjectConfig.js:25:62)
at Array.forEach (<anonymous>)
at getProjectConfig (/Users/Dellybro/Desktop/App/AppReactNativeApp/node_modules/#react-native-community/cli/build/commands/link/getProjectConfig.js:22:35)
This randomly started happening after attempting to npm install react-native-firebase.
What I've tried
clear-caches
remove node_modules and npm install
Checking out my code back to a previous commit
Adding my package name to the manifest locaed in /android/app/src/debug/AndroidManifest.xml
Removing the app from my computer and cloning it from github
Running react-native link on another project, which works, but i just can't run react-native link on this specific project.
So the answer to my question was that in my android manifest xml file, there was an incorrect closing brace for one of my intent filters.
So for anyone that this happens to ensure that all of your Android files have correct syntax.
I fixed this problem by closing some unclosed tag in android/app/src/main/androidManifest.xml. Try checking the file line by line.

upgrade to RN 0.56 got error: No resource found that matches the given name 'android:TextAppearance.Material.Widget.Button.Borderless.Colored'

After upgrade to react-native 0.56(using react-native-git-upgrade ,and update babel-preset-react-native to 5.0.2),
react-native run-ios works fine and app run OK.
But when run react-native run-android, error occur:
/Users/shouhuasun/dev/stage/upgrade-test/mobile-upgrade-test/node_modules/react-native-wechat/android/build/intermediates/res/merged/release/values-v24/values-v24.xml:3: AAPT: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.Button.Borderless.Colored'.
Other names not found such as:'TextAppearance.Material.Widget.Button.Colored,android:keyboardNavigationCluster',etc.
Other libs like react-native-fetch-blob also got the error.
What's the error?
Thanks!
I got the solution(thanks for Reynald Liandra on facebook React-Native Community Q&A):
The react-native-wechat(same other third libs) android module needs to be compiled using sdk 26 after update to rn v0.56.
Open node_modules/react-native-wechat/android/build.gradle ,
change compileSdkVersion to 26, and buildToolsVersion to 26.0.3
Then run react-native run-android and got the correct result.
If there are several third libs , it is noisy to change several build.gradle files.
And if update any libs version (or yarn add new libs),the node_moudle is refreshed and all changes in build.gradle will lost.
you can force gradle use specified sdk version by this(without modify build.gradle in node_modules anymore):
gradle force build tools version on third party libraries
Make sure your npm version is above 8.0

expo error installing or running app

when I try to run my app on the iOS simulator I get the error :
Error running xcrun simctl openurl booted exp://localhost:19000: An error was encountered processing the command (domain=NSPOSIXErrorDomain, code=60):
The operation couldn’t be completed. Operation timed out
Operation timed out
Error installing or running app. Error: Process exited with non-zero code: 60
any idea how to solve this error ?
This usually is an error with the Simulator. If you remove expo (delete the app) from the simulator and run the command again, it should build fine.
However, if it still fails, Erasing all content and settings on the simulator does the trick too.
FOUNT IT!
you must have a .watchmanconfig file (like below)
File example
When you initialize a project with expo init "projectname", there is no .watchmanconfig file.
So, create one and in this file, just initialize an empty object like this : {}
Then you can start with expo start or yarn/npm start
It solved all my problem.
Hope it does for you too.
For anyone like me also searching this issue, it is possible to un-eject your app and run again like normal. From the docs, Delete the ios and android directories from your project. Delete the isDetached and detach keys from your project's app.json. You can now use your project like a normal Expo project (with no ExpoKit). Read more at https://docs.expo.io/versions/latest/expokit/advanced-expokit-topics/
It may be an issue with some outdated simulators in your simulator cache. On MacOS remove the sub-directories in the following directory:
~/Library/Developer/CoreSimulator/Caches/
check if you have .watchmanconfig file present in root, if not create one .watchmanconfig and initialize empty object and run command npm start again

Unable to run react-native tutorial due to TransformError with .babelrc

I am unable to get react-native run-ios to work on the basic Hello World application that Facebook ships here.
The error that appears every single time is:
TransformError: ENOENT: no such file or directory, open <path>/.babelrc
When I open .babelrc, all it says is:
{
"presets": ["react-native"]
}
Googling this error shows the following pages:
https://github.com/facebook/react-native/issues/7906 (I tried ./node_modules/react-native/packager/packager.sh start --reset-cache, no effect)
https://github.com/facebook/react-native/issues/7666
(I do not understand the cause and resolution of this error per this thread)
https://github.com/erikras/react-redux-universal-hot-example/issues/1266
(This does not seem to be related to my issue)
https://github.com/goatslacker/alt/issues/558
(I attempted to remove .babelrc but it had no effect)
My version is:
$ react-native --version
react-native-cli: 2.0.1
react-native: 0.42.3
I am running OSX 10.12.2, XC 8.3
Can anyone explain the cause, and propose a resolution? Thanks!
I had a packager running in another window from an old project that I needed to kill. Once I did that, it started working again.