Skip to content

fix(artifacts): Handle CFBundlePrimaryIcon as string in get_icon_info (LAUNCHPAD-73)#604

Open
sentry[bot] wants to merge 1 commit intomainfrom
seer/fix/launchpad-73-icon-info
Open

fix(artifacts): Handle CFBundlePrimaryIcon as string in get_icon_info (LAUNCHPAD-73)#604
sentry[bot] wants to merge 1 commit intomainfrom
seer/fix/launchpad-73-icon-info

Conversation

@sentry
Copy link
Copy Markdown
Contributor

@sentry sentry Bot commented Apr 24, 2026

This PR fixes an AttributeError: 'str' object has no attribute 'get' occurring in launchpad.process_message, specifically within the get_icon_info method of src/launchpad/artifacts/apple/zipped_xcarchive.py.

The root cause was that the Info.plist for some Apple artifacts (e.g., com.bouyguestelecom.btv) can define CFBundleIcons.CFBundlePrimaryIcon as a plain string (e.g., "App Icon") rather than a dictionary. The original code correctly guarded the CFBundleIconName lookup with an isinstance(primary_icon, dict) check, but the subsequent lookup for CFBundleIconFiles was performed unconditionally outside this guard.

This led to an AttributeError when .get() was called on a string object.

The fix involves moving the icon_files = primary_icon.get("CFBundleIconFiles", []) line and its subsequent isinstance check inside the if isinstance(primary_icon, dict): block. This ensures that the .get() method is only called when primary_icon is indeed a dictionary, preventing the crash. When primary_icon is a string, primary_icon_files will correctly remain an empty list, providing a graceful fallback.

Fixes LAUNCHPAD-73

@sentry
Copy link
Copy Markdown
Contributor Author

sentry Bot commented Apr 24, 2026

📲 Install Builds

Android

🔗 App Name App ID Version Configuration
Hacker News com.emergetools.hackernews 1.0.2 (13) Release

⚙️ launchpad-test-android Build Distribution Settings

@trevor-e trevor-e marked this pull request as ready for review April 24, 2026 19:36
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.

0 participants