expo / eas-cli

Fastest way to build, submit, and update iOS and Android apps
https://docs.expo.dev/eas/
MIT License
724 stars 77 forks source link

Assets images for splash screen missing on eas build #2260

Closed nfuenmamelt closed 1 month ago

nfuenmamelt commented 4 months ago

Build/Submit details page URL

https://expo.dev/accounts/nfuenmamelt/projects/light-and-spaces/builds/ce22797f-8faa-438b-93b2-65ca785f1c0d

Summary

I'm trying to build my APP but when I run the expo-doctor locally everything goes well, but on eas build it fails.

LOCAL: Screenshot from 2024-03-04 12-24-52

EAS BUILD: Screenshot from 2024-03-04 12-25-16

this last one makes me fail the prebuild on eas-cli

Screenshot from 2024-03-04 12-25-26

I don't what is happening anything change from the las time I build it.

these are my config files.

PACKAGE.JSON

{ "name": "light-and-spaces", "main": "index.js", "scripts": { "android": "react-native run-android", "ios": "react-native run-ios", "web": "expo start --web", "start": "expo start --dev-client", "commit": "cz", "lint": "eslint ./src --ext .js,.jsx,.ts,.tsx --max-warnings=0", "test": "jest", "openapi": "openapi-generator-cli generate" }, "dependencies": { "@craftzdog/react-native-buffer": "^6.0.5", "@expo/config-plugins": "~7.2.2", "@expo/vector-icons": "^13.0.0", "@expo/webpack-config": "^19.0.0", "@react-native-async-storage/async-storage": "1.18.2", "@react-native-community/masked-view": "0.1.10", "@react-native-community/netinfo": "9.3.10", "@react-native-community/slider": "4.4.2", "@react-navigation/native": "^6.1.7", "@react-navigation/stack": "^6.3.17", "@reduxjs/toolkit": "^1.5.0", "@shopify/restyle": "^2.4.2", "@types/react-native-snap-carousel": "^3.8.2", "axios": "^0.21.1", "date-fns": "^2.30.0", "eas-cli": "5.6.0", "expo": "^49.0.0", "expo-application": "~5.3.0", "expo-asset": "~8.10.1", "expo-constants": "~14.4.2", "expo-device": "~5.4.0", "expo-font": "~11.4.0", "expo-linear-gradient": "~12.3.0", "expo-linking": "~5.0.2", "expo-localization": "~14.3.0", "expo-network": "~5.4.0", "expo-splash-screen": "~0.20.5", "expo-status-bar": "~1.6.0", "expo-system-ui": "~2.4.0", "expo-updates": "~0.18.19", "formik": "^2.2.6", "jest": "^29.2.1", "moment-timezone": "^0.5.43", "react": "18.2.0", "react-dom": "18.2.0", "react-native": "0.72.10", "react-native-chart-kit": "^6.12.0", "react-native-gesture-handler": "~2.12.0", "react-native-keyboard-aware-scroll-view": "^0.9.5", "react-native-nfc-manager": "^3.14.8", "react-native-reanimated": "~3.3.0", "react-native-safe-area-context": "4.6.3", "react-native-screens": "~3.22.0", "react-native-shared-element": "0.8.8", "react-native-svg": "13.9.0", "react-native-tab-view": "^3.5.2", "react-native-url-polyfill": "^1.3.0", "react-native-web": "~0.19.6", "react-navigation-shared-element": "^3.1.3", "react-redux": "^8.1.1", "redux": "^4.2.1", "redux-persist": "^6.0.0", "redux-saga": "^1.2.3", "yup": "^1.2.0" }, "devDependencies": { "@babel/core": "^7.20.0", "@commitlint/cli": "^17.6.6", "@commitlint/config-conventional": "^17.6.6", "@openapitools/openapi-generator-cli": "^2.6.0", "@semantic-release/changelog": "^6.0.3", "@testing-library/react-native": "^12.1.2", "@types/jest": "^29.5.2", "@types/react": "~18.2.14", "@types/react-dom": "~18.0.10", "@types/react-redux": "^7.1.25", "@types/react-test-renderer": "^18.0.0", "@typescript-eslint/eslint-plugin": "^5.60.1", "@typescript-eslint/parser": "^5.60.1", "babel-preset-expo": "^9.5.0", "commitizen": "^4.3.0", "cz-conventional-changelog": "^3.3.0", "eslint": "^8.43.0", "eslint-config-airbnb": "^19.0.4", "eslint-config-prettier": "^8.8.0", "eslint-plugin-cypress": "^2.13.3", "eslint-plugin-import": "^2.27.5", "eslint-plugin-json": "^3.1.0", "eslint-plugin-jsx-a11y": "^6.7.1", "eslint-plugin-prettier": "^4.2.1", "eslint-plugin-react": "^7.32.2", "eslint-plugin-react-hooks": "^4.6.0", "eslint-plugin-react-native": "^4.0.0", "eslint-plugin-react-redux": "^4.0.0", "eslint-plugin-redux-saga": "^1.3.2", "husky": "^4.3.5", "jest-expo": "^49.0.0", "jsdom": "^22.1.0", "jsdom-global": "^3.0.2", "lint-staged": "^13.2.3", "prettier": "^2.8.8", "redux-saga-test-plan": "^4.0.6", "semantic-release": "19.0.5", "semantic-release-expo": "^2.2.3", "semantic-release-git-branches": "^1.2.1", "typescript": "^5.1.3" }, "jest": { "globalSetup": "./globalSetup.js", "preset": "jest-expo", "testEnvironment": "jsdom", "collectCoverage": true, "collectCoverageFrom": [ "src//*.{ts,tsx,js,jsx}", "!src/types/*/.ts", "!src/store/.ts", "!src/components/slide-menu/index.tsx", "!src/components/slider/index.tsx", "!src/components/Imageswitcher/index.tsx", "!src/components/cards/favoriteLocations/CardItemAnimated.tsx", "!src/screens/advancedOptions/locationPopUp/index.tsx" ], "coverageThreshold": { "global": { "statements": 75, "branches": 75, "functions": 75, "lines": 75 } }, "setupFiles": [ "./jestSetup.js", "./node_modules/react-native-gesture-handler/jestSetup.js" ], "transformIgnorePatterns": [ "node_modules/(?!(jest-)?@react-native|react-native|expo-localization|react-clone-referenced-element|@react-native-community|expo(nent)?|@expo(nent)?/.|react-navigation|@react-navigation/.|@unimodules/.|unimodules|native-base)" ], "setupFilesAfterEnv": [ "./jest.env.js" ] }, "husky": { "hooks": { "pre-commit": "lint-staged && yarn tsc --noEmit && CI=true yarn test", "prepare-commit-msg": "exec < /dev/tty && git cz --hook || true" } }, "lint-staged": { "src//*.{ts,tsx,js,jsx,json,scss}": [ "prettier --write", "eslint --max-warnings=0" ] }, "expo": { "install": { "exclude": [ "react-native-reanimated" ] } }, "engines": { "node": ">= 14.0.0", "npm": ">= 7.0.0" }, "private": true, "config": { "commitizen": { "path": "./node_modules/cz-conventional-changelog" } }, "version": "2.62.5" }

file app.json:

{ "expo": { "name": "Light & Spaces", "slug": "light-and-spaces", "icon": "src/assets/images/app_icon.png", "scheme": "light-and-spaces", "version": "2.62.5", "sdkVersion": "49.0.0", "orientation": "portrait", "owner": "nfuenmamelt", "userInterfaceStyle": "automatic", "extra": { "eas": { "projectId": "cdf6c94f-af8c-40c3-86fb-e2b63d5ee6c8" } }, "assetBundlePatterns": [ "*/" ], "android": { "versionCode": 490026205, "package": "com.amatiscontrols.lightandspaces", "userInterfaceStyle": "light", "splash": { "ldpi": "src/assets/images/splash_screens/android/LDPI_Splash.png", "mdpi": "src/assets/images/splash_screens/android/MDPI_Splash.png", "hdpi": "src/assets/images/splash_screens/android/HDPI_Splash.png", "xhdpi": "src/assets/images/splash_screens/android/XHDPI_Splash.png", "xxhdpi": "src/assets/images/splash_screens/android/XXHDPI_Splash.png", "xxxhdpi": "src/assets/images/splash_screens/android/XXXHDPI_Splash.png", "resizeMode": "cover" }, "intentFilters": [ { "action": "VIEW", "autoVerify": true, "data": [ { "scheme": "https", "host": "light-and-spaces.amatiscontrols.com", "pathPrefix": "/app" } ], "category": [ "BROWSABLE", "DEFAULT" ] } ], "permissions": [ "android.permission.NFC" ] }, "ios": { "buildNumber": "2.62.5", "bundleIdentifier": "com.amatiscontrols.lightandspaces", "supportsTablet": true, "requireFullScreen": true, "associatedDomains": [ "applinks:light-and-spaces.amatiscontrols.com", "webcredentials:light-and-spaces.amatiscontrols.com", "webcredentials:app.amatiscontrols.com" ], "splash": { "image": "src/assets/images/splash_screens/ios/IOS_Splash.png", "resizeMode": "cover" } }, "hooks": {}, "plugins": [ "expo-localization", [ "react-native-nfc-manager", { "nfcPermission": "Custom permission message personalizado", "selectIdentifiers": [ "A0000002471001", "D2760000850100", "D2760000850101" ], "systemCodes": [ "8008" ], "includeNdefEntitlement": false } ] ], "runtimeVersion": { "policy": "appVersion" }, "updates": { "url": "https://u.expo.dev/72a77d99-310b-450c-9d5e-996d5abd0696" } } }

Managed or bare?

managed

Environment

npx expo-doctor

npx eas-cli build -p ios --profile beta --non-interactive

Error output

No response

Reproducible demo or steps to reproduce from a blank project

I don't have right now a reproducible project but I will try to do it.

Let me know if anyone has some clues for it.

I checked the path for the images, locally these images are loading well.

Thanks a lot.

nfuenmamelt commented 4 months ago

I was using a custom folder like "src/assets/" or "./splash_screen/" and they failed.

I found the issue, I don't know why but we need to put the assets in the default folder "./assets/" and try to get the images in the app.json from that folder.

szdziedzic commented 2 months ago

Good to hear that it works!

szdziedzic commented 2 months ago

If you used ./src/assets/images in your app.json instead of src/assets/images would it still fail?

szdziedzic commented 2 months ago

Can you do eas build:inspect -p ios -s archive -o ./archive and see if src/assets are in the archive? Are they gitignored by any chance?

github-actions[bot] commented 1 month ago

This issue is stale because it has been open for 30 days with no activity. If there is no activity in the next 7 days, the issue will be closed.

github-actions[bot] commented 1 month ago

This issue was closed because it has been inactive for 7 days since being marked as stale. Please open a new issue if you believe you are encountering a related problem.