Skip to content
This repository has been archived by the owner on Apr 25, 2023. It is now read-only.

fix: request to remote server not sent in case of fresh installation #1732

Merged

Conversation

huzaifaiftikhar
Copy link
Contributor

  1. If Appium desktop is installed and we add a cloud provider then the "Attach to session" tab doesn't list any running sessions. This happens because the request to the remote server is never sent as the host, port & the path for the selected server type is not yet defined in the session variable. These values are populated only once we trigger a new session via AD for the newly added cloud provider, as it was only being set in the NEW_SESSION_REQUESTED event.
  2. To fix the above issue I have created a method getServerInfo that returns the server information for the currently selected server type. This method either returns the values from the session variable or returns the default value.
  3. The method getServerInfo is also used for both the NEW_SESSION_REQUESTED and GET_SESSIONS_REQUESTED events.
  4. For reproducing on an already installed AD on macOS, run the following command rm ~/Library/Application\ Support/appium-desktop/Settings (⚠️ This will remove the saved settings so it might be better to take a backup of this file). After deleting restart AD -> add a cloud provider -> go to "Attach to Session" tab -> click on refresh button. Even if there are running sessions for your account on the remote server AD fails to list them.

@huzaifaiftikhar
Copy link
Contributor Author

@KazuCocoa Can you review this as well?

@KazuCocoa
Copy link
Member

Yes, I would do but haven't done yet.

Copy link
Member

@KazuCocoa KazuCocoa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems good, overall. Will merge this soon

@KazuCocoa KazuCocoa merged commit 86b3d7c into appium:1.20 Mar 19, 2021
@huzaifaiftikhar huzaifaiftikhar deleted the fix_running_sessions_not_listed branch March 19, 2021 06:17
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
2 participants