I’m trying to set up this enviroment and when I click on Launch the Appium shows the following message:
<uses-permission android:name="android.**permission.INTERNET"/>
erro total
error: Could not pre-launch appium: Error: apk does not have INTERNET permissions. Selendroid needs internet permission to proceed, please check if you have <uses-permission android:name="android.**permission.INTERNET"/> in your AndroidManifest.xml
Here’s my configuration:
I’ve already checked my AndroidManifest.xml and I have this permission on it (detail here is that I use android.permission.INTERNET, without **).
I don’t know if I understand your first question, but yes, I’m using Appium client. And actually I don’t have desired capabilities yet, cause I can’t even Launch the server and start the emulator.
I’m seeing the same error starting today. Tried appium 1.2.3, 1.2.4 and 1.3 beta. The apk is not a problem - i believe something messed up during either
We did a bit of investigation while using the same APK file.
All works with this setup: Maverics + Appium 1.2.4
Fails on Internet permission with: Yosemite + 1.2.4 (newer commandline tools as well)
Any clues? Our manifest includes the Internet permission.
info: --> POST /wd/hub/session {“desiredCapabilities”:{“automationName”:“selendroid”,“app”:"/Users/tiwanaku/Downloads/_mob/ConcurMobile-debug.apk",“platformName”:“android”,“deviceName”:“selendroid”,“browserName”:"",“app-package”:“com.concur.breeze”,“app-activity”:“com.concur.mobile.corp.activity.Startup”}}
info: [debug] The following desired capabilities were provided, but not recognized by appium. They will be passed on to any other services running on this server. : app-package, app-activity
info: [debug] No appActivity desired capability or server param. Parsing from apk.
info: [debug] No appPackage desired capability or server param. Parsing from apk.
info: [debug] Using local app from desired caps: /Users/tiwanaku/Downloads/_mob/ConcurMobile-debug.apk
I noticed the same problem here in my machine, and the RegExp whtin adb.js is not working for aapt 21.0.2 (My version).
Here when I run the same command the value for INTERNET permission is:
uses-permission: name=‘android.permission.INTERNET’
but the regex in adb.js is uses-permission:‘android.permission.INTERNET’.
So what you can do is edit the file adb.js in …/appium/node_modules/appium-adb/lib/adb.js
Method ADB.prototype.hasInternetPermissionFromManifest look for var hasInternetPermission = new RegExp
and change the value for “uses-permission: name=‘android.permission.INTERNET’”.
After changing the regex, it worked for me.
Massanori_Takaki, many thanks! That worked for me.
Just in case, the full path to adb.js for mac users (appium installed from npm):
/usr/local/lib/node_modules/appium/node_modules/appium-adb/lib/
How do I edit this file on Windows. If I use Notepad to edit adb.js, javascript tells me that there is an error on line 3. I then have to reinstall appium to recover from the second error.
I’m seeing this same behavior with the Appium 1.3.3 desktop app binary on OS X 10.9.5. If I downgrade the Android Build Tools package to version 20, everything works fine.