[TIMOB-17347] Android: Install fails. Object has no method 'indexOf'
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Critical |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2014-07-21T20:58:36.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | Android, CLI |
Labels | adb, android, cli, install |
Reporter | Far |
Assignee | Chris Barber |
Created | 2014-07-18T10:26:04.000+0000 |
Updated | 2017-03-16T22:26:34.000+0000 |
Description
Error was made in https://github.com/appcelerator/titanium_mobile/commit/6d006eba6bc1100fb94e8046e7e53f4ec11f297e.
android/cli/hooks/run.js:
...
(function installApp() {
adb.shell(device.id, 'ps', function (err, output) {
if (output.indexOf('system_server') === -1) {
...
'output' isn't a string so the toString() conversion doesn't work. This creates a problem installing to Android devices
It's more correct to use getPid() from adb.js.
Attachments
File | Date | Size |
---|---|---|
build_log.txt | 2014-07-18T16:35:01.000+0000 | 8709 |
TIMOB17347.log | 2014-07-21T11:45:11.000+0000 | 45714 |
Thank you for the suggestion. Can you give us a way to reproduce the problem? What is the error you get when it happens?
Master: https://github.com/appcelerator/titanium_mobile/pull/5915 3_3_X: https://github.com/appcelerator/titanium_mobile/pull/5916
I simply ran
I both cases the app successfully installed.
[~farwayer] I see the error you are getting and I believe I have fixed in in the PRs above, however the QE team is having a bear of a time trying to reproduce this. We have tested Android builds on Linux with 3.3.0.GA and cannot reproduce. Can you help us by letting us know what exact OS you are using, what version on Node.js, what version of the Android build/platform/sdk tools, what Android target SDK, and what device? Thank you!
Of course, guys:
-
ti info
attached- can't attach new file, appended to comment[~farwayer] Great! Which Linux distro and which Android device are you using?
I am using Arch linux. application is successfully installed to device but not to genymotion emulator.
[~farwayer] Yeah, we just fixed the Genymotion issue with TIMOB-17344. You can get the fix by running:
Hm, just tested behavior with standart android emulator. All ok. Look like the problem appear on Genymotion only. But it's another problem than TIMOB-17344. Commit from TIMOB-17344 didn't help me.
I tried and able to reproduce this issue. See the details below - Environment - acs@1.0.15 alloy@1.4.0 npm@1.3.2 titanium@3.3.0 titanium-code-processor@1.1.1 OS - Ubuntu 12.04 Appcelerator Studio - 3.3.0.201407111535 1) Configured Ubuntu 12.04 system with current 3.3.0 GA environment. 2) Configured Genymotion on the system. 3) Verified that Studio detect the Genymotion configuration correctly. 4) Created a default classic project. 5) From the CLI, run the command - ti build -p android -T emulator -C "GoogleNexus5-4.4.2-API 19-1080x1920" Result - Got the same error as mentioned in this issue. 6) Removed the "modules" folder and 3.3.0 GA build from .titanium folder. 7) Download the build (linux 2) as mentioned in the issue TISTUD-6730. 8) Install the above SDK build from Studio. 9) Run the app again with the same command mentioned in the step 5. Result - Again got the same error message. App did not install on Genymotion emulator. See the attached CLI log file.
I tested this on Mac OS X using the PR above. I was able to install to a Genymotion emulator without issues. I'm not sure if this is a valid test or if the issue exists solely on Linux.
Yep, with PR all ok also on Linux.
[~skypanther] I say we just merge this. The change is low risk and is verified by [~farwayer].
Approved and merged
Closing ticket as fixed.