This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-07-04
Channels
- # announcements (5)
- # beginners (56)
- # calva (2)
- # cider (30)
- # circleci (2)
- # cljsrn (90)
- # clojars (3)
- # clojure (18)
- # clojure-dev (9)
- # clojure-europe (3)
- # clojure-greece (14)
- # clojure-ireland (6)
- # clojure-italy (6)
- # clojure-nl (7)
- # clojure-norway (1)
- # clojure-spec (1)
- # clojure-sweden (3)
- # clojure-uk (14)
- # clojurescript (52)
- # cursive (5)
- # data-science (9)
- # datomic (3)
- # emacs (26)
- # expound (11)
- # figwheel (3)
- # figwheel-main (6)
- # fulcro (24)
- # garden (1)
- # graalvm (101)
- # liberator (1)
- # mount (1)
- # off-topic (1)
- # pathom (27)
- # portland-or (2)
- # reagent (13)
- # reitit (2)
- # ring (1)
- # shadow-cljs (10)
- # spacemacs (11)
- # sql (6)
hi guys i'm still having trouble with this issue. it was working , and now seems to have stopped again. same symptom, hangs at installDebug with these messages:
➜ my-app react-native run-android
info JS server already running.
info Building and installing the app on the device (cd android && ./gradlew app:installDebug)...
> Task :app:installDebug
04:26:09 V/ddms: execute: running am get-config
04:26:09 V/ddms: execute 'am get-config' on 'HT68W0203272' : EOF hit. Read: -1
04:26:09 V/ddms: execute: returning
Installing APK 'app-debug.apk' on 'Pixel XL - 9' for app:debug
04:26:09 D/app-debug.apk: Uploading app-debug.apk onto device 'HT68W0203272'
04:26:09 D/Device: Uploading file onto device 'HT68W0203272'
04:26:09 D/ddms: Reading file permision of /home/cswanson/workspace/mobile/my-app/android/app/build/outputs/apk/debug/app-debug.apk as: rw-rw-r--
<============-> 98% EXECUTING [57s]
> :app:installDebug
I know it can work , I saw everything running fine on the exact same device just this morning. and i confirmed again it runs on an emulator
would really appreciate a hand, not sure where to go next. google hasn't really turned up anything helpful , i've done all the normal stuff of deleting watchman watches , increasing user limits, resetting metro cache , etc
One interesting point is that after it hangs like this, adb gets messed up ("adb reverse --list" hangs)
let me try to uninstall
The way it reads to me is: you have an app on the device and the newer version can’t be installed on top of it.
interesting , shouldn't it be able to install over itself though? (i'm trying again, uninstalled the app)
The times this happened to me is because I installed the production release app, with a certificate and was trying to install unsigned app over it.
interesting - maybe when i tried to run in from the android studio this could have happened ?
The key in that log above is Reading file permision of...
if you get that, the solution for me has been the manual uninstall.
What was the app version on that device before? Was it also a debug release or production (as in, signed with a cert)?
as far as i know it was debug, i never did anything to sign it - to be honest, i'm quite new new mobile dev
seems like even after the uninstall , it stall hangs in the same way
which log ?
i see figwheel log
but it's not connected
Whatever the output is when you try to run the command that you try to run, like the one you posted above. You said that the install hangs. What output is there when it hangs?
oh it looks like this:
➜ my-app react-native run-android
info JS server already running.
info Building and installing the app on the device (cd android && ./gradlew app:installDebug)...
Starting a Gradle Daemon, 1 incompatible Daemon could not be reused, use --status for details
> Task :app:installDebug
04:37:53 V/ddms: execute: running am get-config
04:37:53 V/ddms: execute 'am get-config' on 'HT68W0203272' : EOF hit. Read: -1
04:37:53 V/ddms: execute: returning
Installing APK 'app-debug.apk' on 'Pixel XL - 9' for app:debug
04:37:53 D/app-debug.apk: Uploading app-debug.apk onto device 'HT68W0203272'
04:37:53 D/Device: Uploading file onto device 'HT68W0203272'
04:37:53 D/ddms: Reading file permision of /home/cswanson/workspace/mobile/my-app/android/app/build/outputs/apk/debug/app-debug.apk as: rw-rw-r--
<============-> 98% EXECUTING [3m 37s]
> :app:installDebug
Not sure what it could be apart from the file permissions
line above.
So I had a look at the file permissions for the debug releases I have locally and the file permissions are:
-rw-r--r--
be they debug or prod.
Not sure if running chmod 644 /home/cswanson/workspace/mobile/my-app/android/app/build/outputs/apk/debug/app-debug.apk
will help?
And then attempting to install it again, maybe this time directly via:
adb -s HT68W0203272 install -r /home/cswanson/workspace/mobile/my-app/android/app/build/outputs/apk/debug/app-debug.apk
?
just the chmod didn't work , let me see about reinstall with adb
➜ my-app adb devices -l
List of devices attached
HT68W0203272 device usb:1-1 product:marlin model:Pixel_XL device:marlin transport_id:3
➜ my-app adb -s HT68W0203272 install -r /home/cswanson/workspace/mobile/my-app/android/app/build/outputs/apk/debug/app-debug.apk
Performing Streamed Install
after chmod i tried but it gave the same output, just hung on app:installDebug again
ok, streamed install seems hung too , i'll wait till it times out
➜ my-app du -s /home/cswanson/workspace/mobile/my-app/android/app/build/outputs/apk/debug/app-debug.apk
32080 /home/cswanson/workspace/mobile/my-app/android/app/build/outputs/apk/debug/app-debug.apk
it should be really small, it's just the re-natal basic template. first time trying re-natal
let me double check
yea it's definitely uninstall, but i noticed it's waiting for me to restart on an android 9 update. maybe that would help?
adb install is still just stuck on "Performing Streamed Install"
Something is odd there. Copying that big of an app should be pretty quick, like seconds quick.
yea, when it worked it was nearly instantly
maybe i restart adb and try the streamed install again
Not sure about the state of your device. Can you run any other apps on it without an issue ?
yea, i was using it fine for expo dev
no problem, thanks for the help, at least i learned some things. i'll let you know if i figure it out
thanks 🙂
Do you have permissions to install apps on your device that are not from the officially blessed app stores @chrisjswanson?
hm let me check
hey do you know where it is in the settings? i can't seem to find it
i've definitely got developer mode enable
hm ok let me google my version
See this: https://www.tech-recipes.com/rx/22616/android-allow-installation-of-non-market-apps/
It’s not the developer mode, it’s the permission to install the app directly on your phone, that is not from Google Play store or equivalent app walled garden.
cool thanks let me look at that
when i google android 9 it says "unknown sources" option has been removed, you need to copy apk and install then click to approve it
but adb push crashed halfway too 😐
➜ my-app adb push /home/cswanson/workspace/mobile/my-app/android/app/build/outputs/apk/debug/app-debug.apk /sdcard/Download
adb: error: failed to copy '/home/cswanson/workspace/mobile/my-app/android/app/build/outputs/apk/debug/app-debug.apk' to '/sdcard/Download/app-debug.apk': couldn't read from device
/home/cswanson/workspace/mobile/my-app/android/app/build/outputs/apk/debug/app-debug.apk: 0 files pushed. 4.1 MB/s (24441944 bytes in 5.661s)
so something is really weird with my adb i think
it hit like 75% and then crashed like that
I’d say that adb works fine probably, but the permissions on your device is where the issue lies
yea it claims to have 21G free
hm it crashed on a different phone too
this time it acually gave me more info
told me to try with gradlew , which gives a stack trace
➜ android ./gradlew app:installDebug
> Task :app:installDebug
05:20:42 V/ddms: execute: running am get-config
05:20:42 V/ddms: execute 'am get-config' on '8BLY10KEB' : EOF hit. Read: -1
05:20:42 V/ddms: execute: returning
Installing APK 'app-debug.apk' on 'Pixel 3 XL - 9' for app:debug
05:20:42 D/app-debug.apk: Uploading app-debug.apk onto device '8BLY10KEB'
05:20:42 D/Device: Uploading file onto device '8BLY10KEB'
05:20:42 D/ddms: Reading file permision of /home/cswanson/workspace/mobile/my-app/android/app/build/outputs/apk/debug/app-debug.apk as: rw-r--r--
05:20:48 D/ddms: read: channel EOF
05:20:48 E/Device: Error during Sync: EOF
Unable to install /home/cswanson/workspace/mobile/my-app/android/app/build/outputs/apk/debug/app-debug.apk
com.android.ddmlib.InstallException: EOF
at com.android.ddmlib.Device.installPackage(Device.java:913)
at com.android.ddmlib.Device.installPackage(Device.java:881)
at com.android.ddmlib.Device.installPackage(Device.java:870)
*snip*
Caused by: java.io.IOException: EOF
at com.android.ddmlib.AdbHelper.read(AdbHelper.java:862)
at com.android.ddmlib.SyncService.doPushFile(SyncService.java:712)
at com.android.ddmlib.SyncService.pushFile(SyncService.java:406)
at com.android.ddmlib.Device.syncPackageToDevice(Device.java:988)
at com.android.ddmlib.Device.installPackage(Device.java:902)
... 74 more
> Task :app:installDebug FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:installDebug'.
> com.android.builder.testing.api.DeviceException: com.android.ddmlib.InstallException: EOF
* 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
Deprecated Gradle features were used in this build, making it incompatible with Gradle 6.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See
BUILD FAILED in 6s
44 actionable tasks: 1 executed, 43 up-to-date
according to the doc you sent, it seems there is no longer blanket approval for dev builds past android 8
you have to copy the apk first and click it , then give it permission to install just that app and it will remember
but i can't even copy the apk via adb , because that crashes. and that's before we ever get to install ,so i wouldn't expect the permission to matter
maybe i can try a different method to copy the apk like gdrive
ok so i copied the apk with gdrive and installed it with package installed, it told me it was blocked by play protect, and i had to approve it manually
now the apk is installed
yep now it runs, and i've got a figwheel prompt 🙂
now the question is can react-native push new builds with adb , or i have to copy the package every time
maybe that play protect can be disabled
have to disable it from play store instead of settings now
let me uninstall and give it one more go
bummer , still hangs with the permission error
but at least i'm on the right track now
finally figured it out
of all things... i run linux in vmware. my vm's virtual usb controller was defaulted to usb 2.0 compatibility mode. Bumping it to 3.0 solved the issue outright.
so if your adb keeps hanging and your device keeps going offline, and/or your package is hanging on the final install step, and your run in any virtual environment for dev; check that your virtual usb controller is in 3.0 compatibility mode, not 2.0. Hope that saves someone else a few hours.