I'm currently trying to deploy apk to firebase apps distribution but we have a issue.
the command
firebase appdistribution:distribute appqualityrelease.apk –app xxxxxxxxxxxxxxxxxxxx ````
don't produce any output, it juste exit.
I'm correctly logged in using cli, app id is correct, apk is valid (it runs on simulator and physical device)
I also tried to use this command on our CI/CD environment (Azure Devops) with CI token,
All attempt produce the same issue : the command exit without error on the console (on DevOps, the message is Bash exited with code 1)
On Devops, we also try to run the deploy on Windows, Ubuntu, MacOs : same issue.
I also added the debug flag and there is only one error
[debug] [2023-01-13T07:55:33.894Z] ----------------------------------------------------------------------
[debug] [2023-01-13T07:55:33.896Z] Command: /usr/local/bin/node /usr/local/bin/firebase appdistribution:distribute appqualityrelease.apk –app xxxxxxxxxxxxxxxxxxxxxxxxxxx --debug
[debug] [2023-01-13T07:55:33.897Z] CLI Version: 11.20.0
[debug] [2023-01-13T07:55:33.897Z] Platform: darwin
[debug] [2023-01-13T07:55:33.897Z] Node Version: v16.17.1
[debug] [2023-01-13T07:55:33.898Z] Time: Fri Jan 13 2023 08:55:33 GMT+0100 (heure normale d’Europe centrale)
[debug] [2023-01-13T07:55:33.899Z] ----------------------------------------------------------------------
[debug]
[error]
[error] Error: Too many arguments. Run firebase help appdistribution:distribute for usage instructions
Could someone help us?
Related
Im building an app on ionic, my problem is that I want to see the console logs in real time when I launch the app on my android phone.
I used this command:
sudo ionic cordova run android
It launchs the app without problem. But looking on internet I saw that if I add -lI can see the logs while the app is running on my phone. The problem is that when I execute:
sudo ionic cordova run android -l
It shows this error:
> cordova build android --device
[INFO] ... and 77 additional chunks
[ng] ℹ 「wdm」: Compiled successfully.
> native-run android --app platforms/android/app/build/outputs/apk/debug/app-debug.apk --device --forward 8100:8100
[native-run] Selected hardware device 1c675858050c
[native-run] Error: Command failed: /root/Android/Sdk/platform-tools/adb -s 1c675858050c reverse tcp:8100 tcp:8100
[native-run] adb: error: closed
[native-run]
[native-run] at ChildProcess.exithandler (child_process.js:303:12)
[native-run] at ChildProcess.emit (events.js:321:20)
[native-run] at maybeClose (internal/child_process.js:1026:16)
[native-run] at Socket.<anonymous> (internal/child_process.js:441:11)
[native-run] at Socket.emit (events.js:321:20)
[native-run] at Pipe.<anonymous> (net.js:668:12)
[ERROR] An error occurred while running subprocess native-run.
native-run android --app platforms/android/app/build/outputs/apk/debug/app-debug... exited with exit code
1.
Re-running this command with the --verbose flag may provide more information.
How can I solve it? Or am I doing something wrong to see the logs in console while I use the ap on my phone?
Thanks!
Connect Your Device via Cable or adb to run your application build.
After installation:
1) Open Chrome in your PC and type chrome://inspect/ you will a list you connected devices.
2) click on inspect a New chrome Windows will open with your application running in it.
Getting error while running automation script in appium.
I am running a Mobile automation script on a Windows Desktop system with below software set up.
Software Set-Up:
1.Android Studio
2.Appium
3.Mobile/Tablet connected to the system
4.Selenium/Appium Driver code for Automation
Error
apksigner stderr: ERROR: Registry editing has been disabled by your administrator.
Exception in thread "main" java.nio.file.AccessDeniedException: C:\Program Files\Appium\resources\app\node_modules\appium\node_modules\appium-uiautomator2-server\apks\appium-uiautomator2-server-debug-androidTest.apk
Cannot use apksigner tool for signing. Defaulting to sign.jar. Original error: Command 'apksigner.bat sign --key 'C:\\Program Files\\Appium\\resources\\app\\node_modules\\appium\\node_modules\\appium-adb\\keys\\testkey.pk8' --cert 'C:\\Program Files\\Appium\\resources\\app\\node_modules\\appium\\node_modules\\appium-adb\\keys\\testkey.x509.pem' 'C:\\Program Files\\Appium\\resources\\app\\node_modules\\appium\\node_modules\\appium-uiautomator2-server\\apks\\appium-uiautomator2-server-debug-androidTest.apk'' exited with code 1; StdErr: ERROR: Registry editing has been disabled by your administrator.
[warn] [35m[ADB][39m Exception in thread "main" java.nio.file.AccessDeniedException: C:\Program Files\Appium\resources\app\node_modules\appium\node_modules\appium-uiautomator2-server\apks\appium-uiautomator2-server-debug-androidTest.apk
Unable to remove port forward 'Error executing adbExec. Original error: 'Command 'C\:\\Users\\Sumit.Chouhtel\\AppData\\Local\\Android\\sdk\\platform-tools\\adb.exe -P 5037 -s RFXTBIC00014974 forward --remove tcp\:8200' exited with code 1'; Stderr: 'adb.exe: error: listener 'tcp:8200' not found'; Code: '1''
[debug] [35m[BaseDriver][39m Event 'newSessionStarted' logged at 1568214375516 (20:36:15 GMT+0530 (India Standard Time))
Try to enable registry editing using these steps (assuming you have Windows 10)
Win + R (To open run commander window)
run gpedit.msc
Go to User Configuration > Administrative Templates > System > Prevent Access to Registry Editing Tools
Double click and set it to "disable"
Addition ways to achieve this https://www.techperiod.com/registry-edit-disabled-by-virus-fix/
I have got the below solution:
Need to click option as 'Only For Me' while installing the Appium Desktop app. (If we select 'For all users' option than there will be error in appium run).
We are currenly migrating an Ionic android build setup from bamboo to concourse. The android build using ionic cordova is triggered as one of the commands in a larger concourse-ci job which does npm install first and then does ionic build command.
The actual ionic command that fails is :
ionic cordova build android --dev --debug --release --no-interactive --no- confirm --buildConfig --nofetch --minifyjs --minifycss --gradleArg=--no-daemon
As a prerequisite to ionic cordova, I have ensured that gradle is installed correctly in the base docker image by doing wget of the gradle distribution and setting the gradle home environment variable to point to the downloaded gradle binary. Following is the content of the dockerfile :
FROM runmymind/docker-android-sdk
# make /bin/sh symlink to bash instead of dash:
RUN echo "dash dash/sh boolean false" | debconf-set-selections \
&& DEBIAN_FRONTEND=noninteractive dpkg-reconfigure dash
# Installing NodeJS
RUN ARCH=x64 \
&& curl -SLO "https://nodejs.org/dist/v$NODE_VERSION/node-v$NODE_VERSION-linux-$ARCH.tar.xz" \
&& curl -SLO --compressed "https://nodejs.org/dist/v$NODE_VERSION/SHASUMS256.txt.asc" \
&& tar -xJf "node-v$NODE_VERSION-linux-$ARCH.tar.xz" -C /usr/local --strip-components=1 --no-same-owner \
&& rm "node-v$NODE_VERSION-linux-$ARCH.tar.xz" SHASUMS256.txt.asc \
&& ln -s /usr/local/bin/node /usr/local/bin/nodejs
# Installing gradle
ENV GRADLE_VERSION 3.3
RUN mkdir /opt/gradle \
&& wget https://services.gradle.org/distributions/gradle-${GRADLE_VERSION}-bin.zip \
&& unzip -d /opt/gradle gradle-${GRADLE_VERSION}-bin.zip
ENV GRADLE_HOME /opt/gradle/gradle-${GRADLE_VERSION}/bin
ENV PATH $PATH:$GRADLE_HOME
When using this docker image; the docker container comes up and I am able to access the gradle correctly. However when invoking the above ionic cordova build command after installing cordova7 we get a detailed error message :
Gradle build daemon disappeared unexpectedly (it may have been killed or may have crashed. The detailed error message is follows :
FAILURE: Build failed with an exception.
What went wrong:
Gradle build daemon disappeared unexpectedly (it may have been killed
or may have crashed)
* Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Error: /opt/gradle/gradle-3.3/bin/gradle: Command failed with exit code 1
[ERROR] An error occurred while running cordova build android --debug
--release
--buildConfig (exit code 1).
We tried using latest gradle build version 4.6 and the problem persist and the gradle daemon gets killed immediately. Some of the gradle logs thats gets printed in the concourse ci :
cordova build android --debug --release --buildConfig
You have been opted out of telemetry. To change this, run: cordova
telemetry on. will push strings array
{"name":"lang","titles":["English (US)","English
(UK)"],"values":["en-us","en-gb"]} android preferences file was
successfully generated ANDROID_HOME=/opt/android-sdk-linux
JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64 Reading build config
file: /tmp/build/80754af9/source/build.json Reading the keystore
from: /tmp/build/80754af9/source/Elsa2Go_android.keystore Starting a
Gradle Daemon (subsequent builds will be faster) The message
received from the daemon indicates that the daemon has disappeared.
Build request sent: Build{id=a31854f5-a2c8-4248-b580-2ae398dbba4c.1,
currentDir=/tmp/build/80754af9/source} Attempting to read last
messages from the daemon log... Daemon pid: 731
log file: /root/.gradle/daemon/3.3/daemon-731.out.log
----- Last 20 lines from daemon log file - daemon-731.out.log ----- 10:01:27.698 [DEBUG]
[org.gradle.launcher.daemon.bootstrap.DaemonStartupCommunication]
Completed writing the daemon greeting. Closing streams...
10:01:27.795 [DEBUG] [org.gradle.launcher.daemon.server.Daemon]
stopOnExpiration() called on daemon 10:01:27.799 [DEBUG]
[org.gradle.launcher.daemon.server.Daemon] awaitExpiration() called on
daemon 10:01:27.800 [DEBUG]
[org.gradle.internal.remote.internal.inet.TcpIncomingConnector]
Accepted connection from /127.0.0.1:54152 to /127.0.0.1:45644.
10:01:27.801 [DEBUG]
[org.gradle.launcher.daemon.server.DaemonStateCoordinator] daemon is
running. Sleeping until state changes. 10:01:27.950 [DEBUG]
[org.gradle.launcher.daemon.server.SynchronizedDispatchConnection]
thread 14: received class org.gradle.launcher.daemon.protocol.Build
10:01:27.950 [DEBUG]
[org.gradle.launcher.daemon.server.DefaultDaemonConnection] thread 14:
Received non-IO message from client:
Build{id=a31854f5-a2c8-4248-b580-2ae398dbba4c.1,
currentDir=/tmp/build/80754af9/source} 10:01:27.951 [INFO]
[org.gradle.launcher.daemon.server.DefaultIncomingConnectionHandler]
Received command: Build{id=a31854f5-a2c8-4248-b580-2ae398dbba4c.1,
currentDir=/tmp/build/80754af9/source}. 10:01:27.951 [DEBUG]
[org.gradle.launcher.daemon.server.DefaultIncomingConnectionHandler]
Starting executing command:
Build{id=a31854f5-a2c8-4248-b580-2ae398dbba4c.1,
currentDir=/tmp/build/80754af9/source} with connection: socket
connection from /127.0.0.1:45644 to /127.0.0.1:54152. 10:01:27.953
[ERROR] [org.gradle.launcher.daemon.server.DaemonStateCoordinator]
Command execution: started DaemonCommandExecution[command =
Build{id=a31854f5-a2c8-4248-b580-2ae398dbba4c.1,
currentDir=/tmp/build/80754af9/source}, connection =
DefaultDaemonConnection: socket connection from /127.0.0.1:45644 to
/127.0.0.1:54152] after 0.0 minutes of idle 10:01:27.954 [INFO]
[org.gradle.launcher.daemon.server.DaemonRegistryUpdater] Marking the
daemon as busy, address: [2f4d8bed-fcce-4001-8cd5-896af7ca9860
port:45644, addresses:[/127.0.0.1]] 10:01:27.954 [DEBUG]
[org.gradle.launcher.daemon.registry.PersistentDaemonRegistry] Marking
busy by address: [2f4d8bed-fcce-4001-8cd5-896af7ca9860 port:45644,
addresses:[/127.0.0.1]] 10:01:27.955 [DEBUG]
[org.gradle.cache.internal.DefaultFileLockManager] Waiting to acquire
exclusive lock on daemon addresses registry. 10:01:27.956 [DEBUG]
[org.gradle.cache.internal.DefaultFileLockManager] Lock acquired.
10:01:27.957 [DEBUG]
[org.gradle.cache.internal.DefaultFileLockManager] Releasing lock on
daemon addresses registry. 10:01:27.957 [DEBUG]
[org.gradle.launcher.daemon.server.DaemonStateCoordinator] resetting
idle timer 10:01:27.958 [DEBUG]
[org.gradle.launcher.daemon.server.DaemonStateCoordinator] daemon is
running. Sleeping until state changes. 10:01:27.961 [INFO]
[org.gradle.launcher.daemon.server.exec.StartBuildOrRespondWithBusy]
Daemon is about to start building
Build{id=a31854f5-a2c8-4248-b580-2ae398dbba4c.1,
currentDir=/tmp/build/80754af9/source}. Dispatching build started
information... 10:01:27.967 [DEBUG]
[org.gradle.launcher.daemon.server.SynchronizedDispatchConnection]
thread 16: dispatching class
org.gradle.launcher.daemon.protocol.BuildStarted 10:01:27.996
[DEBUG]
[org.gradle.launcher.daemon.server.exec.EstablishBuildEnvironment]
Configuring env variables: ............. ..................
P.S : Version information
"ionic": "3.19.0"
"#angular/cli": "1.5.3"
Android plaftorm : installed in ionic
Approaches tried but same issue was observed :
Setting the gradle daemon as false in gradle properties by : org.gradle.daemon=false
Setting the heap size to a mininum in gradle properties by : org.gradle.jvmargs=-XX:MaxPermSize=256m
-Xms256m -Xmx512m
Using latest version of gradle 4.6
Any idea / suggestions as to what is the root cause will be of great help.
Thanks in advance.
What happens, if you remove the --no-daemon from the args?
I mean Gradle says that the preferred way is the deamon since Gradle 3.0 (https://docs.gradle.org/current/userguide/gradle_daemon.html#sec:disabling_the_daemon).
Furthermore you don't have a need for it, because Docker provides you a fresh environment.
I get this output/error when
cordova run android --target 0152a65c02a27d5b --verbose
Output
No scripts found for hook "before_run".
No scripts found for hook "before_prepare".
Checking config.xml for saved platforms that haven't been added to the project
Checking for any plugins added to the project that have not been installed in android platform
No differences found between plugins added to project and installed in android platform. Continuing...
Generating platform-specific config.xml from defaults for android at /Users/r00/Projects/myappGo/myapp_app/platforms/android/res/xml/config.xml
Merging project's config.xml into platform-specific android config.xml
Merging and updating files from [www, platforms/android/platform_www] to platforms/android/assets/www
Wrote out android application name "myapp" to /Users/r00/Projects/myappGo/myapp_app/platforms/android/res/values/strings.xml
Wrote out Android package name "com.myappgo.myapp" to /Users/r00/Projects/myappGo/myapp_app/platforms/android/src/com/myappgo/myapp/MainActivity.java
This app does not have launcher icons defined
This app does not have splash screens defined
Prepared android project successfully
No scripts found for hook "after_prepare".
Checking config.xml for saved plugins that haven't been added to the project
ANDROID_HOME=/Users/r00/Library/Android/sdk
JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_101.jdk/Contents/Home
Running command: /Users/r00/Projects/myappGo/myapp_app/platforms/android/gradlew cdvBuildDebug -b /Users/r00/Projects/myappGo/myapp_app/platforms/android/build.gradle -Dorg.gradle.daemon=true -Pandroid.useDeprecatedNdk=true
BUILD SUCCESSFUL
Total time: 1.695 secs
Command finished with error code 0: /Users/r00/Projects/myappGo/myapp_app/platforms/android/gradlew cdvBuildDebug,-b,/Users/r00/Projects/myappGo/myapp_app/platforms/android/build.gradle,-Dorg.gradle.daemon=true,-Pandroid.useDeprecatedNdk=true
Built the following apk(s):
/Users/r00/Projects/myappGo/myapp_app/platforms/android/build/outputs/apk/android-debug.apk
No scripts found for hook "before_deploy".
ANDROID_HOME=/Users/r00/Library/Android/sdk
JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_101.jdk/Contents/Home
Running command: adb devices
Command finished with error code 0: adb devices
Running command: adb devices
Command finished with error code 0: adb devices
Running adb shell command "cat /proc/cpuinfo" on target 0152a65c02a27d5b...
Running command: adb -s 0152a65c02a27d5b shell cat /proc/cpuinfo
Command finished with error code 0: adb -s,0152a65c02a27d5b,shell,cat,/proc/cpuinfo
Skipping build...
Built the following apk(s):
/Users/r00/Projects/myappGo/myapp_app/platforms/android/build/outputs/apk/android-debug.apk
Using apk: /Users/r00/Projects/myappGo/myapp_app/platforms/android/build/outputs/apk/android-debug.apk
Package name: com.myappgo.myapp
Installing apk /Users/r00/Projects/myappGo/myapp_app/platforms/android/build/outputs/apk/android-debug.apk on target 0152a65c02a27d5b...
Running command: adb -s 0152a65c02a27d5b install -r /Users/r00/Projects/myappGo/myapp_app/platforms/android/build/outputs/apk/android-debug.apk
Command finished with error code 255: adb -s,0152a65c02a27d5b,install,-r,/Users/r00/Projects/myappGo/myapp_app/platforms/android/build/outputs/apk/android-debug.apk
Error: adb: Command failed with exit code 255
at ChildProcess.whenDone (/Users/r00/Projects/myappGo/myapp_app/platforms/android/cordova/node_modules/cordova-common/src/superspawn.js:169:23)
at emitTwo (events.js:87:13)
at ChildProcess.emit (events.js:172:7)
at maybeClose (internal/child_process.js:827:16)
at Socket.<anonymous> (internal/child_process.js:319:11)
at emitOne (events.js:77:13)
at Socket.emit (events.js:169:7)
at Pipe._onclose (net.js:486:12)
I'm quiet lost here
My fix was to delete a few apps.
The phone gave a hint; it kept popping-up a message that storage was low. However, I didn't think this was related to not being able to install the app (initially).
Connection: MTP (Media Device)
USB debugging: On
Device: LG Risio
Android version: 6.0
Cordova CLI: 6.5.0
Framework: Ionic 1.x
Ionic CLI: 2.2.1
Machine: Mac OS X Sierra
Node: 4.4.2
Extra details:
I kept switching between MTP and PTP connection. Restarted the device. And, I kept plugging and unplugging the device from my computer. Nothing worked. The build is always successful in the console. But somehow, the app just wasn't getting installed on the device. I deleted the old version of the app sometimes that can cause a problem where there are inconsistent versions. But that didn't work either. When I deleted 3 big apps from the phone and tried installing again cordova run android, the app was finally installed on the phone.
From you command line run
adb -s 0152a65c02a27d5b shell cat /proc/cpuinfo
and check whether it fails and how.
As
Running command: adb devices
Command finished with error code 0: adb devices
may have succeeded perhaps you specific device is not detected or cannot obtain cpuinfo.
I can't figure out why I can no longer build Android apps using Cordova on the same computer that I used to build the same apps that worked last month, after having updated Cordova and NodeJS.
Currently I'm having to utilize super user privileges to get as far as Cordova launching the emulator, but it is then unable to install the app on the emulator and subsequently crashes with the following error.
So first to root with
sudo -E su
Then the cordova command will launch the emulator without sudo
cordova emulate android
if I try cordova run android, I get nothing launching on the connected device. The following is the output after dropping to root then running the emulate command.
Running command: /home/lyndon/myapp/platforms/android/cordova/run --emulator
ANDROID_HOME=/home/lyndon/Software/android-sdk-linux
JAVA_HOME=/usr/lib/jvm/java-8-oracle/bin
WARNING : no emulator specified, defaulting to myavd
Waiting for emulator...
emulator: emulator window was out of view and was recentered
Booting up emulator (this may take a while)...................BOOT COMPLETE
Running: /home/lyndon/myapp/platforms/android/gradlew cdvBuildDebug -b /home/lyndon/myapp/platforms/android/build.gradle -PcdvBuildArch=arm -Dorg.gradle.daemon=true
ERROR: JAVA_HOME is set to an invalid directory: /usr/lib/jvm/java-8-oracle/bin
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation.
/home/lyndon/myapp/platforms/android/cordova/node_modules/q/q.js:126
throw e;
^
Error code 1 for command: /home/lyndon/myapp/platforms/android/gradlew with args: cdvBuildDebug,-b,/home/lyndon/myapp/platforms/android/build.gradle,-PcdvBuildArch=arm,-Dorg.gradle.daemon=true
Error: /home/lyndon/myapp/platforms/android/cordova/run: Command failed with exit code 1
at ChildProcess.whenDone (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/cordova/superspawn.js:134:23)
at ChildProcess.emit (events.js:110:17)
at maybeClose (child_process.js:1015:16)
at Process.ChildProcess._handle.onexit (child_process.js:1087:5)
I never previously had to drop to root to launch the Android emulator with Cordova, why is this currently the case and why is the app not installing on the emulator?