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

"[ADB] Incorrect package and activity. Retrying." after using runAppInBackground() #8423

Closed
Corji opened this issue May 10, 2017 · 17 comments
Closed

Comments

@Corji
Copy link

Corji commented May 10, 2017

The problem

For a specific test case i have to close and reopen the app in the same activity without resetting anything. The command driver.runAppInBackground(5) works well and the right screen appears after 5 seconds. But afterwarts the appium server says that the package and activity are incorrect

[ADB] Incorrect package and activity. Retrying. [ADB] Getting focused package and activity [ADB] Getting connected devices... [ADB] 1 device(s) connected.

Environment

  • Appium version: 1.0.0
  • Desktop OS/version used to run Appium: Windows 7
  • Node.js version (unless using Appium.app|exe):
  • Mobile platform/version under test: Android 6.0.1
  • Real device or emulator/simulator: Real Device
  • Appium CLI or Appium.app|exe: Appium Desktop

Details

I tryed to close the Application with the home button then open the application with the application icon on the screen or with driver.startActivity(). Both ways results on the homescreen of the application and not on that one i was before.

@mykola-mokhnach
Copy link
Collaborator

There is a known bug there, which was fixed in Appium 1.6.5-beta

@Corji
Copy link
Author

Corji commented May 10, 2017

And how i can get this version? I cant find any version for Appium Desktop or windows :(

@mykola-mokhnach
Copy link
Collaborator

It's only available via npm:

npm install -g appium@1.6.5-beta

@Corji
Copy link
Author

Corji commented May 10, 2017

Is there a plan to merge this into Appium Desktop?

@Corji
Copy link
Author

Corji commented May 10, 2017

I tried it now with 1.6.5-beta, got the same issue... Do you have a link to the existing issue? I dont think this is corrected yet.

@Corji
Copy link
Author

Corji commented May 10, 2017

Ok, randomly on my seccond attempt it worked -.-

@igalep
Copy link

igalep commented Aug 31, 2017

I'm using 1.6.5 stable ver , but getting the same result as described.

The app goes to background and then return , but the next step fails on :

"org.openqa.selenium.WebDriverException: An unknown server-side error occurred while processing the command. Original error: Error occurred while starting App. Original error: ****.login.LoginActivity or ****.login.LoginActivity never started (WARNING: The server did not provide any stacktrace information)
"

Any Ideas ?
Thanks

@BankUserJay
Copy link

I am facing issue(Incorrect Package and Activity), with Appium Version 1.6.5, 1.6.6beta4 and 1.7.1 and Android version 6.0 - 8.0.1.
Tried with appActivity, appWaitActivity but it didn't work. Please suggest on this issue Mykola Mokhnach.

@estefafdez
Copy link

As BankUserJay commented, I have the same issue with appium version 1.7.1. The unusual thing is that I can see the app launched and the first activity there but appium does not recognize it. Any other solution please?

@rpjesivac
Copy link

I am/was also seeing this error with v1.7.1.. restarting device did help and now I am not seeing this error anymore (for now)

@Corji
Copy link
Author

Corji commented Dec 7, 2017

I havent had this error since then. Im using appium 1.7.1.

@roscianfrank
Copy link

roscianfrank commented Jan 8, 2018

Running 'C:\apps\Sdk\platform-tools\adb.exe' with args: ["-P",5037,"-s","03157df32843862c","shell","dumpsys","window","windows"] [debug] [ADB] Found package: 'com.connectib.centremk' and fully qualified activity name : 'com.connectib.centremk.mobile.LandingActivity' [debug] [ADB] Incorrect package and activity. Retrying. [ADB] Error: Error occured while starting App. Original error: 'com.connectib.centremk.mobile.HomeNavDrawerActivity' never started at Object.wrappedLogger.errorAndThrow (C:\Users\Roscian Frank\AppData\Roaming\npm\node_modules\appium\node_modules\appium-support\lib\logging.js:69:13) at ADB.callee$0$0$ (C:\Users\Roscian Frank\AppData\Roaming\npm\node_modules\appium\node_modules\appium-adb\lib\tools\apk-utils.js:101:9) at tryCatch (C:\Users\Roscian Frank\AppData\Roaming\npm\node_modules\appium\node_modules\babel-runtime\regenerator\runtime.js:67:40) at GeneratorFunctionPrototype.invoke [as _invoke] (C:\Users\Roscian Frank\AppData\Roaming\npm\node_modules\appium\node_modules\babel-runtime\regenerator\runtime.js:315:22) at GeneratorFunctionPrototype.prototype.(anonymous function) [as throw] (C:\Users\Roscian Frank\AppData\Roaming\npm\node_modules\appium\node_modules\babel-runtime\regenerator\runtime.js:100:21) at GeneratorFunctionPrototype.invoke (C:\Users\Roscian Frank\AppData\Roaming\npm\node_modules\appium\node_modules\babel-runtime\regenerator\runtime.js:136:37) at <anonymous> Error: Error occured while starting App. Original error: 'com.connectib.centremk.mobile.HomeNavDrawerActivity' never started at Object.wrappedLogger.errorAndThrow (C:\Users\Roscian Frank\AppData\Roaming\npm\node_modules\appium\node_modules\appium-support\lib\logging.js:69:13) at ADB.callee$0$0$ (C:\Users\Roscian Frank\AppData\Roaming\npm\node_modules\appium\node_modules\appium-adb\lib\tools\apk-utils.js:101:9) at tryCatch (C:\Users\Roscian Frank\AppData\Roaming\npm\node_modules\appium\node_modules\babel-runtime\regenerator\runtime.js:67:40) at GeneratorFunctionPrototype.invoke [as _invoke] (C:\Users\Roscian Frank\AppData\Roaming\npm\node_modules\appium\node_modules\babel-runtime\regenerator\runtime.js:315:22) at GeneratorFunctionPrototype.prototype.(anonymous function) [as throw] (C:\Users\Roscian Frank\AppData\Roaming\npm\node_modules\appium\node_modules\babel-runtime\regenerator\runtime.js:100:21) at GeneratorFunctionPrototype.invoke (C:\Users\Roscian Frank\AppData\Roaming\npm\node_modules\appium\node_modules\babel-runtime\regenerator\runtime.js:136:37) at <anonymous>

Having the same issue Please help

I have tried Appium 1.6.4 , 1.6.5, 1.7.1, 1.7.2 no luck

@irfanpace
Copy link

Appium Error:
[debug] [ADB] Found package: 'com.karwatechnologies.karwataxi' and fully qualified activity name : 'com.karwatechnologies.karwataxi.activities.OnBoardingActivity'
[debug] [ADB] Incorrect package and activity. Retrying.
[debug] [ADB] Getting focused package and activity
[debug] [ADB] Running 'C:\Users\mirfan\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s ZY223CHKZH shell dumpsys window windows'
[debug] [ADB] Incorrect package and activity. Retrying.
[debug] [ADB] Getting focused package and activity

Console:
An unknown server-side error occurred while processing the command. Original error: Cannot start the 'com.karwatechnologies.karwataxi' application. Original error: 'com.karwatechnologies.karwataxi.activities.LauncherActivity' or 'com.karwatechnologies.karwataxi.com.karwatechnologies.karwataxi.activities.LauncherActivity' never started

I have tried with 1.3, 1.6.2, 1.6.5 beta version, having the same error.

Please suggest me on this

@roscianfrank
Copy link

@irfanpace
Use one of the found activity
Found package: 'com.karwatechnologies.karwataxi' and fully qualified activity name : 'com.karwatechnologies.karwataxi.activities.OnBoardingActivity'

@nagarjunay
Copy link

nagarjunay commented Aug 14, 2018

Hi Guys,

I facing below issue with App Package and Main Activity

"Found package: 'com.google.android.packageinstaller' and fully qualified activity name : 'com.android.packageinstaller.permission.ui.GrantPermissionsActivity'
[ADB] Incorrect package and activity. Retrying."

Appium: 1.6.1 and higher versions displaying above error
Android Version: 6.0

Below Code is not working
cap.setCapability("appPackage", "com.abc.app");
cap.setCapability("appActivity", "com.abc.app.MainActivity");
cap.setCapability("autoGrantPermissions", "true");

Please help me regarding this issue.

@roscianfrank
Copy link

@nagarjunay
try adding capabilities.setCapability("autoGrantPermissions",true);
And then wait for correct activity with capabilities.setCapability("appWaitActivity","Your activity")

@lock
Copy link

lock bot commented Aug 14, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked and limited conversation to collaborators Aug 14, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants