Appium first test gone wrong, what is wrong and how to learn from it?

Greetings,

I am trying to make my first ever test with the help of the official Appium tutorial on this site for Node.JS for Android applications. I have set everything up correctly. Got my Android Emulator and Appium server up and running, I run the script and all of this comes out. I am clueless as nothing useful comes out of the logs for me.

C:\Appium>node index.js
2020-06-12T20:11:28.577Z INFO webdriverio: Initiate new session using the webdri
ver protocol
2020-06-12T20:11:28.583Z INFO webdriver: [POST] http://localhost:5000/wd/hub/ses
sion
2020-06-12T20:11:28.583Z INFO webdriver: DATA {
capabilities: {
alwaysMatch: {
platformName: ‘Android’,
platformVersion: ‘7.1.1’,
deviceName: ‘Android Emulator’,
app: ‘C:\Appium\ApiDemos.apk’,
appPackage: ‘io.appium.android.apis’,
appActivity: ‘.view.TextFields’,
automationName: ‘UiAutomator2’,
avd: ‘Nexus_5X_API_25’
},
firstMatch: [ {} ]
},
desiredCapabilities: {
platformName: ‘Android’,
platformVersion: ‘7.1.1’,
deviceName: ‘Android Emulator’,
app: ‘C:\Appium\ApiDemos.apk’,
appPackage: ‘io.appium.android.apis’,
appActivity: ‘.view.TextFields’,
automationName: ‘UiAutomator2’,
avd: ‘Nexus_5X_API_25’
}
}
2020-06-12T20:11:37.472Z WARN webdriver: Request failed with status 500 due to A
n unknown server-side error occurred while processing the command. Original erro
r: Error executing adbExec. Original error: ‘Command ‘C:\Users\OzrenX\AppData
\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s emulator-5554 install
-r C:\Users\OzrenX\AppData\Roaming\npm\node_modules\appium\node_modules
\appium-uiautomator2-server\apks\appium-uiautomator2-server-debug-androidTest.
apk’ exited with code 1’; Stderr: ‘adb: failed to install C:\Users\OzrenX\AppDat
a\Roaming\npm\node_modules\appium\node_modules\appium-uiautomator2-server\apks\a
ppium-uiautomator2-server-debug-androidTest.apk: Failure [INSTALL_PARSE_FAILED_N
O_CERTIFICATES: Failed to collect certificates from /data/app/vmdl2100846097.tmp
/base.apk: META-INF/CERT.SF has invalid digest for javax/annotation/meta/Exclusi
ve.java in /data/app/vmdl2100846097.tmp/base.apk]’; Code: ‘1’
2020-06-12T20:11:37.473Z INFO webdriver: Retrying 1/3
2020-06-12T20:11:37.475Z INFO webdriver: [POST] http://localhost:5000/wd/hub/ses
sion
2020-06-12T20:11:37.475Z INFO webdriver: DATA {
capabilities: {
alwaysMatch: {
platformName: ‘Android’,
platformVersion: ‘7.1.1’,
deviceName: ‘Android Emulator’,
app: ‘C:\Appium\ApiDemos.apk’,
appPackage: ‘io.appium.android.apis’,
appActivity: ‘.view.TextFields’,
automationName: ‘UiAutomator2’,
avd: ‘Nexus_5X_API_25’
},
firstMatch: [ {} ]
},
desiredCapabilities: {
platformName: ‘Android’,
platformVersion: ‘7.1.1’,
deviceName: ‘Android Emulator’,
app: ‘C:\Appium\ApiDemos.apk’,
appPackage: ‘io.appium.android.apis’,
appActivity: ‘.view.TextFields’,
automationName: ‘UiAutomator2’,
avd: ‘Nexus_5X_API_25’
}
}
2020-06-12T20:11:37.488Z ERROR webdriver: RequestError: write ECONNABORTED
at ClientRequest. (C:\Appium\node_modules\got\dist\source\core\in
dex.js:826:25)
at Object.onceWrapper (events.js:422:26)
at ClientRequest.emit (events.js:327:22)
at ClientRequest.EventEmitter.emit (domain.js:482:12)
at ClientRequest.origin.emit (C:\Appium\node_modules@szmarczak\http-timer\d
ist\source\index.js:39:20)
at Socket.socketErrorListener (_http_client.js:426:9)
at Socket.emit (events.js:315:20)
at Socket.EventEmitter.emit (domain.js:482:12)
at errorOrDestroy (internal/streams/destroy.js:108:12)
at onwriteError (_stream_writable.js:418:5)
at afterWriteDispatched (internal/stream_base_commons.js:154:25)
at writeGeneric (internal/stream_base_commons.js:145:3)
at Socket._writeGeneric (net.js:786:11)
at Socket._write (net.js:798:8)
at doWrite (_stream_writable.js:403:12)
at clearBuffer (_stream_writable.js:542:7)
at Socket.Writable.uncork (_stream_writable.js:338:7)
at ClientRequest.end (_http_outgoing.js:774:17)
at endRequest (C:\Appium\node_modules\got\dist\source\core\index.js:1105:28)
at PromisableRequest._final (C:\Appium\node_modules\got\dist\source\core\ind
ex.js:1115:13)
(node:6556) UnhandledPromiseRejectionWarning: Error: Failed to create session.
write ECONNABORTED
at startWebDriverSession (C:\Appium\node_modules\webdriver\build\utils.js:45
:11)
at processTicksAndRejections (internal/process/task_queues.js:97:5)
(node:6556) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This
error originated either by throwing inside of an async function without a catch
block, or by rejecting a promise which was not handled with .catch(). To termina
te the node process on unhandled promise rejection, use the CLI flag --unhandle d-rejections=strict (see Command-line API | Node.js v21.6.2 Documentation
ns_mode). (rejection id: 1)
(node:6556) [DEP0018] DeprecationWarning: Unhandled promise rejections are depre
cated. In the future, promise rejections that are not handled will terminate the
Node.js process with a non-zero exit code.

Same problem here, getting ERROR webdriver: RequestError: write ECONNABORTED

It’s been a while and I still cannot wrap my head around what kind of server-side error I am dealing with. I’ve been working with Appium using Maven projects in Java, but want to migrate to NodeJS.

desiredCapabilities: {
platformName: 'Android',
platformVersion: '5.1',
deviceName: 'Android Emulator',
app: 'ApiDemos.apk',
appPackage: 'io.appium.android.apis',
appActivity: '.view.TextFields',
automationName: 'UiAutomator2'

}
}
2020-07-30T01:52:07.456Z ERROR webdriver: RequestError: write ECONNABORTED
at ClientRequest. (E:\HelloAppium\node_modules\got\dist\source\core\index.js:890:25)
at Object.onceWrapper (events.js:300:26)
at ClientRequest.emit (events.js:215:7)
at ClientRequest.EventEmitter.emit (domain.js:475:20)
at ClientRequest.origin.emit (E:\HelloAppium\node_modules@szmarczak\http-timer\dist\source\index.js:39:20)
at Socket.socketErrorListener (_http_client.js:406:9)
at Socket.emit (events.js:210:5)
at Socket.EventEmitter.emit (domain.js:475:20)
at errorOrDestroy (internal/streams/destroy.js:108:12)
at onwriteError (_stream_writable.js:446:5)
at afterWriteDispatched (internal/stream_base_commons.js:150:25)
at writeGeneric (internal/stream_base_commons.js:141:3)
at Socket._writeGeneric (net.js:771:11)
at Socket._write (net.js:783:8)
at doWrite (_stream_writable.js:431:12)
at writeOrBuffer (_stream_writable.js:415:5)
at Socket.Writable.write (_stream_writable.js:305:11)
at ClientRequest._writeRaw (_http_outgoing.js:295:17)
at ClientRequest._send (_http_outgoing.js:271:15)
at ClientRequest.end (_http_outgoing.js:732:10)
(node:26268) UnhandledPromiseRejectionWarning: Error: Failed to create session.
write ECONNABORTED
at startWebDriverSession (E:\HelloAppium\node_modules\webdriver\build\utils.js:45:11)
at processTicksAndRejections (internal/process/task_queues.js:93:5)
(node:26268) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:26268) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

This is my error ? what could I do?