question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

1.5.2 - Android fails with [Error: packageAndLaunchActivityFromManifest failed. Original error: Path must be a string. Received null]

See original GitHub issue

Android automation that continues to run as expected using the Appium 1.4.13 GUI fails using the 1.5.2 GUI with:

[ADB] Checking whether aapt is present 

[ADB] Error: packageAndLaunchActivityFromManifest failed. Original error: Path must be a string. Received null
    at Object.wrappedLogger.errorAndThrow (lib/logger.js:60:13)
    at ADB.callee$0$0$ (lib/tools/android-manifest.js:88:9)
    at tryCatch (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40)
    at GeneratorFunctionPrototype.invoke [as _invoke] (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:315:22)
    at GeneratorFunctionPrototype.prototype.(anonymous function) [as next] (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:100:21)
    at GeneratorFunctionPrototype.invoke (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37)
    at run (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/babel-runtime/node_modules/core-js/library/modules/es6.promise.js:104:47)
    at /Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/babel-runtime/node_modules/core-js/library/modules/es6.promise.js:115:28
    at flush (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/babel-runtime/node_modules/core-js/library/modules/$.microtask.js:19:5)
    at _combinedTickCallback (internal/process/next_tick.js:67:7)
    at process._tickCallback (internal/process/next_tick.js:98:9)
 [Error: packageAndLaunchActivityFromManifest failed. Original error: Path must be a string. Received null]

Environment

  • Appium version (or git revision) that exhibits the issue: 1.5.2
  • Last Appium version that did not exhibit the issue (if applicable): 1.4.13
  • Desktop OS/version used to run Appium: OSX 10.11.4
  • Node.js version (unless using Appium.app|exe): Appium.app
  • Mobile platform/version under test: Android 5.1
  • Real device or emulator/simulator: emulator
  • Appium CLI or Appium.app|exe: .app

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:8

github_iconTop GitHub Comments

1reaction
DonnaZhcommented, Jul 6, 2017

update … it works by setting right AppActivity capability.

To find AppPackageName and AppActivity … C:\Users\myName\AppData\Local\Android\sdk\build-tools\25.0.2>aapt list -a “C:\myProject\bin\Debug\Apps\myApp.apk” > “C:\output.txt”

in output.txt file

  1. search for [Android manifest] ==> find [A: package="yourAppPackageName:]

  2. search for [E: activity] ==> find a list of activity names, try them one by one, most likely it would be the first one.

1reaction
stba42commented, Jun 22, 2016

Hi, I just got the same error. I forgot to set ANDROID_HOME! As soon as I did, the problem was solved. The error message is very confusing, however - it took me a while to figure it out.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Android real device: Unable to launch/run more recent App ...
Original error : packageAndLaunchActivityFromManifest failed. Original error: Path must be a string. Received null.
Read more >
Build Failure. Error: 'path' cannot be an empty string ("") or start ...
Error : 'path' cannot be an empty string ("") or start with the null character. ... This issue is read only, because it...
Read more >
packageAndLaunchActivityFrom...
Original error : packageAndLaunchActivityFromManifest failed. Original error: Could not find 'aapt' in PATH ; while processing the command.
Read more >
Better PHPUnit: Error: Path must be a string. Received null
If i run Better PHPUnit: run, then this error occurs. Tried now in a complete fresh vscode installation to start really from scratch,...
Read more >
iOS 真机运行Appium 长期答疑! - TesterHome
appium 启动的时候,指定udid 和app bundle appium -U <udid> --app <path or bundle> ... error: Failed to start an Appium session, err was: Error: Instruments ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found