android-manifest.js can throw null path exception
See original GitHub issueThe problem
When try to run Android test with the APK file whose AndroidManifest.xml does contain any activity information, the app installation to the real device fails with the error Error: packageAndLaunchActivityFromManifest failed. Original error: Path must be a string. Received null
.
After investigating android-manifest.js, now I think line 71 can cause the error because AndroidDriver.adb.tmpDir property is not set anywhere and remains null. I think only this line can cause the error like the above, and this error would be resolved passing some appropriate tmpdir from AndroidDriver initialization logic.
- Related commit: https://github.com/appium/appium-adb/commit/fd68e42ff85ed6a92a536efd3113ab00389ebbc1
- Similar issue: #6499 , #6695
Environment
- Appium 1.6.4
- OS X Sierra 10.12.4
- node7.4
- Android API 25.0.2
- Real device
- Appium CLI
Link to Appium logs
https://gist.github.com/NozomiIto/4e56c74e934502186d4ddb80236f8590
Issue Analytics
- State:
- Created 6 years ago
- Comments:12 (6 by maintainers)
Top Results From Across the Web
Error: open failed: ENOENT (No such file or directory)
A quick fix for that is to add this code in the AndroidManifest.xml file: ... bitmap, imageFileName, null); Uri uriimage = Uri.parse(path); //...
Read more >Fix "java.lang.NullPointerException" in Android Studio
Try: The Try block executes a piece of code that is likely to crash or a place where the exception occurs. · Catch:...
Read more >PackageManager - Android Developers
This exception is thrown when a given package, application, or component name cannot be found. interface, PackageManager.OnChecksumsReadyListener.
Read more >Infographic: 11 Most Common Android Errors and How to Fix ...
1. ActivityNotFoundException ... This exception is thrown when a call to startActivity fails because the Activity cannot be found. Usually, this means you...
Read more >Errors | Node.js v19.3.0 Documentation
Any use of the JavaScript throw mechanism will raise an exception that must ... If present, error.path is a string containing a relevant...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I created the PR for the fix above.
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.