While making build Cause: error=13, Permission denied - react-native

Hi am working on expo project while I try to run my project, am facing issue.
`> Task :app:exponentPrebuildStep FAILED
Execution failed for task ':app:exponentPrebuildStep'.
A problem occurred starting process 'command './node_modules/expokit/detach-scripts/run-exp.sh''
`
Cause: error=13, Permission denied
I don't know how to fix it, tried clean, invalidate caches, rebuild but everything is working fine but when I give expo start -c and run my project then am facing this error and I tried expo publish rerun my app but I don't know why this error is coming MacBook.

Related

getting permission denied error when trying to run mix release

I followed this tutorial and created a build with few modifications. After generating a build with dockerfile, when I try to run the release I get permission denied error.
Context:
Trying to generate release with docker file and put tar release back in _build folder so I can upload to server and run
The build was successful and here is code, I tried
Steps to reproduce on sample project:
git clone https://github.com/tanweerdev/build_permission
cd into project
mix deps.get
mix docker.build prod
_build/prod/rel/my_build/bin/my_build start_iex
and you will get permission denied error
BUT if you try with sudo, it works. I dont know why permissions gets changed. Any help why we need sudo? or is it a good solution to change permission after build is generated?

Ejecting to bare expo can't install on iOS simulator

I recently had to switch to the bare workflow from the managed workflow. After running expo eject I tested on android, which suffered from an issue with expo-constants not being available, after installing that it worked just fine. I moved on to installing it on the iOS simulator and got an error trying to install. Been trying to debug it but not having any luck. Logs are below:
success Successfully built the app
info Installing "/Users/***/Library/Developer/Xcode/DerivedData/***-dtoeptcccdubmbcvblrjlzhwexaq/Build/Products/Debug-iphonesimulator/***.app"
An error was encountered processing the command (domain=IXUserPresentableErrorDomain, code=1):
This app could not be installed at this time.
Could not install at this time.
Failed to chmod /Users/***/Library/Developer/CoreSimulator/Devices/8666E576-E2C9-4711-B8EB-2A7720C08B84/data/Bundle/Application/F519E6C9-3AFC-49F4-B0E5-9D40C41F54D6/***.app/*** : No such file or directory
Underlying error (domain=MIInstallerErrorDomain, code=4):
Failed to chmod /Users/pedromcunha/Library/Developer/CoreSimulator/Devices/8666E576-E2C9-4711-B8EB-2A7720C08B84/data/Bundle/Application/F519E6C9-3AFC-49F4-B0E5-9D40C41F54D6/***.app/*** : No such file or directory
info Launching "com.***.***"
error Failed to launch the app on simulator, An error was encountered processing the command (domain=FBSOpenApplicationServiceErrorDomain, code=1):
The request to open "com.***.***" failed.
The request was denied by service delegate (SBMainWorkspace) for reason: NotFound ("Application "com.***.***" is unknown to FrontBoard").
Underlying error (domain=FBSOpenApplicationErrorDomain, code=4):
The operation couldn’t be completed. Application "com.***.***" is unknown to FrontBoard.
Application "com.***.***" is unknown to FrontBoard.
I redacted any sensitive info with ***. It says that the build was successful but after looking into the build itself I don't see any executable. Here's the folder contents of the .app package.
Any help is much appreciated.

why i receive this error (Unable to resolve "expo-av") when trying to run a react-native-gifted-chat project?

This is the error:
Unable to resolve "expo-av" from "node_modules\react-native-gifted-chat\lib\ExpoMessageVideo.js"
Failed building JavaScript bundle.
#Jaime, I had the same issue.
I did the following and the issue is resolved
What did I do?
1.In my computer, opened the command prompt
2.changed the directory to the project directory
3.In the command prompt, ran the following command
expo install expo-av
4.Closed the command prompt
5.Started the project , ran the simulator and could see the app running

native_modules.gradle file is deleting as soon as react-redux is installed

I have created an app in react native for my project. When I copy my projects file in the app folder then run the app it said that in node_module react-redux does not exist then I installed react-redux using npm install react-redux#7.0.3 in my app folder after that when I run run-android command in command prompt for this project it is telling that -
Could not read script 'E:\AppFolder\MyApp\node_modules\#react-native-community\cli-platform-android\native_modules.gradle' as it does not exist. .
After that, I wiped the data of emulator and run run-android, but it is still giving me the same error and app is not installing in the emulator.
Here is the error which command prompt is displaying :
info Building and installing the app on the device (cd android && gradlew.bat app:installDebug)...
Starting a Gradle Daemon, 2 incompatible and 1 stopped Daemons could not be reused, use --status for details
FAILURE: Build failed with an exception.
* Where:
Settings file 'E:\AppFolder\MyApp\android\settings.gradle' line: 4
* What went wrong:
A problem occurred evaluating settings 'TribeBond'.
> Could not read script 'E:\AppFolder\MyApp\node_modules\#react-native-community\cli-platform-android\native_modules.gradle' as it does not exist.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 1m 10s
error Could not install the app on the device, read the error above for details.
Make sure you have an Android emulator running or a device connected and have
set up your Android development environment:
https://facebook.github.io/react-native/docs/getting-started.html
error Command failed: gradlew.bat app:installDebug. Run CLI with --verbose flag for more details.```
Here I follow these steps to solve my problem-
I build a new app and run it using react-native run-android command.
Then I installed all dependencies one by one, which is going to use in the app.
Then run npm install command in the project.
After that, I re-build the app using react-native run-android.
And Tada! the app is re-built without any error.

react-native-maps:processReleaseResources task gradlew build failed

I check already all similar answers from Stack and also I lookup on GitHub Issues but without any luck.
Problem occur when I install react-native-maps plugin, during a build I receive gradlew exception
:react-native-maps:processReleaseResources FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':react-native-maps:processReleaseResources'.
> com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\Program Files (x86)\Android\android-sdk\build-tools\23.0.3\aapt.exe'' finished with non-zero exit value 1
Google Maps API is correctly added into AndroidManifest file.
One additional remark I see also many warnings like
...\node_modules\react-native-maps\android\build\intermediates\exploded-aar\com.google.android.gms\play-services-base\9.8.0\res\drawable\common_google_signin_btn_text_light_focused.xml:14:29-81 : No resource found that matches the given name (at 'drawable' with value '#drawable/common_google_signin_btn_text_light_normal').
However in build.gradle I add dependencies for
compile 'com.google.android.gms:play-services-base:10.0.1'
Any ideas how to resolve a problem?
I had the same error recently and should have paid more attention to the error message. Message clearly states it out. Failure to execute aapt
Short Answer:
Make aapt executable
Slightly Longer Answer:
1) Run cd android && ./gradlew clean && ./gradlew assembleDebug --stacktrace. The output will show the build-tool version where you will locate the right aapt to make executable and the path to it. e.g Cannot run program "/home/user/Android/Sdk/build-tools/25.0.3/aapt" (in directory "/home/user/testproject/node_modules/react-native-maps/lib/android"): error=13, Permission denied
2) Right click on file 'aapt', click on permissions, click the checkbox marked 'Execute'
3) Run ./gradlew clean && ./gradlew assembleDebug again and you should be good to go!!!
Problem solved.
An issue is a to long file path and npm not properly install react-native-maps module (there wasn't all required resource files).
During "compilation"
react-native run-android
gradlew task fails du to missing resources in maps module
I experienced a similar issue with this error response:
:react-native-maps:processReleaseResources FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':react-native-maps:processReleaseResources'.
> com.android.ide.common.process.ProcessException: Failed to execute aapt
The way I was able to resolve this error was by going into folder node_modules/react-native-maps/lib/android and editing the build.gradle file with the corresponding compileSdkVersion, buildToolsVersion, minSdkVersion, and targetSdkVersion from my {root}/android/app level build.gradle versions.
This fix worked in various other newly installed packages which caused an error upon attempting to react-native run-android. Hope this helps!