Skip to content

Proper UI dump upload handling for mobile#672

Merged
mahbd merged 2 commits intodevfrom
mobile-ui-dump-upload
Mar 10, 2026
Merged

Proper UI dump upload handling for mobile#672
mahbd merged 2 commits intodevfrom
mobile-ui-dump-upload

Conversation

@mdshakib007
Copy link
Collaborator

PR Type

Refector

Overview

This PR fixed the issue of UI dump upload when we aren't in inspector. previously when we was in AI chatbot then chatbot doesn't get the updated dump always. so this issue is now fixed

@mdshakib007 mdshakib007 requested a review from mahbd March 8, 2026 03:32
@mdshakib007 mdshakib007 self-assigned this Mar 8, 2026
server/mobile.py Outdated

Check warning

Code scanning / CodeQL

Information exposure through an exception Medium

Stack trace information
flows to this location and may be exposed to an external user.

Copilot Autofix

AI 3 days ago

In general, the fix is to avoid returning raw exception messages or stack traces to the client. Instead, catch exceptions, log the full details on the server (using the existing logging module), and respond with a generic, non-sensitive error message.

For this specific case in server/mobile.py, we should modify the except Exception as e: block in is_ios_app_installed so that:

  • The exception is logged using logging.exception (which will include the stack trace in server logs).
  • The HTTP response no longer includes str(e); it should return a generic error indicator instead, such as {"installed": False, "error": "Internal error checking installation status"} or even just {"installed": False}.

No new imports are needed because logging is already imported at the top of the file. The change is localized to lines 803–804 of server/mobile.py, within the is_ios_app_installed function.

Suggested changeset 1
server/mobile.py

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/server/mobile.py b/server/mobile.py
--- a/server/mobile.py
+++ b/server/mobile.py
@@ -800,5 +800,6 @@
             return {"installed": True}
         
         return {"installed": False}
-    except Exception as e:
-        return {"installed": False, "error": str(e)}
+    except Exception:
+        logging.exception("Error while checking if iOS app is installed for simulator %s and bundle_id %s", sim_udid, bundle_id)
+        return {"installed": False, "error": "Internal error checking installation status"}
EOF
@@ -800,5 +800,6 @@
return {"installed": True}

return {"installed": False}
except Exception as e:
return {"installed": False, "error": str(e)}
except Exception:
logging.exception("Error while checking if iOS app is installed for simulator %s and bundle_id %s", sim_udid, bundle_id)
return {"installed": False, "error": "Internal error checking installation status"}
Copilot is powered by AI and may make mistakes. Always verify output.
…we are using hash for track changes on dom
@mahbd mahbd merged commit f99a5c8 into dev Mar 10, 2026
7 checks passed
@mahbd mahbd deleted the mobile-ui-dump-upload branch March 10, 2026 19:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants