appium / appium-espresso-driver

Espresso integration for Appium
Apache License 2.0
193 stars 75 forks source link

Espresso server - spawn EINVAL Gradle error message #996

Closed pbdeguzman closed 7 months ago

pbdeguzman commented 7 months ago

Hi, I'm new here and I tried to use Appium Espresso Driver as my Appium Framework on my Appium Inspector.

image

image

Here's my logs: logs.txt

Is my setup correct? Or is there something missing on my end? Any help would be appreciated.

Thanks,

Patrick

KazuCocoa commented 7 months ago

I would try out the gradle command directly. Perhaps the espresso server dependencies needs to be coordinated. It is not only building step but also launching the test app via instrument process (in espresso framework) related

mykola-mokhnach commented 7 months ago

Seems related to https://github.com/appium/appium/issues/20008

pbdeguzman commented 7 months ago

Seems related to appium/appium#20008

Thanks to this I was able to proceed. Now I'm encountering socket hang up. I would try to read some issues regarding this. image

Logs: logs - socket hang up.txt

KazuCocoa commented 7 months ago

The latest issue was your espresso server and the app under test did not have the same signature.

[EspressoDriver@6f23]   "alwaysMatch": {
[EspressoDriver@6f23]     "platformName": "Android",
[EspressoDriver@6f23]     "appium:udid": "0123456789ABCDEF",
[EspressoDriver@6f23]     "appium:deviceName": "p2pro",
[EspressoDriver@6f23]     "appium:automationName": "Espresso",
[EspressoDriver@6f23]     "appium:appPackage": "com.global.wwca",
[EspressoDriver@6f23]     "appium:forceEspressoRebuild": "true",
[EspressoDriver@6f23]     "appium:showGradleLog": "true",
[EspressoDriver@6f23]     "appium:espressoBuildConfig": "{\"additionalAndroidTestDependencies\": [\"androidx.lifecycle:lifecycle-extensions:2.2.0\", \"com.google.android.material:material:1.6.1\",  \"androidx.constraintlayout:constraintlayout:2.1.4\"]}",
[EspressoDriver@6f23]     "appium:ensureWebviewsHavePages": true,
[EspressoDriver@6f23]     "appium:nativeWebScreenshot": true,
[EspressoDriver@6f23]     "appium:newCommandTimeout": 3600,
[EspressoDriver@6f23]     "appium:connectHardwareKeyboard": true
[EspressoDriver@6f23]   },

Both the server package and the application under test must be signed with the same digital signature.

https://github.com/appium/appium-espresso-driver?tab=readme-ov-file#requirements

for example https://github.com/appium/appium-espresso-driver?tab=readme-ov-file#app-signing would help, or use app capability instead of appPackage etc...

KazuCocoa commented 7 months ago

(closing as the original issue was fixed by the #997)