Skip to content

ignore missing scenes as CarPlay isn't connected anymore then#54

Merged
SamuelBrucksch merged 5 commits intomasterfrom
bugfix/no-op-when-scene-is-gone
Feb 24, 2026
Merged

ignore missing scenes as CarPlay isn't connected anymore then#54
SamuelBrucksch merged 5 commits intomasterfrom
bugfix/no-op-when-scene-is-gone

Conversation

@g4rb4g3
Copy link
Contributor

@g4rb4g3 g4rb4g3 commented Feb 24, 2026

Previously, if template or scene functions were called from the react-native side after CarPlay was disconnected, an exception was thrown. Now, these calls are treated as no-ops instead, since scenes are no longer available after disconnection and throwing an error serves no purpose.

@github-actions
Copy link
Contributor

packages/react-native-autoplay/ios/hybrid/HybridAutoPlay.swift:189

The use of '.await()' after 'try await' suggests a potential double-await or misuse of the custom Promise API, which could lead to unexpected behavior.

@github-actions
Copy link
Contributor

Static dictionary 'listeners' in HybridCluster is accessed and modified without proper thread synchronization, risking race conditions in concurrent scenarios.
packages/react-native-autoplay/ios/hybrid/HybridCluster.swift:

    private static var listeners = [ClusterEventName: [String: (_:String) -> Void]]()

@github-actions
Copy link
Contributor

Multiple potential thread-safety issues were detected due to unsynchronized static mutable state, and there is a possible misuse of promise awaiting in the pushTemplate function.

@Iternio-Planning-AB Iternio-Planning-AB deleted a comment from github-actions bot Feb 24, 2026
@SamuelBrucksch SamuelBrucksch merged commit 0fb67a2 into master Feb 24, 2026
2 checks passed
@SamuelBrucksch SamuelBrucksch deleted the bugfix/no-op-when-scene-is-gone branch February 24, 2026 13:46
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