Repository navigation
Conversation
createAppIconsJson inserted app labels into the JSON without escaping. A label that contains a line break or a quote produces invalid JSON, so the Mac app fails to decode the whole appIcons message and drops it without any visible error. Every sync fails the same way, which leaves the Apps grid and the per-app notification list on the Mac empty. Example: the launcher label of kr.co.dgb.dgbm is "iM뱅크\n(아이엠)". Use the existing escape() helper for app names, and make escape() also handle tabs and the other control characters JSON does not allow unescaped.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
After pairing, the Mac app's Apps grid and the per-app list in Settings → Notifications & Alerts → App notifications stay empty, and "Mute app" has no effect. The Android side logs
✅ App icons sent successfully (199 icons with full app details), but nothing ever gets stored on the Mac (~/Library/Application Support/airsync-mac/AppIconsstays empty).Root cause
JsonUtil.createAppIconsJsoninsertsapp.appNameinto the JSON without escaping. Some apps ship a launcher label that contains a line break. For example,kr.co.dgb.dgbm(iM Bank) is labellediM뱅크\n(아이엠). A raw newline inside a JSON string is invalid, so the Mac'sJSONDecoderrejects the entireappIconsmessage. It only prints[websocket] JSON decode failedand drops the whole list.The Mac's saved package list therefore stays empty. Every connect and every manual sync re-sends the full list and fails the same way. Notifications are not affected because
createNotificationJsonalready usesescape().Fix
escape()helper for the app name increateAppIconsJson.escape()also escape\tand the other control characters below U+0020 (as\uXXXX). JSON does not allow those unescaped either.Testing
kr.co.dgb.dgbminstalled, "Sync App Icons" never populated the Mac app list. After removing only that app, the same sync stored all 198 apps and icons on the Mac.appIconsJSON that parses and round-trips the names.