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.

Android: Unable to start app: badging act: null Cannot parse launchActivity from manifest.null

See original GitHub issue

The problem

I have an app which I can side load onto an Android device with adb and run fine. When I try to run the app via the Appium application or programmically via java. The app won’t install and run.

Environment

I’m running on OSX Appium v1.4.16 I have already tried 1.5 both npm and the actual app. With 1.5 I can’t get anything to run. I’m loading device into a Genymotion sim.

Details

The key things i see is the badging act is null badging act: null and Cannot parse launchActivity from manifest.null

The manifest these so I don’t know why it isn’t working.

Link to Appium logs

info: [debug] badging act: null
info: --> GET /wd/hub/status {}
info: [debug] Responding to client with success: {"status":0,"value":{"build":{"version":"1.4.16","revision":"ae6877eff263066b26328d457bd285c0cc62430d"}},"sessionId":"d91cff79-1b03-44da-8ace-ed29dc3f2337"}
info: <-- GET /wd/hub/status 200 1.514 ms - 156 {"status":0,"value":{"build":{"version":"1.4.16","revision":"ae6877eff263066b26328d457bd285c0cc62430d"}},"sessionId":"d91cff79-1b03-44da-8ace-ed29dc3f2337"}
warn: May 06, 2016 11:24:57 AM brut.androlib.res.decoder.AXmlResourceParser getAttributeValue
WARNING: Could not decode attr value, using undecoded value instead: ns=android, name=autoVerify, value=0xffffffff
brut.androlib.err.UndefinedResObject: resource spec: 0x010104ee
    at brut.androlib.res.data.ResPackage.getResSpec(ResPackage.java:59)
    at brut.androlib.res.data.ResTable.getResSpec(ResTable.java:58)
    at brut.androlib.res.data.ResTable.getResSpec(ResTable.java:54)
    at brut.androlib.res.decoder.ResAttrDecoder.decode(ResAttrDecoder.java:36)
    at brut.androlib.res.decoder.AXmlResourceParser.getAttributeValue(AXmlResourceParser.java:369)
    at org.xmlpull.v1.wrapper.classic.XmlPullParserDelegate.getAttributeValue(XmlPullParserDelegate.java:69)
    at org.xmlpull.v1.wrapper.classic.StaticXmlSerializerWrapper.writeStartTag(StaticXmlSerializerWrapper.java:267)
    at org.xmlpull.v1.wrapper.classic.StaticXmlSerializerWrapper.event(StaticXmlSerializerWrapper.java:211)
    at brut.androlib.res.decoder.XmlPullStreamDecoder$1.event(XmlPullStreamDecoder.java:83)
    at brut.androlib.res.decoder.XmlPullStreamDecoder.decode(XmlPullStreamDecoder.java:141)
    at brut.androlib.res.decoder.XmlPullStreamDecoder.decodeManifest(XmlPullStreamDecoder.java:153)
    at brut.androlib.res.decoder.ResFileDecoder.decodeManifest(ResFileDecoder.java:131)
    at brut.androlib.res.AndrolibResources.decodeManifest(AndrolibResources.java:164)
    at io.appium.apktools.AndroidManifestActivityHelper.decodeManifestXML(AndroidManifestActivityHelper.java:27)
    at io.appium.apktools.Main.main(Main.java:33)

info: [debug] Cleaning up android objects
info: [debug] Cleaning up appium session
info: [debug] Error: Cannot parse launchActivity from manifest.null
    at [object Object].<anonymous> (/usr/local/lib/node_modules/appium/lib/devices/android/android-common.js:693:21)
    at ChildProcess.exithandler (child_process.js:742:7)
    at ChildProcess.emit (events.js:110:17)
    at maybeClose (child_process.js:1015:16)
    at Process.ChildProcess._handle.onexit (child_process.js:1087:5)
info: [debug] Responding to client with error: {"status":33,"value":{"message":"A new session could not be created. (Original error: Cannot parse launchActivity from manifest.null)","origValue":"Cannot parse launchActivity from manifest.null"},"sessionId":null}

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:22 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
sofakingcommented, Jul 20, 2016

Same issue here. Setting appPackage and appActivity helps. I guess that happened after we’ve increased targetSdk to 24, but not for sure. Also we’ve tried to rebuild appium_apk_tools.jar with 1.5.4 and 2.1.1 apktools, but failed. Same issue with 1.5.4, while it seems in 2.1.1 API has been dramatically changed and it’s impossible to even build with it.

2016-07-20 16:07:55:515 - [ADB] Extracting package and launch activity from manifest
2016-07-20 16:07:55:695 - [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 (/Users/aup/Documents/appium_1.5/node_modules/babel-runtime/regenerator/runtime.js:67:40)
    at GeneratorFunctionPrototype.invoke [as _invoke] (/Users/aup/Documents/appium_1.5/node_modules/babel-runtime/regenerator/runtime.js:315:22)
    at GeneratorFunctionPrototype.prototype.(anonymous function) [as next] (/Users/aup/Documents/appium_1.5/node_modules/babel-runtime/regenerator/runtime.js:100:21)
    at GeneratorFunctionPrototype.invoke (/Users/aup/Documents/appium_1.5/node_modules/babel-runtime/regenerator/runtime.js:136:37)
    at run (/Users/aup/Documents/appium_1.5/node_modules/babel-runtime/node_modules/core-js/library/modules/es6.promise.js:104:47)
    at /Users/aup/Documents/appium_1.5/node_modules/babel-runtime/node_modules/core-js/library/modules/es6.promise.js:115:28
    at flush (/Users/aup/Documents/appium_1.5/node_modules/babel-runtime/node_modules/core-js/library/modules/$.microtask.js:19:5)
    at _combinedTickCallback (node.js:370:9)
    at process._tickCallback (node.js:401:11)
 [Error: packageAndLaunchActivityFromManifest failed. Original error: Path must be a string. Received null]
2016-07-20 16:07:55:698 - [debug] [AndroidDriver] Shutting down Android driver
2016-07-20 16:07:55:699 - [AndroidDriver] Cannot shut down Android driver; it has already shut down
2016-07-20 16:07:55:700 - [MJSONWP] Encountered internal error running command: 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 (/Users/aup/Documents/appium_1.5/node_modules/babel-runtime/regenerator/runtime.js:67:40)
    at GeneratorFunctionPrototype.invoke [as _invoke] (/Users/aup/Documents/appium_1.5/node_modules/babel-runtime/regenerator/runtime.js:315:22)
    at GeneratorFunctionPrototype.prototype.(anonymous function) [as next] (/Users/aup/Documents/appium_1.5/node_modules/babel-runtime/regenerator/runtime.js:100:21)
    at GeneratorFunctionPrototype.invoke (/Users/aup/Documents/appium_1.5/node_modules/babel-runtime/regenerator/runtime.js:136:37)
    at run (/Users/aup/Documents/appium_1.5/node_modules/babel-runtime/node_modules/core-js/library/modules/es6.promise.js:104:47)
    at /Users/aup/Documents/appium_1.5/node_modules/babel-runtime/node_modules/core-js/library/modules/es6.promise.js:115:28
    at flush (/Users/aup/Documents/appium_1.5/node_modules/babel-runtime/node_modules/core-js/library/modules/$.microtask.js:19:5)
    at _combinedTickCallback (node.js:370:9)
    at process._tickCallback (node.js:401:11)
2reactions
gitseriouscommented, May 6, 2016

For Android 1.4.13 I figured it out. I have explicitiy send the app package + launch activity

Read more comments on GitHub >

github_iconTop Results From Across the Web

Android app unable to start activity componentinfo
Your null pointer exception seems to be on this line: String url = intent.getExtras().getString("userurl");. because intent.
Read more >
Android real device: Unable to launch/run more recent App ...
info: [debug] badging act: null > error: Failed to start an Appium session, err was: Error: Cannot parse launchActivity from manifest.null.
Read more >
Tasks and the back stack | Android Developers
A task is a collection of activities that users interact with when trying to do something in your app. These activities are arranged...
Read more >
Diff - platform/frameworks/base - android Git repositories
ComponentName); method public boolean unsetPreferredService(android.app. ... checkNotNull(listener, "TetheringEntitlementResultListener cannot be null.
Read more >
What happens behind the scenes as Appium installs and ...
Now we are going to examine the manifest for the package and launch activity. [ADB] badging package: io.appium.android.apis [ADB] badging act: ...
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