Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

react-native run-android: daemon startup failed #24733

Closed
deFries opened this issue May 7, 2019 · 34 comments
Closed

react-native run-android: daemon startup failed #24733

deFries opened this issue May 7, 2019 · 34 comments
Labels
Platform: Android Android applications. Ran Commands One of our bots successfully processed a command. Resolution: Locked This issue was locked by the bot.

Comments

@deFries
Copy link

deFries commented May 7, 2019

Hello,

running windows 10
react-native-cli: 2.0.1
react-native 0.59.5

I have been fighting the last couple of days with an issue that I can not put my finger on where to start.

Doing the "react-native run-android" i get the following:

C:\Git\react-native\rn_test_setup>react-native run-android
info Starting JS server...
info Building and installing the app on the device (cd android && gradlew.bat app:installDebug)...
Starting a Gradle Daemon, 1 incompatible and 2 stopped Daemons could not be reused, use --status for details

Task :app:mergeDebugResources FAILED

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':app:mergeDebugResources'.

java.util.concurrent.ExecutionException: com.android.builder.internal.aapt.v2.Aapt2InternalException: AAPT2 aapt2-3.3.2-5309881-windows Daemon #0: Daemon startup failed
This should not happen under normal circumstances, please file an issue if it does.

  • 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 15s
9 actionable tasks: 1 executed, 8 up-to-date
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.

I guess it has something to do with the "daemon start fail". When i try and do "adb devices" the adb.exe appear for a very short time in my taskbar, then shut down again - the "adc kill-server" and "adb start-server" does the same. Running as admin in a command prompt does the same. However, if i run it in a powershell, adb server starts up and i can see the list of devices and emulators - react native can still not deploy on them.

I feel like I am overlooking something.....anyone got an idea?

br
de Fries

@react-native-bot
Copy link
Collaborator

Can you run react-native info and edit your issue to include these results under the Environment section?

If you believe this information is irrelevant to the reported issue, you may write `[skip envinfo]` alongside an explanation in your Environment: section.

@deFries
Copy link
Author

deFries commented May 7, 2019

When I run the react-native info, i get the following:

C:\Git\react-native\rn_test_setup>react-native info
info
React Native Environment Info:
System:
OS: Windows 10
CPU: (8) x64 Intel(R) Core(TM) i7-8550U CPU @ 1.80GHz
Memory: 25.74 GB / 31.83 GB
Binaries:
npm: 6.9.0 - C:\Program Files\nodejs\npm.CMD
IDEs:
Android Studio: Version 3.4.0.0 AI-183.5429.30.34.5452501

@react-native-bot react-native-bot added the Platform: Android Android applications. label May 7, 2019
@react-native-bot
Copy link
Collaborator

We are automatically closing this issue because it does not appear to follow any of the provided issue templates.

👉 Click here if you want to report a reproducible bug or regression in React Native.

@react-native-bot react-native-bot added Ran Commands One of our bots successfully processed a command. Resolution: No Template labels May 7, 2019
@boliveira
Copy link

Hi,

That's a problem with gradle plugin version 3.3 that doesn't handle resources that are large. It has been resolved in gradle plugin version 3.4 but the release build is not including the js code in the assets folder. Investigating...

@rawalhimal
Copy link

i have a same problem that he mentioned above and please sat idea to resolve that type of problem iam new in react-native

@likobe-mobonda-jeandenis

Hello I am facing a problem for several days and you need your help yes you please help me loll

BUILD FAILED in 12s

error Failed to install the app. Make sure you have the Android development environment set up: https://facebook.github.io/react-native/docs/getting-started.html#android-development-environment. Run CLI with --verbose
flag for more details.
Error: Command failed: gradlew.bat app:installDebug -PreactNativeDevServerPort=8081

FAILURE: Build failed with an exception.

  • Where:
    Script 'C:\Users\likobetshieba\Desktop\react\loginapp\node_modules@react-native-community\cli-platform-android\native_modules.gradle' line: 195

  • What went wrong:
    A problem occurred evaluating settings 'loginapp'.

Unable to determine the current character, it is not a string, number, array, or object

The current character read is 'E' with an int value of 69
Unable to determine the current character, it is not a string, number, array, or object
line number 1
index number 0
Error: EPERM: operation not permitted, scandir 'C:/Users/likobetshieba/Desktop/react/loginapp/android/app/build/intermediates/signing_config/debug/out/signing-config.json' at Object.readdirSync (fs.js:795:3) at GlobSync._readdir (C:\Users\likobetshieba\Desktop\react\loginapp\node_modules\glob\sync.js:288:41) at GlobSync._readdirInGlobStar (C:\Users\likobetshieba\Desktop\react\loginapp\node_modules\glob\sync.js:267:20)
at GlobSync._readdir (C:\Users\likobetshieba\Desktop\react\loginapp\node_modules\glob\sync.js:276:17) at GlobSync._processReaddir (C:\Users\likobetshieba\Desktop\react\loginapp\node_modules\glob\sync.js:137:22) at GlobSync._process (C:\Users\likobetshieba\Desktop\react\loginapp\node_modules\glob\sync.js:132:10) at GlobSync._processGlobStar (C:\Users\likobetshieba\Desktop\react\loginapp\node_modules\glob\sync.js:380:10) at GlobSync._process (C:\Users\likobetshieba\Desktop\react\loginapp\node_modules\glob\sync.js:130:10) at GlobSync._processGlobStar (C:\Users\likobetshieba\Desktop\react\loginapp\node_modules\glob\sync.js:383:10) at GlobSync._process (C:\Users\likobetshieba\Desktop\react\loginapp\node_modules\glob\sync.js:130:10)
^

  • 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 12s

at checkExecSyncError (child_process.js:623:11)
at execFileSync (child_process.js:641:15)
at runOnAllDevices (C:\Users\likobetshieba\Desktop\react\loginapp\node_modules\@react-native-community\cli-platform-android\build\commands\runAndroid\runOnAllDevices.js:75:39)
at buildAndRun (C:\Users\likobetshieba\Desktop\react\loginapp\node_modules\@react-native-community\cli-platform-android\build\commands\runAndroid\index.js:137:41)
at C:\Users\likobetshieba\Desktop\react\loginapp\node_modules\@react-native-community\cli-platform-android\build\commands\runAndroid\index.js:103:12
at processTicksAndRejections (internal/process/task_queues.js:85:5)
at async Command.handleAction (C:\Users\likobetshieba\Desktop\react\loginapp\node_modules\react-native\node_modules\@react-native-community\cli\build\cliEntry.js:160:7)

@boliveira
Copy link

@likobe-mobonda-jeandenis , try running the command in a CMD with administrator privileges (run as administrator).

@likobe-mobonda-jeandenis

I tried but I find the same error

@Mavenic
Copy link

Mavenic commented Jul 21, 2019

Same error

@AmitHBhagat
Copy link

AmitHBhagat commented Jul 28, 2019

I am also getting the same issue like @likobe-mobonda-jeandenis, below is my system info:

System:
OS: Windows 10
CPU: (8) x64 Intel(R) Core(TM) i5-8250U CPU @ 1.60GHz
Memory: 1.76 GB / 7.92 GB
Binaries:
Node: 10.16.0 - C:\Program Files\nodejs\node.EXE
npm: 6.9.0 - C:\Program Files\nodejs\npm.CMD
IDEs:
Android Studio: Version 3.4.0.0 AI-183.6156.11.34.5692245
React Native:
Current version: 0.60.4

Please help!

@ashrut05
Copy link

ashrut05 commented Aug 2, 2019

I had the same error as @likobe-mobonda-jeandenis
Deleting app\build\intermediates\signing_config\debug\out\signing-config.json
worked for me.

@dionisio28
Copy link

I had the same error as @likobe-mobonda-jeandenis
Deleting app\build\intermediates\signing_config\debug\out\signing-config.json
worked for me.

Thank you it worked for me

@nisiybr
Copy link

nisiybr commented Aug 15, 2019

I had the same error as @likobe-mobonda-jeandenis
Deleting app\build\intermediates\signing_config\debug\out\signing-config.json
worked for me.

It worked for me too.
Tks a Lot!

@ashish2309
Copy link

I had the same error as @likobe-mobonda-jeandenis
Deleting app\build\intermediates\signing_config\debug\out\signing-config.json
worked for me.

Didn't work for me :(

@mmtmn
Copy link

mmtmn commented Aug 19, 2019

hm, hi. I'm new to React-Native.

I ran in into the same problem, what worked for me was deleting:

app\build\intermediates\signing_config

as in the folder app\build\intermediates\signing_config\debug\out there was no "\signing-config.json"

ANYWAY, DOES ANYONE KNOW WHY THAT WORKS? WHY DOES THIS SOLVE THE PROBLEM?

Will deleting this folder cause my project any troubles? WHy does my app go blank when I turn on Debug JS Remotly?

@mmtmn
Copy link

mmtmn commented Aug 19, 2019

Ok, so weirdest thing happen: The folder came back to its original place after a few "react-native run-android" commands and the build failled.

This time the folder DID have the file "\signing-config.json" in the folder "app\build\intermediates\signing_config\debug\out".

And the folder I deleted a few minutes ago is still in the trash bin. Weird to say the least.

Anyways, I deleted the file and all went well. Thank you for this thread. Also, I'd love for anyone to respond some of the questions I asked in the comment before, thank you!

@ndutagrace25
Copy link

I had the same error as @likobe-mobonda-jeandenis
Deleting app\build\intermediates\signing_config\debug\out\signing-config.json
worked for me.

Didn't work for me :(

delete the whole app/build folder.... it worked for me

@dolby360
Copy link

I had the same error as @likobe-mobonda-jeandenis
Deleting app\build\intermediates\signing_config\debug\out\signing-config.json
worked for me.

Thanks

@romenkova
Copy link

romenkova commented Sep 14, 2019

In my case there is no signing-config.json in out dir, it was empty so I just deleted build (app\build) folder and It solved the problem.
react-native run-android creates a build folder that works.

@Grohden
Copy link

Grohden commented Sep 19, 2019

I think I know what might have caused this problem for me.

I reinstalled my windows OS, but I keept my project files from my old windows system in a separated partition. Before reinstalling the system everything was working, but after that I got these permission issues. I also could not change the file permission (signing-config.json) through windows UI.

So I think that this problem is related to something about old windows permissions being keept on these files (not sure why only those tho).
Btw, my solution was also delete the app/build folder since it is just entirely generated with the correct permissions.

@carresed
Copy link

delete the all folder worked for me
\app\build\intermediates\signing_config
@mmtmn thanks!

@rohitiglas
Copy link

Check the .APK file in your release/Debug folder .Remove it and clean the build.

@waqaramjad
Copy link

I had the same error as @likobe-mobonda-jeandenis
Deleting app\build\intermediates\signing_config\debug\out\signing-config.json
worked for me.

i don't have that file , i have a fresh project

@waqaramjad
Copy link

In my case there is no signing-config.json in out dir, it was empty so I just deleted build (app\build) folder and It solved the problem.
react-native run-android creates a build folder that works.

i don't have build folder

@MarlonX19
Copy link

I dont have the app\build... folders either!

I just cant get any new project to run since last night due to that error. All of my older projects run properly, the new ones don't! I seriously have no idea what to do, I've tried all the suggestions I have found and none worked.

@AliHasnainRizvi
Copy link

@waqaramjad @MarlonX19 I had the same problem, apparently updating node worked for me!

@ducsilva
Copy link

ducsilva commented Nov 7, 2019

I had the same error as @likobe-mobonda-jeandenis
Deleting app\build\intermediates\signing_config\debug\out\signing-config.json
worked for me.

I could not find the file app\build\intermediates\signing_config\debug\out\signing-config.json?
Can you help me?

image

@ducsilva
Copy link

ducsilva commented Nov 7, 2019

Check the .APK file in your release/Debug folder .Remove it and clean the build.

How to check the .APK? Can you help me check it?

@R4tch3t
Copy link

R4tch3t commented Nov 8, 2019

I had the same error as @likobe-mobonda-jeandenis
Deleting app\build\intermediates\signing_config\debug\out\signing-config.json
worked for me.

Great works me too, remove build folder

@rohitiglas
Copy link

rohitiglas commented Nov 14, 2019 via email

@MarlonX19
Copy link

@waqaramjad @MarlonX19 I had the same problem, apparently updating node worked for me!

what worked for me was downgrading the node version from 12.x.x back to 10.x.x

@R4tch3t
Copy link

R4tch3t commented Nov 30, 2019

What issue you are facing?

Issue after install something library for React-native

@mufaddalhamidofficial
Copy link

hm, hi. I'm new to React-Native.

I ran in into the same problem, what worked for me was deleting:

app\build\intermediates\signing_config

as in the folder app\build\intermediates\signing_config\debug\out there was no "\signing-config.json"

ANYWAY, DOES ANYONE KNOW WHY THAT WORKS? WHY DOES THIS SOLVE THE PROBLEM?

Will deleting this folder cause my project any troubles? WHy does my app go blank when I turn on Debug JS Remotly?

@mmtmn Thanx.

@stembrino
Copy link

stembrino commented Jan 5, 2020

If you dont want delete the file android\app\build\intermediates\signing_config\debug\out\signing-config.json.
You should change the permisions of this file.

  1. Open this local of this file with VSCode: right-click in the file and click in reveal in explore.
  2. Open propeties
  3. Click in the tab security
  4. Button Advanced
  5. Button Add
  6. Link Select a principal
  7. Button Advanced
  8. Button Find Now
  9. **Now you have to find your user in the list
  10. Click Ok and Ok again
  11. **Select Full control in the check box and then click OK
  12. Now try open this file in Vscode, if this opened the permisions have changed
  13. Now try run your app again

@facebook facebook locked as resolved and limited conversation to collaborators May 7, 2020
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label May 7, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Platform: Android Android applications. Ran Commands One of our bots successfully processed a command. Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

No branches or pull requests