react-native run-android randomly not able to delete or create folder - react-native

I am running on Windows 10:
Permission to the folder is Everyone & Full Access.
Cmd line is set to Administrator.
--version react-native-cli: 2.0.1
--version react-native: 0.47.2
* What went wrong:
Execution failed for task ':#myApp/react-native-spinkit:mergeReleaseResources'.
> java.io.IOException: Could not delete path 'C:\Users\My\Desktop\App\node_modules\#myApp
\react-native-spinkit\android\build\intermediates\res\merged\release\drawable-xhdpi-v4'.
For example, I will get the error above. Sometimes it says could not delete some intermediate path, sometimes, it says it could not create them.
It is not a fixed error output, intermediate folders that got into trouble is different every time. When I repeat React-native run-android on the good days 2-3 times, it will compile successfully. On the bad days I will repeat the cmd 10-15 times, then it suddenly works.
By the way, I use android/gradlew clean command to make sure it does the cleaning, too.
One thing I noticed is that every time it fails the compile percentage % gets a bit further. Until the end if I see 100% then it will work.
The same code compiles in one go with Mac, android physical or virtual machine, same thing on Mac is very stable. This problem only happens with my Windows setup. Anyone experiencing the same thing as me? Is there anything I can do to fix this issue?

You can try this: Error:Execution failed for task ':app:processDebugResources'. > java.io.IOException: Could not delete folder "" in android studio
Deleting the /build folder did it for me.
I guess some of the files in the target build directory is open in another tool you use. Just a file handle open in the folder which has to be cleaned. The build task 'clean' wants to delete all the files in the build directory(normally 'target') and when it fails, the build fails.

This worked for me:
cd ./android && ./gradlew app:assembleDebug && ./gradlew installDebug

Related

Can't start Framework Qwik project

I have an issue while creating and starting project. I followed the instructions given here https://qwik.builder.io/docs/getting-started/ and used npm, selected Basic App (QwikCity), but when I start the project I'm given the next error:
Error
Terminal output:
[vite] Internal server error: Failed to load url /src/root_component_vgnegdacmce.js (resolved id: C:/Users/JESUS LOPEZ/Documents/Universidad/Pasantías/qwik-app/src/root_component_vgnegdacmce.js). Does the filnt_vgnegdacmce.js). Does the file exist?
File: /C:/Users/JESUS%20LOPEZ/Documents/Universidad/Pasant%C3%ADas/qwik-app/node_modules/vite/dist/node/chunks/dep-5e7f419b.js:39304:21
at loadAndTransform (file:///C:/Users/JESUS%20LOPEZ/Documents/Universidad/Pasant%C3%ADas/qwik-app/node_modules/vite/dist/node/chunks/dep-5e7f419b.js:39304:21)
I'm using Windows 10 and node 18.12.0, I tried with yarn and happened the same. I'm just testing this framework because I was required to create a component library, so I wanted to test the waters with a basic app project and then move on with the component library but even if I select this option, I have a similar error.
This is my repo: https://github.com/luisamlopez/qwik-app but it's literally just a brand new qwik project (npm create qwik#latest) so I haven't touch anything.
Your code works fine without any problems. Maybe some node modules or other dependencies would have not been installed properly because of firewall or network issues.
Clean the node_modules manually delete the folder or by the following command
rm -r node_modules/
npm prune
Note: prune command is optional.
Install the package dependencies by
npm i
Make sure the installation happens successfully without any issues or try to install with a different network or turn off the firewall for a while. Or worst case try with different machines.

Singularity: failed to resolve session directory

I wrote a Singularity container that works just fine on my computer. However, when a colleague of mine tries to run it, he gets the error output
FATAL: container creation failed: failed to resolve session directory /usr/local/var/singularity/mnt/session: lstat /usr/local/var: no such file or directory
In the past, he could run containers I build. In fact, he used being able to run a container with the same recipe. The change was that the version of Singularity on the machine I use to build it was upgraded.
I entered the error in a search engine, and I only found a single hit, https://forum.image.sc/t/improving-cluster-supercomputer-performance-tesla-v100-volta-16-32gb-gpu/37459/8, in which this is not resolved.
Does anybody know a way to fix this? Or what the source of the problem is? Or a workaround, preferably one that does not require me to downgrade Singularity? (The machine on which I build it is shared between several users, that's why I don't want to do that.)
Okay, this was somewhat trivial to solve, we just had the colleague create the required folder,
mkdir -p /usr/local/var/singularity/mnt/{container,final,overlay,session}

PhpStorm doesn't see any android devices

Now command npx react-native run-android work in Windows command line, but when I try call it in PhpStorm Terminal:
"adb" ­Ґ пў«пҐвбп ў­гв७­Ґ© Ё«Ё ў­Ґи­Ґ©
Є®¬ ­¤®©, ЁбЇ®«­пҐ¬®© Їа®Ја ¬¬®© Ё«Ё Ї ЄҐв­л¬ д ©«®¬.
info Launching emulator...
info Installing the app...
error Failed to launch emulator. Reason: No emulators found as an output of `emulator -list-avds`.
warn Please launch an emulator manually or connect a device. Otherwise app may fail to launch.
Before I reinstalled Windows, it worked fine. I don't understand what I forgot to configure. Where could be the problem?
I just reinstall IDE and problem went away.
Probably it's too late but it may still help others.
"adb" ­Ґ пў«пҐвбп ў­гв७­Ґ© Ё«Ё ў­Ґи­Ґ©
Є®¬ ­¤®©, ЁбЇ®«­пҐ¬®© Їа®Ја ¬¬®© Ё«Ё Ї ЄҐв­л¬ д ©«®¬.
Is actually a Russian equivalent of
'adb' is not recognized as an internal or external command, operable program or batch file
affected by some encoding issues.
It means that you need to add the path to your adb file to the System PATH variable and then restart the IDE.
adb should be located in the platform-tools folder of your android SDK.

Command /bin/sh failed with exit code 1 while archive

Application is building and installing but not archiving. Yes I found some answers related to this issue but didn't work for me and this is the one of them "how to fix the issue "Command /bin/sh failed with exit code 1" in iphone", I checked the Run script in Build Phases and tried deleting the DerivedData folder in Library but nothing worked. Please help me in this
Xcode-8.3
After trying for some days my project successfully archived, The reason is I was running shell command behind the proxy. Yes because of proxy it was not working, once I removed the proxy and tried to archive it worked smoothly.
Thanks

Command /usr/bin/lipo failed with exit code 1 error

I have finally finished my app and I was getting ready to upload when this sudden error hit me and I have no idea what to do. I have checked other posts saying to change the code signing identity and I have done this but no luck. I tried every single option in the identity and no change. If anyone knows what is going on I would really appreciate it since I would simply just like to submit my app.
Here is what else it says in the erorr log:
/usr/bin/lipo: /Users/teddy/Library/Developer/Xcode/DerivedData/grocery_stores-dcyubhefhrcjhtcxbhldfpukdgdz/Build/Intermediates/grocery stores.build/Release-iphoneos/grocerystores.build/Objects-normal/armv7/grocery stores and /Users/teddy/Library/Developer/Xcode/DerivedData/grocery_stores-dcyubhefhrcjhtcxbhldfpukdgdz/Build/Intermediates/grocery stores.build/Release-iphoneos/grocery stores.build/Objects-normal/armv7/grocery stores have the same architectures (armv7) and can't be in the same fat output file
Command /usr/bin/lipo failed with exit code 1
I solved this issue by changing the value of the Valid Architecture found in Project > Build Settings > Architectures from the default "armv6 armv7" to "armv7". Hope this helps.
It's hard to see what exactly is happening without the command you are running. It looks to me like you are specifying the same input file twice, namely the arm7 version and lipo is telling you you can't add 2 arm7 versions of grocery stores to the universal file. Can you please enter the entire lipo command you are running? From the lipo man page:
-create
Take the input files (or file) and create one universal output file from them.
Do you possibly have the same file listed twice here?
Try changing your build target to a simulator build, clean and re-run.
In my case I used pods and oped projectFile instead of project workspace
In my case it was building a project on simulator in a release scheme, changed it to debug and it worked.