Suddenly facing this issue. Previously it was working fine - reactjs

BUILD FAILED in 2s
error Failed to install the app. Make sure you have the Android development environment set up: https://reactnative.dev/docs/environment-setup.
Error: Command failed: gradlew.bat app:installDebug -PreactNativeDevServerPort=8081
FAILURE: Build failed with an exception.
What went wrong:
A problem occurred configuring root project 'Peace Garden'.
Could not determine the dependencies of null.
Could not resolve all task dependencies for configuration ':classpath'.
> Could not resolve com.facebook.react:react-native:+.
Required by:
project :
> No matching variant of com.facebook.react:react-native:0.71.0-rc.0 was found. The consumer was configured
to find a runtime of a library compatible with Java 11, packaged as a jar, and its dependencies declared externally,
as well as attribute 'org.gradle.plugin.api-version' with value '7.3.3'

Related

react native FAILURE: Build failed with an exception gradle problem

Starting a Gradle Daemon, 1 incompatible and 1 stopped Daemons could not be reused, use --status for details
FAILURE: Build failed with an exception.
What went wrong:
A problem occurred configuring root project 'AwesomeProject'.
Could not determine the dependencies of null.
Could not resolve all task dependencies for configuration ':classpath'.
> Could not resolve jakarta.xml.bind:jakarta.xml.bind-api:2.3.2.
Required by:
project : > com.android.tools.build:gradle:7.3.1 > org.glassfish.jaxb:jaxb-runtime:2.3.2
project : > com.android.tools.build:gradle:7.3.1 > org.glassfish.jaxb:jaxb-runtime:2.3.2
Get more help at https://help.gradle.org
BUILD FAILED in 31s
please help how to solve this problem
i tried updating gradle but it didn't worked

React Native Android duplicate resources when building with asembleRelease

"react-native": "0.68.2"
Hi everybody, I'm trying to get .aab file for my react native app but when I use command:
gradlew assembleRelease
I get the following error:
Task :app:mergeReleaseResources FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:mergeReleaseResources'.
> [drawable-hdpi-v4/node_modules_reactnavigation_elements_src_assets_backicon] C:\xampp\htdocs\Woo\android\app\src\main\res\drawable-hdpi\node_modules_reactnavigation_elements_src_assets_backicon.png [drawable-hdpi-v4/node_modules_reactnavigation_elements_src_assets_backicon] C:\xampp\htdocs\Woo\android\app\build\generated\res\react\release\drawable-hdpi\node_modules_reactnavigation_elements_src_assets_backicon.png: Error: Duplicate resources
[drawable-mdpi-v4/assets_images_amaro1] C:\xampp\htdocs\Woo\android\app\src\main\res\drawable-mdpi\assets_images_amaro1.jpeg [drawable-mdpi-v4/assets_images_amaro1] C:\xampp\htdocs\Woo\android\app\build\generated\res\react\release\drawable-mdpi\assets_images_amaro1.jpeg: Error: Duplicate resources
[drawable-mdpi-v4/assets_images_applogo] C:\xampp\htdocs\Woo\android\app\src\main\res\drawable-mdpi\assets_images_applogo.png [drawable-mdpi-v4/assets_images_applogo] C:\xampp\htdocs\Woo\android\app\build\generated\res\react\release\drawable-mdpi\assets_images_applogo.png: Error: Duplicate resources
while creating debug apk, compiler creates drawable images, which we need to delele while creating release apk
delete these files path android/app/src/main/src
path drawable-hdpi-v4/node_modules_reactnavigation_elements_src_assets_backicon
path drawable-mdpi-v4/assets_images_amaro1
path drawable-mdpi-v4/assets_images_applogo
then
gradlew assembleRelease

Azure DevOps ionic Error building android

While running Azure DevOps tasks for cordova to build android getting following error, but the same code build fine in local machine!
[ERROR] An error occurred while running subprocess cordova.
cordova platform add android#8.0.0 --verbose exited with exit code 1.
Even including --verbose doesnt give any more insights into whats went wrong! Any clues on resolving this?
Log :
2020-06-10T12:07:08.9595670Z Updating icons at platforms/android/app/src/main/res
2020-06-10T12:07:08.9595970Z Updating splash screens at platforms/android/app/src/main/res
2020-06-10T12:07:08.9596290Z This app does not have additional resource files defined
2020-06-10T12:07:08.9596560Z Prepared android project successfully
2020-06-10T12:07:08.9597390Z Executing script found in plugin cordova-plugin-add-swift-support for hook "after_prepare": plugins/cordova-plugin-add-swift-support/add-swift-support.js
2020-06-10T12:07:08.9597890Z Resolving module name for glob => glob
2020-06-10T12:07:08.9598130Z Saving android#8.0.0 into platforms.json
2020-06-10T12:07:08.9598640Z --save flag or autosave detected
2020-06-10T12:07:08.9598910Z Saving android#~8.0.0 into config.xml file ...
2020-06-10T12:07:08.9599200Z adding android to cordova.platforms array in package.json
2020-06-10T12:07:08.9599480Z No scripts found for hook "after_platform_add".
2020-06-10T12:07:08.9599780Z [ERROR] An error occurred while running subprocess cordova.
2020-06-10T12:07:08.9600000Z
2020-06-10T12:07:08.9600570Z cordova platform add android#8.0.0 --verbose exited with exit code 1.
2020-06-10T12:07:08.9600850Z
2020-06-10T12:07:08.9601610Z Re-running this command with the --verbose flag may provide more information.
2020-06-10T12:07:08.9602390Z 2020-06-10T12:07:08.134Z ionic:utils-process onBeforeExit handler: 'process.exit' received
2020-06-10T12:07:08.9603200Z 2020-06-10T12:07:08.134Z ionic:utils-process onBeforeExit handler: running 1 functions
2020-06-10T12:07:08.9603970Z 2020-06-10T12:07:08.162Z ionic:utils-process processExit: exiting (exit code: 1)
2020-06-10T12:07:08.9604510Z [0m]

Deploy React JS SPA in Openshift

I have build a React JS app and triggered yarn build command. Its builded successfully and if I run yarn global add serve, its working perfectly on http://localhost:5000. After that I tried below link to deploy this code to OpenShift.
OpenShift Deployment
According to the document, I tried to run npx nodeshift --strictSSL=false --dockerImage=bucharestgold/centos7-s2i-web-app --imageTag=10.13.0 --build.env YARN_ENABLED=true --expose
Then I got this log -
npx: installed 216 in 37.284s
kubernetes-client deprecated require('kubernetes-client').config, use require('kubernetes-client/backends/request').config. ..\..\Users\RITUPARNABHATTACHARY\AppData\Roaming\npm-cache\_npx\11068\node_modules\nodeshift\node_modules\openshift-rest-client\lib\openshift-rest-client.js:25:35
kubernetes-client deprecated require('kubernetes-client').config, use require('kubernetes-client/backends/request').config. ..\..\Users\RITUPARNABHATTACHARY\AppData\Roaming\npm-cache\_npx\11068\node_modules\nodeshift\node_modules\openshift-rest-client\index.js:23:39
2019-12-21T11:58:07.841Z INFO loading configuration
kubernetes-client deprecated fromKubeconfig see https://github.com/godaddy/kubernetes-client/blob/master/merging-with-kubernetes.md#request-kubeconfig- ..\..\Users\RITUPARNABHATTACHARY\AppData\Roaming\npm-cache\_npx\11068\node_modules\nodeshift\lib\nodeshift-config.js:35:32
2019-12-21T11:58:07.882Z INFO using namespace smart-learner at https://c101-e.jp-tok.containers.cloud.ibm.com:30512
kubernetes-client deprecated Client({ config }), see https://github.com/godaddy/kubernetes-client/blob/master/merging-with-kubernetes.md ..\..\Users\RITUPARNABHATTACHARY\AppData\Roaming\npm-cache\_npx\11068\node_modules\nodeshift\node_modules\openshift-rest-client\lib\openshift-rest-client.js:95:18
kubernetes-client deprecated Request() without a .kubeconfig option, see https://github.com/godaddy/kubernetes-client/blob/master/merging-with-kubernetes.md ..\..\Users\RITUPARNABHATTACHARY\AppData\Roaming\npm-cache\_npx\11068\node_modules\nodeshift\node_modules\kubernetes-client\lib\swagger-client.js:200:19
2019-12-21T11:58:07.928Z WARNING a file property was not found in your package.json, archiving the current directory.
2019-12-21T11:58:07.929Z INFO creating archive of .gitignore, build, Dockerfile, package-lock.json, package.json, public, README.md, src, yarn.lock
2019-12-21T11:58:09.001Z INFO using existing build configuration smartlearner-s2i
2019-12-21T11:58:09.377Z INFO using existing image stream smartlearner
2019-12-21T11:58:09.378Z INFO uploading binary archive C:\ReactAPP\smartlearner/tmp/nodeshift/build/archive.tar
2019-12-21T11:58:15.825Z INFO binary upload complete
2019-12-21T11:58:15.828Z INFO waiting for build to finish
kubernetes-client deprecated .getStream use .getByteStream, see https://github.com/godaddy/kubernetes-client/blob/master/merging-with-kubernetes.md ..\..\Users\RITUPARNABHATTACHARY\AppData\Roaming\npm-cache\_npx\11068\node_modules\nodeshift\lib\build-watcher.js:56:107
2019-12-21T11:58:19.798Z TRACE Using bucharestgold/centos7-s2i-web-app:10.x as the s2i builder image
2019-12-21T11:58:20.550Z TRACE ls: cannot access /tmp/src/node_modules: No such file or directory
2019-12-21T11:58:20.564Z TRACE ---> Installing application source
2019-12-21T11:58:20.585Z TRACE ---> Building your Web Application from source
2019-12-21T11:58:20.592Z TRACE Current git config
2019-12-21T11:58:20.620Z TRACE url.https://github.com.insteadof=git#github.com:
2019-12-21T11:58:20.629Z TRACE url.https://.insteadof=ssh://
2019-12-21T11:58:20.629Z TRACE url.https://github.com.insteadof=ssh://git#github.com
2019-12-21T11:58:20.630Z TRACE ---> Using 'yarn install' with YARN_ARGS
2019-12-21T11:58:21.356Z TRACE yarn install v1.10.1
2019-12-21T11:58:21.594Z TRACE warning package-lock.json found. Your project contains lock files generated by tools other than Yarn. It is advised not to mix package managers in order to avoid resolution inconsistencies caused by unsynchronized lock files. To clear this warning, remove package-lock.json.
2019-12-21T11:58:21.657Z TRACE [1/4] Resolving packages...
2019-12-21T11:58:23.111Z TRACE [2/4] Fetching packages...
2019-12-21T11:58:53.081Z TRACE error #typescript-eslint/eslint-plugin#2.10.0: The engine "node" is incompatible with this module. Expected version "^8.10.0 || ^10.13.0 || >=11.10.1". Got "10.12.0"
2019-12-21T11:58:53.083Z TRACE error Found incompatible module
2019-12-21T11:58:53.086Z TRACE info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
2019-12-21T11:58:58.441Z TRACE error: build error: non-zero (13) exit code from bucharestgold/centos7-s2i-web-app:10.x
2019-12-21T11:59:00.497Z ERROR build failed with message: Assemble script failed.
2019-12-21T11:59:00.503Z ERROR Assemble script failed.
i am not able to understand what I am missing here. I found that bucharestgold/centos7-s2i-web-app has been depreicated and tried with npx nodeshift --strictSSL=false --dockerImage=nodeshift/ubi8-s2i-web-app --build.env YARN_ENABLED=true --deploy.env NPM_RUN="npx yarn start" --deploy.port=3000 --expose. This is also throwing same error message.
You can use the new web-app flag feature and let nodeshift set the appropriate docker image.
Try running this command instead npx nodeshift --web-app --build.env YARN_ENABLED=true --deploy.env NPM_RUN="npx yarn start" --deploy.port=3000

Integrating Active Directory with Plone 4

How do you integrate Active Directory with Plone 4 on Ubuntu? I have searched the Internet up and down and cannot get this to work!!
All I know is that all you have to do is add "plone.app.ldap" in your buildout.cfg file and that will install the add-ons. However, every time I do this I get an error message. I have installed python-ldap 2.3.11 from the Ubuntu repos but yet I still get an error when I run bin/buildout.
When I run bin/buildount it starts Getting distribution for 'python-ldap>=2.0.6'. I don't understand why does it have to do that when I already have python-ldap installed and tested successfully!
I have Python 2.6.
Here is the message I get when I execute bin/buildout:
Getting distribution for 'python-ldap>=2.0.6'.
extra_compile_args: -g
extra_objects:
include_dirs: /opt/openldap-RE24/include /usr/include/sasl
library_dirs: /opt/openldap-RE24/lib
libs: ldap_r lber sasl2 ssl crypto
file Lib/ldap.py (for module ldap) not found
file Lib/ldap/controls.py (for module ldap.controls) not found
file Lib/ldap/extop.py (for module ldap.extop) not found
file Lib/ldap/schema.py (for module ldap.schema) not found
warning: no files found matching 'Makefile'
warning: no files found matching 'Modules/LICENSE'
file Lib/ldap.py (for module ldap) not found
file Lib/ldap/controls.py (for module ldap.controls) not found
file Lib/ldap/extop.py (for module ldap.extop) not found
file Lib/ldap/schema.py (for module ldap.schema) not found
file Lib/ldap.py (for module ldap) not found
file Lib/ldap/controls.py (for module ldap.controls) not found
file Lib/ldap/extop.py (for module ldap.extop) not found
file Lib/ldap/schema.py (for module ldap.schema) not found
In file included from Modules/LDAPObject.c:9:0:
Modules/errors.h:8:18: fatal error: lber.h: No such file or directory
compilation terminated.
error: Setup script exited with error: command 'gcc' failed with exit status 1
An error occured when trying to install python-ldap 2.4.3. Look above this message for any errors that were output by easy_install.
While:
Installing instance.
Getting distribution for 'python-ldap>=2.0.6'.
Error: Couldn't install: python-ldap 2.4.3
*************** PICKED VERSIONS ****************
[versions]
plone.app.ldap = 1.2.6
#Required by:
#Products.PloneLDAP 1.1
Products.LDAPMultiPlugins = 1.14
#Required by:
#Products.PloneLDAP 1.1
Products.LDAPUserFolder = 2.20
#Required by:
#plone.app.ldap 1.2.6
Products.PloneLDAP = 1.1
#Required by:
#Products.LDAPUserFolder 2.20
dataflake.ldapconnection = 1.2
*************** /PICKED VERSIONS ***************
Please advise.
Now that you've actually included the error, it turns out this is a whole different issue. You can't build python-ldap without having the LDAP development package avialable. On any debian based system, such as ubuntu, you can use the excellent deb package metadata to do this for you.
$ sudo apt-get build-dep python-ldap

Resources