I'm trying to compile my expo development (Not expo go) app, it all works for IOS and android in testing but when i try compiling it for production, only the android compiles successfully the IOS build fails at "Run Fastlane".
I've search and tried different online suggestions but nothing seems to work
has anyone else run into this issue? I've been stuck for days
my error
Build failed: Fastlane build failed with unknown error. See logs for the "Run fastlane" and "Xcode Logs" phases for more information.
Fastlane errors in most cases are not printed at the end of the output, so you may not find any useful information in the last lines of output when looking for an error message.
here is my app.json
{
"expo": {
"name": "myapp",
"scheme": "myapp",
"version": "2.0.0",
"orientation": "portrait",
"icon": "iconIOS.png",
"updates": {
"fallbackToCacheTimeout": 0
},
"assetBundlePatterns": [
"**/*"
],
"plugins": [
[
"react-native-fbsdk-next",
{
"appID": "12",
"clientToken": "12",
"displayName": "12",
"scheme": "12"
}
],
"#react-native-firebase/app",
[
"expo-build-properties",
{
"ios": {
"useFrameworks": "static",
"deploymentTarget": "13.0"
}
}
],
"#react-native-firebase/dynamic-links"
],
"ios": {
"supportsTablet": true,
"bundleIdentifier": "myapp.ai.finance",
"buildNumber": "3",
"use_frameworks": "static",
"googleServicesFile": "./GoogleService-Info.plist",
"associatedDomains": [
"applinks:myapp.site"
],
"infoPlist": {
"NSUserTrackingUsageDescription": "This identifier will be used to deliver personalized ads to you.",
"SKAdNetworkItems": [
{
"SKAdNetworkIdentifier": "v9wttpbfk9.skadnetwork"
},
{
"SKAdNetworkIdentifier": "n38lu8286q.skadnetwork"
}
]
}
},
"android": {
"package": "com.myapp.app",
"googleServicesFile": "./google-services.json",
"versionCode": 3,
"adaptiveIcon": {
"foregroundImage": "./src/assets/icons/myapp.png",
"backgroundColor": "#FFFFFF"
},
"intentFilters": [
{
"action": "VIEW",
"autoVerify": true,
"data": [
{
"scheme": "https",
"host": "*.site.site",
"pathPrefix": "/records"
}
],
"category": [
"BROWSABLE",
"DEFAULT"
]
}
],
"permissions": [
"android.permission.INTERNET"
]
},
"resolutions": {
"#expo/config-plugins": "^5.0.2",
"#expo/prebuild-config": "~5.0.3",
"expo-modules-autolinking": "~1.0.0"
},
"extra": {
"eas": {
"projectId": "id"
}
}
}
}
and here is my package.json
{
"name": "myapp",
"version": "1.0.0",
"scripts": {
"start": "expo start --dev-client",
"android": "expo run:android",
"ios": "expo run:ios",
"web": "expo start --web",
"dev": "cross-env NODE_OPTIONS='--openssl-legacy-provider' next dev",
"eas-build-pre-install": "npm config set legacy-peer-deps true"
},
"dependencies": {
"#babel/preset-react": "^7.18.6",
"#babel/preset-typescript": "^7.18.6",
"#burstware/expo-plaid-link": "^1.0.6",
"#expo/config-plugins": "^5.0.4",
"#expo/dev-server": "^0.1.123",
"#expo/metro-config": "^0.5.1",
"#expo/webpack-config": "^0.17.0",
"#react-native-async-storage/async-storage": "~1.17.3",
"#react-native-community/datetimepicker": "6.2.0",
"#react-native-firebase/app": "^17.0.0",
"#react-native-firebase/dynamic-links": "^17.0.0",
"#react-navigation/bottom-tabs": "^6.4.0",
"#react-navigation/core": "^6.4.1",
"#react-navigation/drawer": "^6.5.0",
"#react-navigation/native": "^6.0.14",
"#react-navigation/native-stack": "^6.9.1",
"#react-navigation/stack": "^6.3.2",
"axios": "^1.1.3",
"cross-env": "^7.0.3",
"expo": "~46.0.19",
"expo-apple-authentication": "~4.3.0",
"expo-auth-session": "~3.7.4",
"expo-build-properties": "~0.3.0",
"expo-dev-client": "^2.0.1",
"expo-device": "~4.3.0",
"expo-linear-gradient": "~11.4.0",
"expo-navigation-bar": "~1.3.0",
"expo-notifications": "~0.16.1",
"expo-random": "~12.3.0",
"expo-splash-screen": "~0.16.2",
"expo-status-bar": "~1.4.0",
"expo-web-browser": "~11.0.0",
"intl": "^1.2.5",
"metro-core": "^0.73.3",
"moment": "^2.29.4",
"node": "^19.6.0",
"react": "18.0.0",
"react-content-loader": "^6.2.0",
"react-dom": "18.0.0",
"react-native": "0.69.6",
"react-native-dotenv": "^3.4.7",
"react-native-event-listeners": "^1.0.7",
"react-native-fbsdk-next": "^11.1.0",
"react-native-gesture-handler": "~2.5.0",
"react-native-modal": "^13.0.1",
"react-native-reanimated": "~2.9.1",
"react-native-safe-area-context": "4.3.1",
"react-native-screens": "~3.15.0",
"react-native-select-dropdown": "^3.2.1",
"react-native-svg": "12.3.0",
"react-native-svg-charts": "^5.4.0",
"react-native-svg-transformer": "^1.0.0",
"react-native-swipe-list-view": "^3.2.9",
"react-native-vector-icons": "^9.2.0",
"react-native-web": "~0.18.7",
"react-native-web-webview": "^1.0.2",
"react-native-webview": "11.23.0",
"react-redux": "^8.0.5",
"redux": "^4.2.0",
"redux-thunk": "^2.4.2",
"yarn": "^1.22.19"
},
"devDependencies": {
"#babel/core": "^7.12.9",
"#types/react-native": "~0.69.1",
"metro": "^0.73.3",
"typescript": "^4.6.3",
"webpack": "^5.75.0",
"webpack-cli": "^5.0.0",
"webpack-dev-server": "^4.11.1"
},
"private": true
}
eas.json
{
"build": {
"development": {
"developmentClient": true,
"distribution": "internal",
"android": {
"gradleCommand": ":app:assembleDebug"
},
"ios": {
"buildConfiguration": "Debug",
"image": "latest"
}
},
"preview": {
"distribution": "internal"
},
"production": {}
},
"submit": {
"production": {
"ios": {
"appleId": "me#gmail.com",
"ascAppId": "1234",
"appleTeamId": "4321"
}
}
}
}
Related
In my expo sdk version 47, when I eas build in root directory it shows Execution failed for task ':app:mergeReleaseResources'.
how will i solve?
my app.json folder is
{
"expo": {
"name": "ebibaaha",
"slug": "ebibaaha",
"version": "1.0.0",
"orientation": "portrait",
"icon": "./assets/images/icon.png",
"scheme": "myapp",
"userInterfaceStyle": "automatic",
"splash": {
"image": "./assets/images/splash.png",
"resizeMode": "contain",
"backgroundColor": "#ffffff"
},
"updates": {
"fallbackToCacheTimeout": 0
},
"assetBundlePatterns": [
"**/*"
],
"ios": {
"supportsTablet": true
},
"android": {
"adaptiveIcon": {
"foregroundImage": "./assets/images/adaptive-icon.png",
"backgroundColor": "#ffffff"
},
"package": "com.ebibaaha.app",
"permissions": [
"CAMERA",
"CAMERA_ROLL"
]
},
"web": {
"favicon": "./assets/images/favicon.png"
},
"extra": {
"eas": {
"projectId": "97cd307d-920a-4056-a550-0770aa4afaef"
}
}
}
}
enter image description here
I tried eas build --platform android to build my expo react native app but it show error.
I'm trying to set up a deployment pipeline using CodeCommit, ECR and ECS. My pipeline passes the source and builds the image right, except for deployment phase, where it fails:
The deployment failed because the AppSpec file that specifies the deployment configuration is missing or has an invalid configuration. The input AppSpec file is a not well-formed yaml. The template cannot be parsed.
appspec.yaml is in the output of my build phase (stored inside a zip file in S3)
The following is my code pipeline:
{
"pipeline": {
"name": "dashboardpipeline",
"roleArn": "arn:aws:iam::410208438878:role/service-role/AWSCodePipelineServiceRole-us-east-2-DashBoardPipeline",
"artifactStore": {
"type": "S3",
"location": "codepipeline-us-east-2-276644567431"
},
"stages": [
{
"name": "Source",
"actions": [
{
"name": "Source",
"actionTypeId": {
"category": "Source",
"owner": "AWS",
"provider": "CodeCommit",
"version": "1"
},
"runOrder": 2,
"configuration": {
"BranchName": "master",
"OutputArtifactFormat": "CODE_ZIP",
"PollForSourceChanges": "false",
"RepositoryName": "provisions_dashboard"
},
"outputArtifacts": [
{
"name": "SourceArtifact"
}
],
"inputArtifacts": [],
"region": "us-east-2",
"namespace": "SourceVariables"
},
{
"name": "Image",
"actionTypeId": {
"category": "Source",
"owner": "AWS",
"provider": "ECR",
"version": "1"
},
"runOrder": 2,
"configuration": {
"ImageTag": "latest",
"RepositoryName": "dashboard-web-app"
},
"outputArtifacts": [
{
"name": "MyImage"
}
],
"inputArtifacts": [],
"region": "us-east-2"
}
]
},
{
"name": "Build",
"actions": [
{
"name": "Build",
"actionTypeId": {
"category": "Build",
"owner": "AWS",
"provider": "CodeBuild",
"version": "1"
},
"runOrder": 1,
"configuration": {
"ProjectName": "DashboardApplicationBuild"
},
"outputArtifacts": [
{
"name": "BuildArtifact"
}
],
"inputArtifacts": [
{
"name": "SourceArtifact"
}
],
"region": "us-east-2",
"namespace": "BuildVariables"
}
]
},
{
"name": "Deploy",
"actions": [
{
"name": "Deploy",
"actionTypeId": {
"category": "Deploy",
"owner": "AWS",
"provider": "CodeDeployToECS",
"version": "1"
},
"runOrder": 1,
"configuration": {
"AppSpecTemplateArtifact": "BuildArtifact",
"AppSpecTemplatePath": "appspec.yaml",
"ApplicationName": "dashboarddeploymentapp",
"DeploymentGroupName": "dashboardappdeploygr",
"Image1ArtifactName": "MyImage",
"Image1ContainerName": "IMAGE_URI",
"TaskDefinitionTemplateArtifact": "BuildArtifact",
"TaskDefinitionTemplatePath": "taskdef.json"
},
"outputArtifacts": [],
"inputArtifacts": [
{
"name": "BuildArtifact"
},
{
"name": "MyImage"
}
],
"region": "us-east-2"
}
]
}
],
"version": 18
},
"metadata": {
"pipelineArn": "arn:aws:codepipeline:us-east-2:410208438878:dashboardpipeline",
"created": "2022-03-14T11:52:19.525000-03:00",
"updated": "2022-03-18T11:34:14.217000-03:00"
}
}
I am using google cloud-build as my CI system and Spinnaker as my CD.
I have configured cloud-build to copy my manifest and include it as an artifact.
that's my cloudbuild.yaml:
- name: 'gcr.io/cloud-builders/docker'
args: ['build', '--tag=gcr.io/$PROJECT_ID/gordion-backend:$COMMIT_SHA', '.']
- name: 'gcr.io/cloud-builders/gsutil'
args: ['cp', 'manifests/manifest.yaml', 'gs://$PROJECT_ID-kubernetes-manifests/gordion-backend/']
images: ['gcr.io/$PROJECT_ID/gordion-backend']
artifacts:
objects:
location: 'gs://${_BUCKET_NAME}/$COMMIT_SHA/'
paths: ['manifests/manifest.yaml']
When the build is over, that's the message being broadcast by pub/sub:
{
"id": "ba084f1c-494a-42c0-8499-1b84fbb30551",
"projectId": "gordion-2",
"status": "SUCCESS",
"source": {
"repoSource": {
"projectId": "gordion-2",
"repoName": "github_gordion-beam_gordion-backend",
"branchName": "feature/build-yaml"
}
},
"steps": [
{
"name": "gcr.io/cloud-builders/docker",
"args": [
"build",
"--tag=gcr.io/gordion-2/gordion-backend:936543554ad5fab4017319005413dd38beefda04",
"."
],
"timing": {
"startTime": "2019-10-04T12:03:46.996926010Z",
"endTime": "2019-10-04T12:03:57.357589900Z"
},
"pullTiming": {
"startTime": "2019-10-04T12:03:46.996926010Z",
"endTime": "2019-10-04T12:03:47.056257759Z"
},
"status": "SUCCESS"
},
{
"name": "gcr.io/cloud-builders/gsutil",
"args": [
"cp",
"manifests/manifest.yaml",
"gs://gordion-2-kubernetes-manifests/gordion-backend/"
],
"timing": {
"startTime": "2019-10-04T12:03:57.357662249Z",
"endTime": "2019-10-04T12:04:00.089381056Z"
},
"pullTiming": {
"startTime": "2019-10-04T12:03:57.357662249Z",
"endTime": "2019-10-04T12:03:57.436904050Z"
},
"status": "SUCCESS"
}
],
"results": {
"images": [
{
"name": "gcr.io/gordion-2/gordion-backend:936543554ad5fab4017319005413dd38beefda04",
"digest": "sha256:538771fe1be2abd54f6d092519c131019d64bd1001ba38138c565faa9fe343b6",
"pushTiming": {
"startTime": "2019-10-04T12:04:00.404451498Z",
"endTime": "2019-10-04T12:04:06.089323750Z"
}
}
],
"buildStepImages": [
"sha256:c0525aac022b1a92e97f9c6cf4ede4dd82979a9f014f05b2ec8843012a03aa60",
"sha256:fbd483fa382118462a136f916b17d3197325881b6d966ba82ee3a54f4b550e76"
],
"artifactManifest": "gs://gordion-manifests/gordion-2/936543554ad5fab4017319005413dd38beefda04/artifacts-ba084f1c-494a-42c0-8499-1b84fbb30551.json",
"numArtifacts": "1"
},
"createTime": "2019-10-04T12:03:32.668464866Z",
"startTime": "2019-10-04T12:03:38.343591796Z",
"finishTime": "2019-10-04T12:04:15.243708Z",
"timeout": "600s",
"images": [
"gcr.io/gordion-2/gordion-backend"
],
"artifacts": {
"images": [
"gcr.io/gordion-2/gordion-backend"
],
"objects": {
"location": "gs://gordion-manifests/gordion-2/936543554ad5fab4017319005413dd38beefda04/",
"paths": [
"manifests/manifest.yaml"
],
"timing": {
"startTime": "2019-10-04T12:04:08.060372060Z",
"endTime": "2019-10-04T12:04:12.248879364Z"
}
}
},
"logsBucket": "gs://1039931537996.cloudbuild-logs.googleusercontent.com",
"sourceProvenance": {
"resolvedRepoSource": {
"projectId": "gordion-2",
"repoName": "github_gordion-beam_gordion-backend",
"commitSha": "936543554ad5fab4017319005413dd38beefda04"
}
},
"buildTriggerId": "6b7405e7-c2db-4412-9f1a-186c7f7d5975",
"options": {
"substitutionOption": "ALLOW_LOOSE",
"logging": "LEGACY"
},
"logUrl": "https://console.cloud.google.com/gcr/builds/ba084f1c-494a-42c0-8499-1b84fbb30551?project=1039931537996",
"substitutions": {
"_BUCKET_NAME": "gordion-manifests"
},
"tags": [
"trigger-6b7405e7-c2db-4412-9f1a-186c7f7d5975"
],
"timing": {
"BUILD": {
"startTime": "2019-10-04T12:03:46.996877211Z",
"endTime": "2019-10-04T12:04:00.404416077Z"
},
"FETCHSOURCE": {
"startTime": "2019-10-04T12:03:39.677294695Z",
"endTime": "2019-10-04T12:03:46.930866092Z"
},
"PUSH": {
"startTime": "2019-10-04T12:04:00.404450167Z",
"endTime": "2019-10-04T12:04:14.358324463Z"
}
}
}
I can also see in cloud-build history that it produced 2 artifacts:
docker image
Kubernetes manifest
the manifest is located in this location:
gs://gordion-manifests/a91cb009fa184713b86eb8b532a75dc088a25713/manifest.yaml gs://"gordion-manifests
As the location of the artifact is dynamic (due to folders named after SHA), How do I consume this artifact in expected artifacts in spinnaker?
You can use wildcards in artifact's matcher.
Please refer to documentation - https://www.spinnaker.io/reference/artifacts/in-pipelines/#expected-artifacts for overall description and
https://www.spinnaker.io/reference/artifacts-with-artifactsrewrite/types/gcs-object/#in-a-trigger for GCS artifact details.
For example following matcher should handle your case (I don't have instance to test it properly):
{
"type": "gcs/object",
"name": "gs://gordion-manifests/.*/manifest.yaml"
}
I have completed my first react-native app. Now, I want to do unit testing and get code coverage for the whole application using jest. I have used npm packages like i18n-js, react-native-languages.
splash-test.js:
import React from 'react';
import Splash from '../Src/components/authentication/Splash';
import renderer from 'react-test-renderer';
test('renders correctly',()=>{
const tree = renderer.create(
<Splash />
).toJSON();
expect(tree).toMatchSnapshot();
})
env.js:
jest.mock('react-native-languages', () => ({
RNLanguages: {
language: 'en',
languages: ['en'],
},
}));
package.json:
{
"name": "app-name",
"version": "1.0.4",
"private": true,
"rnpm": {
"assets": [
"Src/assets/fonts/"
]
},
"scripts": {
"start": "node node_modules/react-native/local-cli/cli.js start",
"test": "jest --coverage --coverageDirectory=output/coverage/jest"
},
"dependencies": {
"i18n-js": "^3.1.0",
"react": "16.6.3",
"react-native": "0.57.8",
"react-native-fast-image-zoom-viewer": "^2.3.0",
"react-native-firebase": "^5.1.1",
"react-native-gifted-chat": "^0.7.2",
"react-native-image-crop-picker": "^0.21.3",
"react-native-image-zoom-viewer": "^2.2.25",
"react-native-languages": "^3.0.1",
"react-native-material-dropdown": "^0.11.1",
"react-native-modal": "^7.0.2",
"react-native-permissions": "^1.1.1",
"react-native-progress": "^3.5.0",
"react-native-restart": "0.0.9",
"react-native-spinkit": "^1.1.1",
"react-native-swiper": "^1.5.14",
"react-native-view-toast": "0.0.1",
"react-navigation": "^3.0.8",
"react-redux": "^6.0.0",
"realm": "^2.22.0",
"redux": "^4.0.1",
"redux-thunk": "^2.3.0",
"rn-fetch-blob": "^0.10.15",
"tipsi-stripe": "^7.1.0"
},
"devDependencies": {
"babel-jest": "^23.6.0",
"jest": "^23.6.0",
"jest-junit": "^6.2.1",
"metro-react-native-babel-preset": "^0.51.0",
"react-test-renderer": "^16.6.3"
},
"jest": {
"preset": "react-native",
"transform": {
"^.+\\.(js)$": "<rootDir>/node_modules/react-native/jest/preprocessor.js"
},
"setupFiles": [
"./test/env.js"
],
"coverageReporters": [
"text"
],
"reporters": [
"default",
"jest-junit"
],
"collectCoverageFrom": [
"Src/**/*.{js,jsx}",
"!/node_modules/"
],
"transformIgnorePatterns": [
"node_modules/(?!(react-native|react-native-languages)/)"
]
},
"jest-junit": {
"output": "output/coverage/junit/junit.xml",
"usePathForSuiteName": "true"
}
}
Now, If i give npm test it throws an error as i mentioned in title. Someone tell me how to bypass all the npm modules i have used in the app.
Thanks in advance!
Please check my Package.json cause I am unable to find the fault with this. Non of the previous issues in Stackoverflow could helped me
React Native - __DEV__ is not defined
ReferenceError: Can't find variable: __DEV__enter link description here
{
"name": "mobility1",
"version": "0.0.1",
"private": true,
"scripts": {
"start": "node node_modules/react-native/local-cli/cli.js start",
"mocha": "BABEL_ENV=mocha mocha --require mocha-setup.js --compilers js:babel-core/register --recursive __tests__/mocha",
"mocha:watch": "./mocha.runner.sh",
"test": "jest",
"build:android": "node node_modules/react-native/local-cli/cli.js bundle --entry-file='index.android.js' --bundle-output='./android/app/src/main/assets/index.android.bundle' --dev=false --platform='android' --assets-dest='./android/app/src/main/res/'",
"build:ios": "node node_modules/react-native/local-cli/cli.js bundle --entry-file='index.ios.js' --bundle-output='./ios/ShootstaCue/main.jsbundle' --dev=false --platform='ios' --assets-dest='./ios'"
},
"dependencies": {
"react": "~15.4.0-rc.4",
"react-native": "0.40.0",
"react-native-animatable": "^1.1.0",
"react-native-camera": "^0.6.0",
"react-native-drawer": "^2.3.0",
"react-native-linear-gradient": "^2.0.0",
"react-native-scrollable-tab-view": "^0.7.2",
"react-native-vector-icons": "^4.0.0",
"react-redux": "^5.0.4",
"redux": "^3.6.0",
"redux-logger": "^2.7.4",
"redux-observable": "^0.14.1",
"redux-persist": "^4.1.0",
"redux-thunk": "^2.2.0",
"reselect": "^2.5.4",
"rxjs": "^5.2.0"
},
"devDependencies": {
"babel-jest": "^20.0.3",
"babel-preset-react-native": "^1.9.2",
"chai": "^3.5.0",
"enzyme": "^2.8.2",
"jest": "^20.0.3",
"jest-react-native": "^18.0.0",
"mocha": "^3.4.1",
"react-addons-test-utils": "15.4.2",
"react-test-renderer": "^15.4.2",
"regenerator-runtime": "^0.10.5",
"remote-redux-devtools": "^0.5.7"
},
"jest": {
"haste": {
"defaultPlatform": "ios",
"platforms": [
"ios",
"android"
],
"providesModuleNodeModules": [
"react-native"
]
}
}
}
I had the same issue, changing jest: {....} to
"jest": {
"preset": "react-native"
},