-
-
Notifications
You must be signed in to change notification settings - Fork 352
feat: Improve Appium Inspector stability by handling USB/Wifi disconnection gracefully #2328
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Hi @eglitise @KazuCocoa @jlipps , |
|
Could you give us more context? Is this when you run appium on your local, and attach to the local Appium server? Then, the host machine's WiFi reconnection caused this issue you addressed? USB is... do you mean for example the appium session disconnected when the connected Android device, for example, disconnected from the host machine? |
|
@KazuCocoa Thanks for reaching out to me Yes, exactly. this happens when Appium is running locally and the device is attached either via local Appium server + WiFi connection or via USB cable. Previously, when such disconnects happened, the only option in Appium Inspector was to quit the broken session and start a fresh one, which interrupted the workflow. Here is the video link demonstrating the current Appium Inspector Existing Production Build of Appium Inspector With this change, instead of forcing a quit + restart, we now handle the session refresh internally. That way, users don’t need to manually restart the session, it will be recovered seamlessly. PR Build of Appium Inspector As a result, the overall experience is smoother and uninterrupted, allowing users to continue inspecting and interacting with elements seamlessly without worrying about connectivity glitches. |
|
Thank you for the explanation. I personally like not to hide too much like this, re-creating a new session behind the error, because this re-created session might have a different state before the error. So, I'm wondering if it makes sense to add an option to enable this kind of behavior, or add a button to do this reconnection behavior explicitly |
|
@KazuCocoa, Thanks for the suggestion.
|
app/common/renderer/components/SessionInspector/SessionInspector.jsx
Outdated
Show resolved
Hide resolved
app/common/renderer/components/SessionBuilder/CapabilityBuilderTab/CapabilityEditor.jsx
Outdated
Show resolved
Hide resolved
|
@mohangowdak Would it be possible to see the updated UI (preferably animated) before the PR is merged? |
@mykola-mokhnach, Thanks for asking. Here’s the updated UI, including a screenshots for reference.
|




When using Appium Inspector, we observed an issue where the inspector stops working if the USB/Wifi connection is lost after a session has started. In order to continue inspecting and interacting with other pages, users previously had to quit the session, re-enter all capabilities, and start a new session. This process was both time-consuming and inconvenient.
This PR introduces a fix to handle session loss more seamlessly. Now, whenever a debugging disconnection occurs, the old session is automatically quit, and the page source is refreshed. This allows users to continue their workflow without needing to exit the inspector window or manually reconfigure the session.
With this improvement, users can enjoy a smoother and more efficient experience when working with Appium Inspector.