Expo SplashScreen Standalone Build Failed - react-native

I am trying to build my application at Expo but I have the following problem:
Error Expo
When looking at the build error log, I have the following message:
Using manifest: {"ios":{"supportsTablet":true,"userInterfaceStyle":"light"},"web":{"favicon":"./assets/favicon.png"},"icon":"./assets/icon.png","name":"Porta do Sol","slug":"portaDoSol","splash":{"image":"./assets/splash.png","imageUrl":"https://d1wp6m56sqw74a.cloudfront.net/~assets/761e4c800ce1de9fd90da12f45687087","resizeMode":"contain","backgroundColor":"#ffffff"},"android":{"package":"com.interface.portadosol","userInterfaceStyle":"light"},"iconUrl":"https://d1wp6m56sqw74a.cloudfront.net/~assets/5aab62d1ae6a0f65e10f12c0e55d20dd","locales":{},"updates":{"fallbackToCacheTimeout":0},"version":"0.0.1","platforms":["ios","android","web"],"entryPoint":"./index.js","sdkVersion":"38.0.0","orientation":"portrait","dependencies":["#react-native-community/masked-view","#react-navigation/drawer","#react-navigation/native","#react-navigation/stack","expo","expo-splash-screen","expo-sqlite","expo-status-bar","expo-updates","native-base","react","react-dom","react-native","react-native-appearance","react-native-gesture-handler","react-native-reanimated","react-native-safe-area-context","react-native-screens","react-native-svg","react-native-svg-charts","react-native-web","sqlite"],"bundledAssets":["asset_3a2ba31570920eeb9b1d217cabe58315.ttf","asset_8b12b3e16d591abc926165fa8f760e3b.json","asset_744ce60078c17d86006dd0edabcd59a7.ttf","asset_461d9bba8b6a3c91675039df12cfe6ca.json","asset_140c53a7643ea949007aa9a282153849.ttf","asset_94c4ffdcbffeb0570c635d7f8edd8a25.json","asset_ca9ce9ff0676a9b04ef0f8a3ad17dd08.ttf","asset_54a5c98d22f313098b3dbe2d5b2e87ba.json","asset_b49ae8ab2dbccb02c4d11caaacf09eab.ttf","asset_39843e5d52a6c5c42d5abdb0b34bcaa6.json","asset_b06871f281fee6b241d60582ae9369b9.ttf","asset_f1f91feb805137c9283fb766620ec5eb.json","asset_09dd345dbd4ec5a0874841d5749ac153.json","asset_0886a6b127c6057cee83f9c65c7ffd62.json","asset_f6c6f6c8cb7784254ad00056f6fbd74e.ttf","asset_b70cea0339374107969eb53e5b1f603f.ttf","asset_c39278f7abfc798a241551194f55e29f.ttf","asset_e20945d7c929279ef7a6f1db184a4470.ttf","asset_60668d999bbaf663420340f7bdd580d7.json","asset_b2e0fc821c6886fb3940f85a3320003e.ttf","asset_3e6805fbc794680014716b8c752f20b8.json","asset_3c851d60ad5ef3f2fe43ebd263490d78.ttf","asset_1a0e3525dd5df87e77057204129a5e6e.json","asset_a37b0c01c0baf1888ca812cc0508f6e2.ttf","asset_7e078700f0c35367a56c5bbb2047dda7.json","asset_8e7f807ef943bff1f6d3c2c6e0f3769e.ttf","asset_fdc01171a7a7ea76b187afcd162dee7d.json","asset_d2285965fe34b05465047401b8595dd0.ttf","asset_647543ebfccf6e5495434383598453d1.json","asset_5cdf883b18a5651a29a4d1ef276d2457.ttf","asset_74d124a3caeac2bea111f3ca2f2dd34a.json","asset_7d40544b395c5949f4646f5e150fe020.png","asset_cdd04e13d4ec83ff0cd13ec8dabdc341.png","asset_a132ecc4ba5c1517ff83c0fb321bc7fc.png","asset_0ea69b5077e7c4696db85dbcba75b0e1.png","asset_f5b790e2ac193b3d41015edb3551f9b8.png","asset_5223c8d9b0d08b82a5670fb5f71faf78.png","asset_fd0192cf977ddf7b60b4e21e332f6b76.json","asset_15e61754d2d3825004eed075f496ae28.png","asset_778ffc9fe8773a878e9c30a6304784de.png","asset_376d6a4c7f622917c39feb23671ef71d.png","asset_c79c3606a1cf168006ad3979763c7e0c.png","asset_02bc1fa7c0313217bde2d65ccbff40c9.png","asset_35ba0eaec5a4f5ed12ca16fabeae451d.png"],"id":"#matheusms21/portaDoSol","releaseId":"c05eb142-056f-40e6-a330-79bd258d0e14","revisionId":"0.0.1-r.OkgIqpx_B","publishedTime":"2020-10-04T03:29:57.730Z","commitTime":"2020-10-04T03:29:57.793Z","bundleUrl":"https://d1wp6m56sqw74a.cloudfront.net/%40matheusms21%2FportaDoSol%2F0.0.1%2Fecb187f580b4c9bbd9873239fc05375e-38.0.0-android.js","releaseChannel":"default","hostUri":"exp.host/#matheusms21/portaDoSol"}
Error: ENOENT: no such file or directory, open '/app/turtle/workingdir/android/sdk38/android-shell-app/app/src/main/res/drawable/splashscreen.xml'
The strange thing is that yesterday I managed to finish the build, but today I have this error, and I did not make any changes to SplashScreen or anything like that.
Thanks to anyone who can help me.

Now the build finished without the error.
It was probably their mistake that was corrected at this point.
Thank you all :)

Related

Expo: Unable to resolve module index.ts. None of these files exist

I'm trying out this template located here (https://github.com/t3-oss/create-t3-turbo).
After installing the dependencies, I ran "pnpm dev" in the terminal. Expo gives this error
Error: Unable to resolve module ./index.ts from C:\Users\...\apps\expo/.:
None of these files exist:
* index.ts(.native|.android.ts|.native.ts|.ts|.android.tsx|.native.tsx|.tsx|.android.js|.native.js|.js|.android.jsx|.native.jsx|.jsx|.android.json|.native.json|.json|.android.cjs|.native.cjs|.cjs)
* index.ts\index(.native|.android.ts|.native.ts|.ts|.android.tsx|.native.tsx|.tsx|.android.js|.native.js|.js|.android.jsx|.native.jsx|.jsx|.android.json|.native.json|.json|.android.cjs|.native.cjs|.cjs)
at ModuleResolver.resolveDependency (C:\Users\...\node_modules\metro\src\node-haste\DependencyGraph\ModuleResolution.js:153:15)
at DependencyGraph.resolveDependency (C:\Users\...\node_modules\metro\src\node-haste\DependencyGraph.js:276:43)
at C:\Users\...\node_modules\metro\src\lib\transformHelpers.js:171:21
at Server._resolveRelativePath (C:\Users\...\node_modules\metro\src\Server.js:1256:12)
at async Server.requestProcessor [as _processBundleRequest] (C:\Users\...\node_modules\metro\src\Server.js:529:37)
at async Server._processRequest (C:\Users\...\node_modules\metro\src\Server.js:449:9)
index.ts definitely exists in the expo folder. Why is there an error being thrown?
It looks like "main" in the expo folder's package.json is what's throwing this error. I tried changing it to different values, but nothing helped.
Is anyone at least able to confirm they've reproduced the issue? It may be a bug with the template
In case anyone else has this issue, the solution seems to be changing the versions of react and any other libraries that the console suggests.
I was getting a warning for 4 packages that said expo may not work as expected unless these version discrepancies are resolved.
I ignored that because it was my first time with a monorepo, and I thought the versions the template came with would work for everyone. From discussions with others, it seems like it works fine on ios, but not android

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.

Zyre.js in react-native

I am currently trying to work with zyre.js in my project. I tried to npm install zyre.js and it added itself to the node_modules folder in my project. When I tried to run my application after installing this, I got no error. After adding the line const Zyre = require('zyre.js'); I get the following: The development server returned response error code:500 unable to resolve module 'events' from C:\Users\User\Desktop\GitHub...\node_modules\zyre.js\lib\zyre.js ...
I cannot seem to get this to work. Any help would be much appreciated

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

An error was encountered processing the command (domain=NSPOSIXErrorDomain, code=2)

I'm getting such error, while building IOS app in React Native project:
was encountered processing the command (domain=NSPOSIXErrorDomain,
code=2) Print: Entry, ":CFBundleIdentifier", Does Not Exist
I read threads in GitHub regarding that issues, however didn't find solutions there which could solve my problem. Any ideas how to fix it?
The cause might be that you have some build files from the previous build which are causing the problem.
Clear the ios/build/your_project to trigger a fresh build
In my case the Xcode build folder needed to be cleaned. To fix, in Xcode go to Product | Clean Build Folder
In my case, the cause was - The build file name was MyMob.app but the app it tries to install to the simulator was mymob.app.
I solved it by changing the line in mymob.xcscheme:46
BuildableName = "MyMob.app"
BuildableName = "mymob.app"
Log was
iinfo Installing "build/mymob/Build/Products/Debug-iphonesimulator/mymob.app"
An error was encountered processing the command (domain=NSPOSIXErrorDomain, code=2):
Failed to install the requested application
An application bundle was not found at the provided path.
Provide a valid path to the desired application bundle.
info Launching "com.mymob.app"
error Failed to launch the app on simulator, An error was encountered processing the command (domain=FBSOpenApplicationServiceErrorDomain, code=4):
The request to open "com.mymob.app" failed.
Underlying error (domain=FBSOpenApplicationErrorDomain, code=4):
The operation couldn't be completed. Application info provider (FBSApplicationLibrary) returned nil for "com.mymob.app"
Application info provider (FBSApplicationLibrary) returned nil for "com.mymob.app"