Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chrome on Android com.android.chrome not installed on device #1914

Closed
2 tasks done
Andrej1198 opened this issue Mar 15, 2023 · 14 comments
Closed
2 tasks done

Chrome on Android com.android.chrome not installed on device #1914

Andrej1198 opened this issue Mar 15, 2023 · 14 comments
Labels

Comments

@Andrej1198
Copy link

Andrej1198 commented Mar 15, 2023

Have you read the documentation?

URL

What are you trying to accomplish

Hi @soulgalore

I was wondering if you have encountered the following issue before?

I am trying to launch chrome on android using our device farm(run by bitbar)

And I keep getting the following error:

raptor-browsertime Info: chrome failed to start, trying 2 more time(s): unknown error: com.android.chrome is not installed on device RR8R10B7DWY

raptor-browsertime Info: chrome failed to start, trying 1 more time(s): unknown error: com.android.chrome is not installed on device RR8R10B7DWY

raptor-browsertime Info: chrome failed to start, trying 0 more time(s): unknown error: com.android.chrome is not installed on device RR8R10B7DWY

At which point I get a browsertime error message telling me it failed to run, failure stack below

I believe this issue is similar to the one encountered with #1331 and related to an activity change in android chrome

The old default_activity was com.android.chrome/com.google.android.apps.chrome.Main, whereas now the default_activity is com.android.chrome/com.google.android.apps.chrome.IntentDispatcher

It fails in lib/core/seleniumRunner.js
The following baseDir(this.baseDir) was used: /builds/task_167884022773121/workspace/build/blobber_upload_dir/browsertime-results/google
The following options(this.options) is set when running: https://pastebin.com/aAyFUzr3

I'm part of Mozilla the try job can be found here: https://treeherder.mozilla.org/jobs?repo=try&group_state=expanded&tier=1%2C2%2C3&revision=9562520faee78dc534a16cbda37ca5de4cba6b9c and the full log can be found here: https://firefoxci.taskcluster-artifacts.net/L3Jx9fdbSWiYr8m1lvDHYA/0/public/logs/live_backing.log

What browser did you use?

Chrome Android

How to reproduce

Run a browsertime test with the following commands: (https://pastebin.com/Z0pLtQzj)

/builds/task_167884022773121/fetches/node/bin/node /builds/task_167884022773121/fetches/browsertime/node_modules/browsertime/bin/browsertime.js --firefox.geckodriverPath /builds/task_167884022773121/fetches/geckodriver --chrome.chromedriverPath /builds/task_167884022773121/fetches/109chromedriver /builds/task_167884022773121/workspace/build/tests/raptor/raptor/browsertime/../../browsertime/browsertime_pageload.js --firefox.noDefaultPrefs --browsertime.page_cycle_delay 1000 --skipHar --pageLoadStrategy none --webdriverPageload true --firefox.disableBrowsertimeExtension true --pageCompleteCheckStartWait 5000 --pageCompleteCheckPollTimeout 1000 --timeouts.pageLoad 60000 --timeouts.script 120000 --browsertime.page_cycles 2 --pageCompleteWaitTime 5000 --browsertime.url https://www.google.com --browsertime.post_startup_delay 1000 --iterations 15 --videoParams.androidVideoWaitTime 20000 --browsertime.chimera true --browsertime.test_bytecode_cache false --firefox.perfStats false --browsertime.commands  --viewPort 1366x695 --videoParams.convert false --videoParams.addTimer false --browser chrome --android --chrome.args=--use-mock-keychain --chrome.args=--no-default-browser-check --chrome.args=--no-first-run --chrome.args=--proxy-server=127.0.0.1:60525 --chrome.args=--proxy-bypass-list=localhost;127.0.0.1 --chrome.args=--ignore-certificate-errors --resultDir /builds/task_167884022773121/workspace/build/blobber_upload_dir/browsertime-results/google --firefox.profileTemplate /tmp/tmpkj0o9cse.mozrunner --video true --visualMetrics true --visualMetricsContentful true --visualMetricsPerceptual true --visualMetricsPortable true --videoParams.keepOriginalVideo true --firefox.windowRecorder false --xvfbParams.display 0 --browsertime.testName google --browsertime.liveSite False --browsertime.loginRequired True

Relevant log output

Failure stack:
INFO -  raptor-browsertime Info:     at SeleniumRunner.start (/builds/task_167884022773121/fetches/browsertime/node_modules/browsertime/lib/core/seleniumRunner.js:93:13)
[task 2023-03-15T01:19:14.918Z] 01:19:14     INFO -  raptor-browsertime Info:     at processTicksAndRejections (node:internal/process/task_queues:96:5)
[task 2023-03-15T01:19:14.918Z] 01:19:14     INFO -  raptor-browsertime Info:     at async Iteration.run (/builds/task_167884022773121/fetches/browsertime/node_modules/browsertime/lib/core/engine/iteration.js:114:7)
[task 2023-03-15T01:19:14.918Z] 01:19:14     INFO -  raptor-browsertime Info:     at async Engine.runByScript (/builds/task_167884022773121/fetches/browsertime/node_modules/browsertime/lib/core/engine/index.js:270:20)
[task 2023-03-15T01:19:14.918Z] 01:19:14     INFO -  raptor-browsertime Info:     at async run (/builds/task_167884022773121/fetches/browsertime/node_modules/browsertime/bin/browsertime.js:101:22)
@Andrej1198 Andrej1198 added the bug label Mar 15, 2023
@Andrej1198
Copy link
Author

Also should mention that I cannot reproduce the issue locally, only on the using the bitbar service does the issue appear

@soulgalore
Copy link
Member

Hi @Andrej1198 what Chrome/Chromedriver and Android version do you use? There was a bug in Chromedriver that Chrome could not start on Android 13 https://chromedriver.storage.googleapis.com/110.0.5481.77/notes.txt (I had that problem locally), could it be that? I think when we run Chrome using Chromedriver we do not set the activity, that comes automatically in Chromedriver, so it could be that you need to update the version?

We also run tests on BitBar and Chrome works for me there (Chrome 111). However I have the almost the same problem as you but with Firefox on BitBar, it started to happen a week ago or something like that. I've been trying to fix the issue but haven't done that yet (works locally though so I cannot reproduce it) :|

@Andrej1198
Copy link
Author

Thanks for the speedy response! :)
I am using Android 11 and for chrome I am using Chrome 109.0.5414.117 and Chromedriver 109.0.5414.25
What version of chrome and chromedriver are you using? I would like to try changing to that version and see if that resolves the issue for me

@soulgalore
Copy link
Member

On BitBar we use Chrome 111.0.5563.57 and Chromedriver 110.0.5481.77 (on Moto G5 and Samsung A51).

@Andrej1198
Copy link
Author

Where do you get your apks out of curiosity?

@soulgalore
Copy link
Member

BitBar installed Chrome and then we auto update our update through the Play store.

@Andrej1198
Copy link
Author

Okay, good to know! Thanks

@Andrej1198
Copy link
Author

How do you auto-update through the play store?
Is there an adb command to do so?

@soulgalore
Copy link
Member

Using the GUI. BitBar has configured so Chrome isn't changed between new runs.

@Andrej1198
Copy link
Author

What GUI are you referring to? Is there public documentation for this GUI?

@soulgalore
Copy link
Member

Sorry using "LiveTesting" in BitBar I think you should ask them for help :)

@Andrej1198
Copy link
Author

Will do thank you for everything!
I will leave this issue open and leave my solution to the issue when I'm done

@Andrej1198
Copy link
Author

Andrej1198 commented Mar 27, 2023

Hey @soulgalore I'm closing the issue

As it turns out the issue was due to a miscommunication, chrome on our android devices were disabled and we were not aware(we thought it was uninstalled). Chrome being disabled and chrome not being installed give the same error message from chromedriver which we were not aware of, hope this helps you with resolving your similar issue.

In our case chrome was being disabled with this command: pm uninstall -k --user 0 com.android.chrome
To re-enable the disabled app we ran the following command: cmd package install-existing com.android.chrome

A way you can check if your app is installed but not enabled is by running the enabling command(which should not fail if the app is already enabled) or by checking that the following command lists your packageadb shell dumpsys package com.android.chrome and checking that the package is also in /data/app we did find that when running pm list packages the package should not be listed if it is disabled

Hope this helps you resolve your issues!

@soulgalore
Copy link
Member

Thank you @Andrej1198 for the explanation!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants