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

[Android 13 and Chrome Browser v101+] Chrome Browser fails to launch with an error Error: Activity class {com.android.chrome/com.google.android.apps.chrome.Main} does not exist. #17632

Closed
sri096 opened this issue Oct 19, 2022 · 4 comments

Comments

@sri096
Copy link

sri096 commented Oct 19, 2022

Chrome Browser fails to launch on Android 13. Fails with below error

debug] �[35m[Chromedriver]�[39m UnknownError: An unknown server-side error occurred while processing the command. Original error: unknown error: Failed to start com.android.chrome on device emulator-5554: Starting: Intent { dat=data: cmp=com.android.chrome/com.google.android.apps.chrome.Main }
[debug] �[35m[Chromedriver]�[39m Error type 3
[debug] �[35m[Chromedriver]�[39m Error: Activity class {com.android.chrome/com.google.android.apps.chrome.Main} does not exist.
[debug] �[35m[Chromedriver]�[39m 
[debug] �[35m[Chromedriver]�[39m     at errorFromW3CJsonCode (/Applications/Appium Server GUI.app/Contents/Resources/app/node_modules/appium/node_modules/appium-base-driver/lib/protocol/errors.js:780:25)
[debug] �[35m[Chromedriver]�[39m     at ProxyRequestError.getActualError (/Applications/Appium Server GUI.app/Contents/Resour

Environment

  • Appium version (or git revision) that exhibits the issue: Appium v1.22.3
  • Last Appium version that did not exhibit the issue (if applicable): N/A
  • Desktop OS/version used to run Appium: Mac OS 12.6
  • Node.js version (unless using Appium.app|exe): using Appium Desktop App
  • Npm or Yarn package manager: N/A
  • Mobile platform/version under test: Android 13
  • Real device or emulator/simulator: happening on both Emulator(Pixel 6) and Device(Pixel 6)
  • Appium CLI or Appium.app|exe: Appium Server GUI desktop app
  • Chrome Browser Version: v101.x and v106.x

Details

I am trying to inspect a website on a chrome browser on Android 13 device using Appium Server GUI Desktop app and Appium Inspector App. Have set below capabilities

{
  "appium:autoWebview": false,
  "appium:automationName": "UiAutomator2",
  "appium:deviceName": "Pixel6",
  "platformName": "Android",
  "appium:platformVersion": "13",
  "appium:udid": "emulator-5554",
  "browserName": "chrome",
  "appium:chromeOptions": {
    "w3c": "false"
  }
}

Browser Fails to launch on:

  • Android 13 Pixel 6 device with Chrome v106.x
  • Android 13 Pixel 6 device with Chrome v106.x
    • Android 13 Pixel 6 emulator with Chrome v106.x

Browser Launches on:

  • Android 12 Pixel 6 device with Chrome v101.x
  • Android 12 Pixel 6 device with Chrome v101.x
  • Android 12 Pixel 4 emulator with Chrome v106.x

Link to Appium logs

Failure and issue:
Android 13 and Chrome v101: https://gist.github.com/sri096/140ca79428810a0484129c1b47e4f880

Working case:
Android 12 and Chrome v106: https://gist.github.com/sri096/ef87c0ebd564372dc97efe0431ea9042

Link to Appium UiAutomator Server logs

Failure and issue:
Android 13 and Chrome v101: https://gist.github.com/sri096/1830331319ce27e91c61c41c076bc0f2

Working case:
Android 12 and Chrome v106: https://gist.github.com/sri096/111a5e787b5dedf1175682d2e129aa06

Code To Reproduce Issue [ Good To Have ]

Using Appium Inspector to launch a session.

Preliminary Debugging and notes:

Possible root cause for this issue could be that the behavior of intents matching changed in Android 13(https://developer.android.com/about/versions/13/behavior-changes-all), below is the Appium UiAutomator Server logs for failure and successful case.

Android 13 Appium UiAutomator Server Log Excerpt:

10-19 14:08:31.411   605  5347 I ActivityManager: Force stopping com.android.chrome appid=10117 user=-1: set debug app
10-19 14:08:31.437   605  5347 I ActivityManager: Force stopping com.android.chrome appid=10117 user=0: clear data
10-19 14:08:31.438   605   638 I ActivityManager: Force stopping com.android.chrome appid=10117 user=-1: clearApplicationUserData
10-19 14:08:31.444   605   662 I AppsFilter: interaction: PackageSetting{8eb828d io.appium.uiautomator2.server.test/10159} -> PackageSetting{1eeaeab com.android.chrome/10117} BLOCKED
10-19 14:08:31.444   605   662 I AppsFilter: interaction: PackageSetting{377453 io.appium.uiautomator2.server/10158} -> PackageSetting{1eeaeab com.android.chrome/10117} BLOCKED
10-19 14:08:31.447  1025  1025 D CarrierSvcBindHelper: onHandleForceStop: [com.android.chrome]
10-19 14:08:31.477  1844  7435 I PackageIntentOperation: Feature flags not enabled, skipping. [CONTEXT service_id=258 ]
10-19 14:08:31.493  1844  4415 I Icing   : doRemovePackageData com.android.chrome
**10-19 14:08:31.496   605  1008 W PackageManager: Intent does not match component's intent filter: Intent { dat=data: flg=0x10000000 cmp=com.android.chrome/com.google.android.apps.chrome.Main }
10-19 14:08:31.496   605  1008 W PackageManager: Access blocked: ComponentInfo{com.android.chrome/com.google.android.apps.chrome.Main}
10-19 14:08:31.496   605  1008 I ActivityTaskManager: START u0 {dat=data: flg=0x10000000 cmp=com.android.chrome/com.google.android.apps.chrome.Main} from uid 2000**
10-19 14:08:31.506  1596  2571 D MediaProvider: Deleted 0 Android/media items belonging to com.android.chrome on /data/user/0/com.google.android.providers.media.module/databases/external.db
10-19 14:08:31.507  7461  7487 I appium  : channel read: DELETE /wd/hub/session/4b1f9706-23c6-4560-b47e-76bd04d18f7f 

Android 12 Appium UiAutomator Server Log Excerpt:

10-19 13:55:02.787 10788 14368 I ActivityManager: Force stopping com.android.chrome appid=10115 user=-1: set debug app
10-19 13:55:02.816 10788 14368 I ActivityManager: Force stopping com.android.chrome appid=10115 user=0: clear data
10-19 13:55:02.819 10788 10818 I ActivityManager: Force stopping com.android.chrome appid=10115 user=-1: clearApplicationUserData
10-19 13:55:02.850 26306 26306 V MediaPlayerList: mPackageChangedBroadcastReceiver: action: android.intent.action.PACKAGE_DATA_CLEARED
10-19 13:55:02.874 10788 10905 I ActivityTaskManager: START u0 {dat=data:, flg=0x10000000 cmp=com.android.chrome/com.google.android.apps.chrome.Main} from uid 2000
10-19 13:55:02.883 21443 31151 I PackageIntentOperation: Feature flags not enabled, skipping. [CONTEXT service_id=258 ]
**10-19 13:55:02.945 10788 10819 I ActivityManager: Start proc 31232:com.android.chrome/u0a115 for pre-top-activity {com.android.chrome/com.google.android.apps.chrome.Main}
10-19 13:55:03.002 11535 11862 I MediaProvider: Begin Intent { act=android.intent.action.PACKAGE_DATA_CLEARED dat=package:com.android.chrome flg=0x1000010 cmp=com.google.android.providers.media.module/com.android.providers.media.MediaService (has extras) }
10-19 13:55:03.002 11535 11862 D MediaProvider: Deleted 0 Android/media items belonging to com.android.chrome on /data/user/0/com.google.android.providers.media.module/databases/external.db
10-19 13:55:03.003 11535 11862 I MediaProvider: End Intent { act=android.intent.action.PACKAGE_DATA_CLEARED dat=package:com.android.chrome flg=0x1000010** cmp=com.google.android.providers.media.module/com.android.providers.media.MediaService (has extras) }
10-19 13:55:03.022 31232 31232 W ActivityThread: Application com.android.chrome can be debugged on port 8100...
10-19 13:55:03.025 21443 21466 I Icing   : doRemovePackageData com.android.chrome
@mykola-mokhnach
Copy link
Collaborator

Duplicate of #17492

@sri096
Copy link
Author

sri096 commented Oct 20, 2022

Hey,

Thanks for looking into this issue and marking as duplicate to #17492. Appreciate it.

Could you please confirm if you meant the log excerpt below is from Chromedriver or appium-chromedriver?

2022-09-14 11:58:06:729 - [debug] [Chromedriver] UnknownError: An unknown server-side error occurred while processing the command. Original error: unknown error: Failed to start com.android.chrome on device 1C141FDF60094F: Starting: Intent { dat=data: cmp=com.android.chrome/com.google.android.apps.chrome.Main }
2022-09-14 11:58:06:729 - [debug] [Chromedriver] Error type 3
2022-09-14 11:58:06:730 - [debug] [Chromedriver] Error: Activity class {com.android.chrome/com.google.android.apps.chrome.Main} does not exist.
2022-09-14 11:58:06:730 - [debug] [Chromedriver] 
2022-09-14 11:58:06:730 - [debug] [Chromedriver]     at errorFromW3CJsonCode (/opt/testdroid/appium-1.22.3/node_modules/appium/node_modules/appium-base-driver/lib/protocol/errors.js:780:25)
2022-09-14 11:58:06:730 - [debug] [Chromedriver]     at ProxyRequestError.getActualError (/opt/testdroid/appium-1.22.3/node_modules/appium/node_modules/appium-base-driver/lib/protocol/errors.js:663:14)
2022-09-14 11:58:06:730 - [debug] [Chromedriver]     at JWProxy.command (/opt/testdroid/appium-1.22.3/node_modules/appium/node_modules/appium-base-driver/lib/jsonwp-proxy/proxy.js:272:19)
2022-09-14 11:58:06:730 - [debug] [Chromedriver]     at runMicrotasks (<anonymous>)
2022-09-14 11:58:06:730 - [debug] [Chromedriver]     at processTicksAndRejections (internal/process/task_queues.js:93:5)
2022-09-14 11:58:06:731 - [Chromedriver] Chromedriver exited unexpectedly with code null, signal SIGTERM

Also can you please point the line of code in UIA2 driver where a call is made to Chromedriver?

Thanks,
-K

@sri096
Copy link
Author

sri096 commented Oct 20, 2022

Hello,
nvm, I verified with Chrome Driver and seeing the same issue.
Thanks,
-K

@mikhailnersesov
Copy link

Facing the same issue..

Do I understand it correctly, that due to the fact, that this is third party issue (chromedriver itself) - there is no solution for it and we can not start Chrome Browser on the Android 13 currently?

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

No branches or pull requests

3 participants