sudharsan-selvaraj / appium-dashboard-plugin

Appium plugin that provides complete test logs, video recording of test and device logs(logcat and syslogs) for easy debugging.
116 stars 28 forks source link

loading plugin gave an error that 'address already in use 0.0.0.0:4723' #3

Closed PramodKumarYadav closed 3 years ago

PramodKumarYadav commented 3 years ago

Hello Sudarshan, I installed appium 2.0 and then your plugin. Started appium 2.0 server and then as suggested tried to load the dashboard when I get this error.

I am working on a windows machine with powershell 7 terminal. below are logs from appium server.

PS C:\Program Files\PowerShell\7> appium --version
2.0.0-beta.18
PS C:\Program Files\PowerShell\7> appium
[Appium] Welcome to Appium v2.0.0-beta.18
[Appium] Non-default server args:
[Appium]   tmpDir: C:\Users\PRAMOD~1\AppData\Local\Temp
[Appium] Attempting to load driver uiautomator2...
[Appium] Attempting to load driver xcuitest...
[Appium] Appium REST http interface listener started on 0.0.0.0:4723
[Appium] Available drivers:
[Appium]   - uiautomator2@1.71.0 (automationName 'UiAutomator2')
[Appium]   - xcuitest@3.56.3 (automationName 'XCUITest')
[Appium] Available plugins:
[Appium]   - appium-dashboard@v1.0.0-beta.5
[Appium] No plugins activated. Use the --plugins flag with names of plugins to activate
[HTTP] --> GET /dashboard
[HTTP] {}
[debug] [HTTP] No route found for /dashboard
[HTTP] <-- GET /dashboard 404 55 ms - 211
[HTTP]
[HTTP] <-- GET /favicon.ico 200 1 ms - 1150
[HTTP]

and below are logs while trying to load plugin.

PS C:\Users\Pramod Yadav> appium --plugins=appium-dashboard
[Appium] Attempting to load plugin appium-dashboard...
[Appium] Welcome to Appium v2.0.0-beta.18
[Appium] Non-default server args:
[Appium]   plugins: {
[Appium]     0: appium-dashboard
[Appium]   }
[Appium]   tmpDir: C:\Users\PRAMOD~1\AppData\Local\Temp
[Appium] Attempting to load driver uiautomator2...
[Appium] Attempting to load driver xcuitest...
[appium-dashboard] Dashboard plugin is enabled and will be served at http://localhost:4723/dashboard
[appium-dashboard] If the appium server is started with different port other than 4723, then use the correct port number to access the device farm dashboard
[HTTP] Could not start REST http interface listener. The requested port may already be in use. Please make sure there is no other instance of this server running already.
[Appium] Could not configure Appium server. It's possible that a driver or plugin tried to update the server and failed. Original error: listen EADDRINUSE: address already in use 0.0.0.0:4723
[debug] [Appium] Error: listen EADDRINUSE: address already in use 0.0.0.0:4723
[debug] [Appium]     at Server.setupListenHandle [as _listen2] (node:net:1319:16)
[debug] [Appium]     at listenInCluster (node:net:1367:12)
[debug] [Appium]     at doListen (node:net:1505:7)
[debug] [Appium]     at processTicksAndRejections (node:internal/process/task_queues:84:21)
PS C:\Users\Pramod Yadav> appium --version
2.0.0-beta.18
PS C:\Users\Pramod Yadav>
PramodKumarYadav commented 3 years ago

My bad. I misinterpret the read me instructions and thought that appium --plugins=appium-dashboard is only loading plugin. But it does both (starting the appium server and loading the plugin).

Maybe you can make it more explicit it in the readme file? Reading now, its clear it is doing both but on first look, someone might misinterpret it as I did and also may try to start appium server apart from running this (which ofcourse will give this error).