achorein / expo-share-intent-demo

React Native Expo Share Intent Demonstration
90 stars 9 forks source link

Sharing into app with existing ShareIntent sometimes causes ShareIntent to lock up #32

Closed ChristopherGabba closed 8 months ago

ChristopherGabba commented 9 months ago

Describe the bug I've been using this great expo share intent demo now for a while and it's been working great. As we get closer to a production release of my application, I've been working hard to try and "break" things to see if it is production ready.

This bug comes when you use ShareIntent in sometimes rapid succession with one another. Below is a video of it occurring:

https://github.com/achorein/expo-share-intent-demo/assets/122328438/1118c062-9248-4bde-aa09-e6d72b0e0dd0

To Reproduce I've been able to reproduce this consistently with sharing from instagram, and can try with others if necessary. I'm following a very similar useShareIntent hook approach that is not much different at all from @achorein's Expo 49 demo.

Environment

``` OS: macOS 14.2.1 CPU: (10) arm64 Apple M2 Pro Memory: 927.44 MB / 16.00 GB Shell: version: "5.9" path: /bin/zsh Binaries: Node: version: 20.7.0 path: /opt/homebrew/bin/node Yarn: Not Found npm: version: 10.1.0 path: /opt/homebrew/bin/npm Watchman: version: 2023.09.04.00 path: /opt/homebrew/bin/watchman Managers: CocoaPods: version: 1.12.1 path: /opt/homebrew/bin/pod SDKs: iOS SDK: Platforms: - DriverKit 23.2 - iOS 17.2 - macOS 14.2 - tvOS 17.2 - visionOS 1.0 - watchOS 10.2 Android SDK: Not Found IDEs: Android Studio: 2022.2 AI-222.4459.24.2221.9862592 Xcode: version: 15.2/15C500b path: /usr/bin/xcodebuild Languages: Java: Not Found Ruby: version: 2.6.10 path: /usr/bin/ruby npmPackages: "@react-native-community/cli": Not Found react: installed: 18.2.0 wanted: 18.2.0 react-native: installed: 0.72.6 wanted: 0.72.6 react-native-macos: Not Found npmGlobalPackages: "*react-native*": Not Found Android: hermesEnabled: Not found newArchEnabled: Not found iOS: hermesEnabled: Not found newArchEnabled: Not found ```

Additional context Add any other context about the problem here.

achorein commented 9 months ago

🤔 that's seems to be a problem with react-native-receive-sharing-intent module. can you reproduce in a simulator ? that way we can retrieve some device log

ChristopherGabba commented 9 months ago

@achorein I've never gotten logs before, but I plugged in my developer build and hammered the share extension back and forth and got it to freeze up. Here was the output of the console that I was streaming:

``` default 17:24:16.717350-0600 runningboardd found a new process to check [app:68591] default 17:24:16.717551-0600 runningboardd found a new process to check [app:68591] default 17:24:16.717632-0600 SpringBoard cleaning up unpooled xpc conn to trustd 0x287304000 default 17:24:16.718014-0600 SpringBoard [0x287304000] invalidated on xpc_connection_cancel() default 17:24:16.718050-0600 SpringBoard Trust evaluate failure: [leaf IssuerCommonName LeafMarkerOid SubjectCommonName] default 17:24:16.718090-0600 runningboardd Saved endowment grant adding inheritance default 17:24:16.725219-0600 SpringBoard got event: Connection invalid default 17:24:16.726720-0600 SpringBoard [0x28337b560] activating connection: mach=true listener=false peer=false name=com.apple.misagent default 17:24:16.732872-0600 misagent [0xea6b0c4e0] activating connection: mach=false listener=false peer=true name=com.apple.misagent.peer.0xea6b0c4e0 default 17:24:16.736237-0600 backboardd EventStatistics.m:48 : 461392.15422: Info: 3 Digitizer since 461389.95267 (Fri Feb 2 17:24:14 2024) default 17:24:16.738281-0600 SharingUIService Received state update for 63278 (osservice, unknown-NotVisible default 17:24:16.749872-0600 symptomsd Received state update for 63278 (osservice, running-active-Visible default 17:24:16.750035-0600 symptomsd Received state update for 68599 (xpcservice:68591])>, running-active-Visible default 17:24:16.750133-0600 symptomsd Received state update for 33 (osservice, running-active-Visible default 17:24:16.765415-0600 useractivityd Received state update for 63278 (osservice, running-active-Visible default 17:24:16.765455-0600 useractivityd Received state update for 68599 (xpcservice:68591])>, running-active-Visible default 17:24:16.765573-0600 useractivityd Received state update for 33 (osservice, running-active-Visible default 17:24:16.769582-0600 webinspectord Received state update for 68599 (xpcservice:68591])>, running-active-Visible default 17:24:16.774805-0600 UserEventAgent Received state update for 68599 (xpcservice:68591])>, running-active-Visible default 17:24:16.775857-0600 UserEventAgent Received state update for 63278 (osservice, running-active-Visible default 17:24:16.776587-0600 UserEventAgent Received state update for 65955 (osservice, running-Visible default 17:24:16.777054-0600 UserEventAgent Received state update for 33 (osservice, running-active-Visible default 17:24:16.777384-0600 runningboardd Calculated state for osservice: running-active (role: UserInteractiveFocal) default 17:24:16.777415-0600 runningboardd Process: [osservice:63278] has changes in inheritances: {( , )} default 17:24:16.777517-0600 runningboardd [osservice:65955] Ignoring jetsam update because this process is not memory-managed default 17:24:16.777545-0600 runningboardd Current inheritances: {( , )} default 17:24:16.777659-0600 runningboardd [osservice:65955] Ignoring suspend because this process is not lifecycle managed default 17:24:16.777690-0600 runningboardd [osservice:65955] Ignoring role changes because this process is not role managed default 17:24:16.777720-0600 runningboardd Process: [osservice:65955] has changes in inheritances: {( , )} default 17:24:16.777750-0600 runningboardd [osservice:65955] Ignoring GPU update because this process is not GPU managed default 17:24:16.777810-0600 runningboardd Current inheritances: {( , )} default 17:24:16.777839-0600 runningboardd [osservice:65955] Ignoring memory limit update because this process is not memory-managed default 17:24:16.781632-0600 runningboardd Process: [xpcservice:68591])>:68599] has changes in inheritances: {( , , )} default 17:24:16.781781-0600 runningboardd [osservice:68600] Set jetsam priority to 0 [0] flag[1] default 17:24:16.781820-0600 runningboardd [osservice:68600] Suspending task. default 17:24:16.781850-0600 runningboardd Current inheritances: {( , , )} default 17:24:16.781888-0600 runningboardd Process: [osservice:68600] has changes in inheritances: (null) default 17:24:16.781932-0600 runningboardd Current inheritances: {( )} default 17:24:16.782321-0600 runningboardd Calculated state for osservice: running-suspended (role: None) default 17:24:16.783114-0600 Instagram Received state update for 63278 (osservice, running-active-Visible default 17:24:16.783170-0600 SpringBoard Received state update for 63278 (osservice, running-active-Visible default 17:24:16.783448-0600 runningboardd Calculated state for xpcservice:68591])>: running-active (role: UserInteractiveNonFocal) default 17:24:16.783699-0600 runningboardd [osservice:68600] Shutdown sockets (SVC) default 17:24:16.805197-0600 runningboardd [osservice:68600] Set darwin role to: None default 17:24:16.805284-0600 runningboardd 68600 Set Darwin GPU to "deny" default 17:24:16.806279-0600 runningboardd 68599 Set Darwin GPU to "allow" default 17:24:16.806464-0600 replayd Received state update for 63278 (osservice, running-active-Visible default 17:24:16.806518-0600 runningboardd [osservice:68600] check if suspended process is holding locks default 17:24:16.806579-0600 replayd Received state update for 68599 (xpcservice:68591])>, running-active-Visible default 17:24:16.810396-0600 runningboardd : copyJobWithHandle: created a job default 17:24:16.812324-0600 runningboardd Acquiring assertion targeting osservice from originator [xpcservice:68591])>:68599] with description attributes:[ , ]> default 17:24:16.812371-0600 runningboardd Assertion 32-68599-395387 (target:osservice) will be created as active default 17:24:16.812407-0600 runningboardd setting abstract target for to default 17:24:16.813524-0600 runningboardd [osservice:68600] Set jetsam priority to 40 [0] flag[1] default 17:24:16.813654-0600 runningboardd [osservice:68600] Resuming task. default 17:24:16.813752-0600 runningboardd [osservice:68600] Set darwin role to: NonUserInteractive default 17:24:16.813807-0600 runningboardd : copyJobWithHandle: created a job default 17:24:16.813847-0600 runningboardd Process: [osservice:68600] has changes in inheritances: (null) default 17:24:16.813987-0600 runningboardd Current inheritances: {( )} default 17:24:16.815092-0600 ShareExtension -[RTIInputSystemClient _modifyTextEditingAllowedForReason:notify:animated:modifyAllowancesBlock:completion:] Text editing allowed did change (editingAllowedAfter = NO) default 17:24:16.815272-0600 ShareExtension -[RTIInputSystemClient _endSessionWithID:forServices:options:completion:] End input session: default 17:24:16.815340-0600 Instagram : Ending background task with UIBackgroundTaskIdentifier: 10818014592 default 17:24:16.815762-0600 Instagram : Failed to fetch background task with identifier: 10818014592 default 17:24:16.816129-0600 Instagram Can't end BackgroundTask: no background task exists with identifier 10818014592 (0x284cdcd80), or it may have already been ended. Break in UIApplicationEndBackgroundTaskError() to debug. default 17:24:16.816596-0600 runningboardd Calculated state for osservice: running-active (role: NonUserInteractive) default 17:24:16.816875-0600 runningboardd Acquiring assertion targeting osservice from originator [xpcservice:68591])>:68599] with description attributes:[ , ]> default 17:24:16.816943-0600 runningboardd Assertion 32-68599-395388 (target:osservice) will be created as active default 17:24:16.817056-0600 runningboardd setting abstract target for to default 17:24:16.817404-0600 SpringBoard Received state update for 68600 (osservice, running-active-NotVisible default 17:24:16.817846-0600 SpringBoard active input destination is now ; information: default 17:24:16.817949-0600 runningboardd Invalidating assertion 32-68599-395387 (target:osservice) from originator [xpcservice:68591])>:68599] default 17:24:16.818036-0600 InputUI -[RTIInputSystemServiceSession endRemoteTextInputSessionWithID:options:completion:] End input session: default 17:24:16.820247-0600 runningboardd Invalidating assertion 32-68599-395388 (target:osservice) from originator [xpcservice:68591])>:68599] default 17:24:16.820550-0600 SpringBoard didAddExternalForegroundApplicationSceneHandle pid:68587 scene:com.apple.frontboard.systemappservices::FBSceneManager:sceneID%3Acom.g10developers.reelfeel-default now: default 17:24:16.820600-0600 SpringBoard policy: MRU target: default 17:24:16.820631-0600 SpringBoard policy: now generation: 22279; keyboardFocusTarget: ; recentlyUsedScenes: ; selectionPolicy: KeyboardArbiter; shouldSuppressRemoteDeferring: 0 default 17:24:16.820703-0600 backboardd soft cancel on display:
default 17:24:16.820831-0600 backboardd Got layout monitor transition. default 17:24:16.821943-0600 SpringBoard idleTimerDescriptorForBehavior: default 17:24:16.822208-0600 SpringBoard applying updated idle timer descriptor: reason:SBAppDidEnterForeground default 17:24:16.822249-0600 SpringBoard _applyActiveIdleTimerDescriptorForReason:"SBAppDidEnterForeground" enabled default 17:24:16.822282-0600 SpringBoard _setIdleTimerWithDescriptor: reason:"SBAppDidEnterForeground"] default 17:24:16.822345-0600 SpringBoard 0x281086280 reconfigured attention timeouts:[ 1; 20.00, 2; 22.00, 3; 30.00 ] default 17:24:16.822419-0600 SpringBoard <0x281085c80> - reconfigure attention client with configuration: (identifier: com.apple.springboard.GlobalBacklightIdleTimer samplingInterval: 4.00000 samplingDelay: 4.00000 sampleWhileAbsent: false retroactiveTimeoutMode: false, continuousFaceDetectMode: false, activateAttentionDetection: true, activateEyeRelief: false, activateMotionDetection: false, unityStream: false, attentionLostTimeouts: 30.00000, 22.00000, 20.00000 notificationMask NONE mask Button|Keyboard|Digitizer|Pointer|GameController|FaceDetect|MesaTouch|GenericGesture attentionLostEventMask Button|Keyboard|Digitizer|Pointer|GameController|MesaTouch|GenericGesture digitizerDisplayUUIDs (null) buttonDisplayUUIDs (null) keyboardDisplayUUIDs (null) tagIndex 27593) default 17:24:16.822458-0600 SpringBoard sending idleTimerDidRefresh: to default 17:24:16.822491-0600 SpringBoard sending idleTimerDidRefresh: to default 17:24:16.822525-0600 SpringBoard sending idleTimerDidRefresh: to default 17:24:16.822637-0600 SpringBoard [(FBSceneManager):sceneID:com.g10developers.reelfeel-default] scene content state changed: preparing default 17:24:16.822876-0600 runningboardd Invalidating assertion 32-52295-395341 (target:[app:68591]) from originator [osservice:52295] default 17:24:16.822989-0600 SpringBoard [0x2831b01a0:(FBSceneManager):sceneID:com.g10developers.reelfeel-default] Scene lifecycle state did change: Foreground default 17:24:16.823029-0600 SpringBoard [0x2831b01a0:(FBSceneManager):sceneID:com.g10developers.reelfeel-default] Scene activity mode did change: default. default 17:24:16.823060-0600 SpringBoard [0x2831b01a0:(FBSceneManager):sceneID:com.g10developers.reelfeel-default] Scene assertion state did change: ForegroundFocal. default 17:24:16.823093-0600 SpringBoard [app:68587] Workspace assertion state did change: ForegroundFocal (acquireAssertion = YES). default 17:24:16.828730-0600 mediaserverd <<<< FigCaptureDisplayLayoutMonitor >>>> -[FigCaptureDisplayLayoutMonitor _parseDisplayLayout:]: { bounds = {{0, 0}, {390, 844}}; interfaceOrientation = "portrait (1)"; backlightLevel = 100; elements = { ; ; } timestamp = February 2, 2024 at 5:24:16 PM CST;} default 17:24:16.828855-0600 backboardd RemoteClient.m:819 : 461392.25394: Info: reset attention lost timeout for com.apple.springboard.GlobalBacklightIdleTimer at 461392.25394 default 17:24:16.828934-0600 backboardd RemoteClient.m:434 : 461392.25398: Info: updated config (identifier: com.apple.springboard.GlobalBacklightIdleTimer samplingInterval: 4.00000 samplingDelay: 4.00000 sampleWhileAbsent: false retroactiveTimeoutMode: false continuousFaceDetectMode: false activateEyeRelief: false activateAttentionDetection: true activateMotionDetection: false attentionLostTimeouts: 20, 22, 30 notificationMask NONE mask AttentionLost|Button|Keyboard|Digitizer|Pointer|GameController|FaceDetect|MesaTouch|GenericGesture attentionLostEventMask AttentionLost|Button|Keyboard|Digitizer|Pointer|GameController|MesaTouch|GenericGesture digitizerDisplayUUIDs (null) buttonDisplayUUIDs (null) keyboardDisplayUUIDs (null) tagIndex 27593), old config (identifier: com.apple.springboard.GlobalBacklightIdleTimer samplingInterval: 4.00000 samplingDelay: 4.00000 sampleWhileAbsent: false retroactiveTimeoutMode: false continuousFaceDetectMode: false activateEyeRelief: false activateAtte<…> default 17:24:16.830097-0600 mediaserverd <<<< FigCaptureDisplayLayoutMonitor >>>> -[FigCaptureDisplayLayoutMonitor _updateObserversWithLayout:]: default 17:24:16.830951-0600 runningboardd Acquiring assertion targeting [app:68587] from originator [osservice:33] with description , , ]> default 17:24:16.831429-0600 runningboardd Assertion 32-33-395394 (target:[app:68587]) will be created as active default 17:24:16.857120-0600 runningboardd Deactivating delayed assertion 32-68587-395222 (target:[app:68587]) default 17:24:16.861651-0600 runningboardd Calculated state for app: running-active (role: UserInteractiveFocal) default 17:24:16.963080-0600 SharingUIService sceneOfRecord: sceneID: scene::SharingUI::64C29A8D8333 persistentID: scene::SharingUI::64C29A8D8333 default 17:24:16.963221-0600 SharingUIService updateSessionContext: default 17:24:16.964611-0600 SharingUIService creating view model default 17:24:16.965960-0600 SharingUIService update content with viewModel default 17:24:16.966516-0600 SharingUIService updating header action to no button default 17:24:16.969218-0600 SharingUIService publishing new dataSource:< excludeSectionTypes:SHSheetContentSectionTypeCustomView> for changeDetail:< snapshotChanged:NO airDropBadgeChanged:NO sectionsChanged:NO peopleCountChanged:NO forceReload:NO animateDifferences:NO modifiedIdentifiers:( )> default 17:24:16.969425-0600 SharingUIService The new data source published don't require to update the current snapshot. default 17:24:16.969772-0600 SharingUIService set sheet configuration: default 17:24:16.969806-0600 SpringBoard [com.g10developers.reelfeel] Foreground app will not request ephemeral notifications isAppClip: NO wantsEphemeral notifications: NO default 17:24:16.972194-0600 Instagram Disconnect requested for remote view controller: default 17:24:16.972425-0600 ShareExtension Reloading input views for: <(null): 0x0; > force: 0 default 17:24:16.972480-0600 ShareExtension _reloadInputViewsForKeyWindowSceneResponder: 0 force: 0, fromBecomeFirstResponder: 0 (automaticKeyboard: 0, reloadIdentifier: F8E7FA3C-BEBD-42FD-B0FA-17C4564AC121) default 17:24:16.972908-0600 nsurlsessiond Received state update for 68591 (app, running-active-Visible default 17:24:16.975368-0600 ShareExtension Reloading input views for: <(null): 0x0; > force: 0 default 17:24:16.976147-0600 Instagram sceneOfRecord: sceneID: sceneID:com.burbn.instagram-default persistentID: A155D1D4-4A75-4E1A-B960-7F0347C4F5A3 default 17:24:16.981431-0600 Instagram Scene target of keyboard event deferring environment did change: 0; scene: UIWindowScene: 0x10ed18f70; scene identity: com.apple.frontboard.systemappservices::FBSceneManager:sceneID%3Acom.burbn.instagram-default default 17:24:17.001394-0600 runningboardd Acquiring assertion targeting [xpcservice:68591])>:68599] from originator [osservice:33] with description ]> default 17:24:17.001456-0600 runningboardd Assertion 32-33-395406 (target:[xpcservice:68591])>:68599]) will be created as active default 17:24:17.004828-0600 ShareExtension Received request to prepare operator for disconnection: <_UIViewServiceViewControllerOperator: 0x140858000> default 17:24:17.004862-0600 ShareExtension : Will add backgroundTask with taskName: , expirationHandler: (null) default 17:24:17.004895-0600 ShareExtension : Reusing background assertion default 17:24:17.004925-0600 ShareExtension : Incrementing reference count for background assertion default 17:24:17.004956-0600 ShareExtension : Created background task . default 17:24:17.004985-0600 ShareExtension Prepare for disconnection of operator: <_UIViewServiceViewControllerOperator: 0x140858000> default 17:24:17.009149-0600 ShareExtension Removing session: <_UIViewServiceSessionActivityRecord: 0x2814ecb90; sessionIdentifier: 1150AC82-6EF2-46CF-9EDD-519756AFD54F; tracker: <_UIActiveViewServiceSessionTracker: 0x2837f24c0>; primaryHostedWindow: <_UIHostedWindow: 0x13fe40df0>> default 17:24:17.009224-0600 ShareExtension [0x2806c5680] Arbiter: received new most active view service session: (null) default 17:24:17.009813-0600 SharingUIService Should send trait collection or coordinate space update, interface style 1 -> 1, (scene::SharingUI::64C29A8D8333) default 17:24:17.010554-0600 SharingUIService updateSessionContext: default 17:24:17.010595-0600 SharingUIService creating view model default 17:24:17.010634-0600 SharingUIService update content with viewModel default 17:24:17.017844-0600 SharingUIService updating header action to no button default 17:24:17.019794-0600 backboardd new deferring rules for pid:68599: [] default 17:24:17.020328-0600 SharingUIService publishing new dataSource:< excludeSectionTypes:SHSheetContentSectionTypeCustomView> for changeDetail:< snapshotChanged:NO airDropBadgeChanged:NO sectionsChanged:NO peopleCountChanged:NO forceReload:NO animateDifferences:NO modifiedIdentifiers:( )> default 17:24:17.020389-0600 SharingUIService The new data source published don't require to update the current snapshot. default 17:24:17.020782-0600 SharingUIService set sheet configuration: default 17:24:17.020926-0600 CommCenter Creating service facility connection with default 17:24:17.021317-0600 runningboardd Assertions for process will expire soon: [osservice:68600] default 17:24:17.021744-0600 runningboardd Process: [osservice:33] has changes in inheritances: {( , , , )} default 17:24:17.021779-0600 runningboardd Current inheritances: {( , , , , )} default 17:24:17.021811-0600 runningboardd Queued lost inheritances: {( )} default 17:24:17.022273-0600 runningboardd Inheritance changeset: )}> default 17:24:17.022665-0600 runningboardd Process: [osservice:33]: Sending inheritance changeset: )}> default 17:24:17.022819-0600 runningboardd Process: [osservice:63278] has changes in inheritances: {( , )} default 17:24:17.022883-0600 runningboardd Current inheritances: {( , )} default 17:24:17.024677-0600 SharingUIService forceReloadInputViews default 17:24:17.024713-0600 ShareExtension [0x2806c5680] Arbiter: unregistering view service observer: <_UIViewServiceViewControllerOperator: 0x140858000>; with registrationToken: ; valid: NO> default 17:24:17.024746-0600 SharingUIService Reloading input views for: <(null): 0x0; > force: 1 default 17:24:17.024779-0600 ShareExtension [0x281ce52d0] Removing all event deferring rules for deallocating window: 0x13fe40df0; contextId: 0x92900D9F default 17:24:17.024842-0600 ShareExtension _UIScreenBasedWindowScene: 0x13fe19ec0: Window became key in scene: (nil): 0x0; contextId: 0x0: reason: _UIScreenBasedWindowScene: 0x13fe19ec0: Key window changed visibility: 0x13fe40df0 default 17:24:17.024925-0600 ShareExtension Key window needs update: 1; currentKeyWindowScene: 0x13fe19ec0; evaluatedKeyWindowScene: 0x13fe19ec0; currentApplicationKeyWindow: 0x13fe40df0; evaluatedApplicationKeyWindow: 0x0; reason: _UIScreenBasedWindowScene: 0x13fe19ec0: Key window changed visibility: 0x13fe40df0 default 17:24:17.025063-0600 ShareExtension Change to input view set: <; (empty)> default 17:24:17.025712-0600 Instagram Disconnecting: identifier: com.g10developers.reelfeel.share-extension; assertion: 0x283f3f8e0 default 17:24:17.025743-0600 Instagram Terminating interface and invalidating assertion: identifier: com.g10developers.reelfeel.share-extension; assertion: 0x283f3f8e0 default 17:24:17.025774-0600 Instagram Terminating interface and invalidating connection: identifier: com.g10developers.reelfeel.share-extension; assertion: 0x0 default 17:24:17.025801-0600 Instagram [0x138cc4f60] invalidated on xpc_connection_cancel() default 17:24:17.025830-0600 Instagram Finishing termination for remote view controller: default 17:24:17.025861-0600 Instagram [0x283209ea0] End remote event deferring requested for token: 0x283f20dc0; environments: 1; reason: SLRemoteComposeViewController: 0x10fa8e000: end keyboard environment deferring default 17:24:17.025937-0600 backboardd new deferring rules for pid:68591: [ -> reason: "27-defer: UIWindowScene: 0x10ed18f70: Begin event deferring in keyboardFocus for window: 0x10ec93420"] default 17:24:17.028574-0600 Instagram SLRemoteComposeViewController: (this may be harmless) viewServiceDidTerminateWithError: Error Domain=_UIViewServiceErrorDomain Code=1 "(null)" UserInfo={Terminated=disconnect method} default 17:24:17.030740-0600 ShareExtension : Ending background task with UIBackgroundTaskIdentifier: 29 default 17:24:17.031145-0600 Instagram Remote view controller invalidated: . default 17:24:17.031543-0600 Instagram Presentation environment invalidated: <_UISceneKeyboardProxyLayerForwardingPresentationViewService: 0x281e40460> Tracking remote view controller: default 17:24:17.031805-0600 Instagram Dealloc. default 17:24:17.031948-0600 kbd [0x770cce7a0] invalidated after getting a no-senders notification - client is gone default 17:24:17.032049-0600 ShareExtension : Ending task with identifier 29 and description: , _expireHandler: (null) default 17:24:17.033476-0600 ShareExtension : Decrementing reference count for assertion (used by background task with identifier 29: ) default 17:24:17.033528-0600 ShareExtension [0x280bc7b00] invalidated on xpc_connection_cancel() default 17:24:17.034903-0600 audioaccessoryd Audio is not playing on the system default 17:24:17.035098-0600 audioaccessoryd NearbyInfoActivityChanged: AL 11, current score is 6 (High) default 17:24:17.035851-0600 runningboardd Invalidating assertion 32-33-395400 (target:[osservice:68600]) from originator [osservice:33] default 17:24:17.035972-0600 mediaremoted MRDMediaServerNowPlayingDataSource skipping update with no now playing applications | cached audio format content info: { 68591 = ""; } default 17:24:17.037308-0600 runningboardd Acquiring assertion targeting [xpcservice:68591])>:68599] from originator [xpcservice:68591])>:68599] with description , ]> default 17:24:17.037343-0600 runningboardd Assertion 32-68599-395412 (target:[xpcservice:68591])>:68599]) will be created as inactive as start-time-defining assertions exist default 17:24:17.037856-0600 runningboardd Invalidating assertion 32-33-395402 (target:[app:68591]) from originator [osservice:33] default 17:24:17.129892-0600 runningboardd Invalidating assertion 32-33-395406 (target:[xpcservice:68591])>:68599]) from originator [osservice:33] default 17:24:17.130068-0600 WirelessRadioManagerd Received state update for 68600 (osservice, running-active-NotVisible error 17:24:17.135570-0600 kernel 85 duplicate reports for Sandbox: com.apple.WebKit.Networking(68602) deny(1) mach-lookup com.apple.diagnosticd error 17:24:17.135638-0600 kernel Sandbox: com.apple.WebKit.GPU(68625) deny(1) mach-lookup com.apple.diagnosticd error 17:24:17.135660-0600 kernel 1 duplicate report for Sandbox: com.apple.WebKit.GPU(68625) deny(1) mach-lookup com.apple.diagnosticd error 17:24:17.135684-0600 kernel Sandbox: com.apple.WebKit.Networking(68602) deny(1) mach-lookup com.apple.diagnosticd default 17:24:17.136887-0600 corespeechd -[CSSelfTriggerDetector _keywordAnalyzerNDAPI:hasResultAvailable:forChannel:] Output NDAPI self trigger best score = -0.577400 for channel = 1, client listening ? NO, audioSourceType 0 default 17:24:17.136918-0600 locationd Received state update for 68600 (osservice, running-active-NotVisible default 17:24:17.137896-0600 PerfPowerServices Received state update for 68600 (osservice, running-active-NotVisible default 17:24:17.138397-0600 replayd Received state update for 68600 (osservice, running-active-NotVisible default 17:24:17.138479-0600 replayd -[RPApplicationStateMonitor applicationStateDidChange:] userInfo { BKSApplicationStateAppIsFrontmost = 0; BKSApplicationStateExtensionKey = 0; SBApplicationStateDisplayIDKey = "com.apple.InputUI"; SBApplicationStateKey = 4; SBApplicationStateProcessIDKey = 68600; SBMostElevatedStateForProcessID = 4; } previousState { 33 = 8; } default 17:24:17.139134-0600 replayd -[RPApplicationStateMonitor notifyInAppSessionShouldPauseOrResume:] processIdentifer 68600 observer nonnil 0 default 17:24:17.139425-0600 audiomxd AudioSessionServerImp.mm:694 { "action":"set_property", "session":{"ID":"0xcc478f3","name":"com.apple.WebKit(68625)"}, "details":{"key":"PreferredAudioHardwareIOBufferFrameDuration","value":[0.08533333241939545]} } default 17:24:17.139456-0600 audiomxd -MXSession- -[MXSession(InterfaceImpl) setOrderedPropertiesInternal:usingErrorHandlingStrategy:outPropertiesErrors:]: Session 'sid:0xcc478f3, com.apple.WebKit(68625), 'prim'' is setting ordered properties batch default 17:24:17.143135-0600 audiomxd -MXDebugUtilities- CMSMDebugUtility_PrintCollection: VALUE: { PreferredAudioHardwareIOBufferFrameDuration = "0.08533333241939545"; } default 17:24:17.144603-0600 audiomxd -CMSessionMgr- MXCoreSessionSetProperty: Client 'sid:0xcc478f3, com.apple.WebKit(68625), 'prim'' setting buffer duration as 0.085 default 17:24:17.145555-0600 wifid Received state update for 68600 (osservice, running-active-NotVisible default 17:24:17.148077-0600 backboardd Layout ID: com.apple.springboard.home-screen-open-folder Bundle ID: com.apple.springboard.home-screen-open-folder Role: 6 default 17:24:17.148118-0600 backboardd Layout ID: sceneID:com.g10developers.reelfeel-default Bundle ID: com.g10developers.reelfeel Role: 1 default 17:24:17.150595-0600 dasd Received state update for 68591 (app, running-active-Visible default 17:24:17.151830-0600 ReelFeel sceneOfRecord: sceneID: sceneID:com.g10developers.reelfeel-default persistentID: B44A8FF9-6980-4DFD-BDC4-18A30FB7A020 default 17:24:17.152029-0600 ReelFeel Deactivation reason added: 5; deactivation reasons: 6144 -> 6176; animating application lifecycle event: 1 default 17:24:17.152064-0600 ReelFeel Ignoring already applied deactivation reason: 12; deactivation reasons: 6176 default 17:24:17.152318-0600 ReelFeel BackgroundSession <84D5A680-28B2-415A-8EA5-65F8EA03202F> client transitioning to foreground default 17:24:17.152765-0600 ReelFeel BackgroundSession <3454ED22-16E7-4656-A191-EF5FA93A0BFD> client transitioning to foreground default 17:24:17.153259-0600 ReelFeel <<<< PlayerRemoteXPC >>>> remoteXPCItem_updateLayerSync: [0x1592ffc70:0x143b694f0] updating layerSync with layersSubjectToImageQueueMediaTiming = , layersNotSubjectToImageQueueMediaTiming = (null) default 17:24:17.153300-0600 ReelFeel <<<< LayerSync >>>> FigLayerSynchronizerSetLayerArraysWithDeferredTransaction: (0x28007e3a0) set layersSubjectToImageQueueMediaTiming (); layersNotSubjectToImageQueueMediaTiming ((null)) default 17:24:17.153475-0600 mediaplaybackd <<<< FigFilePlayer >>>> playerfig_gracefullyAddImageQueues: cannot gracefully add image queues when not playing default 17:24:17.154278-0600 audiomxd -CMVAEndptMgr- vaemIsAC3EncodingSupported: Device doesn't support AC3 encoding, canEncodeToAC3 = NO, isAC3Supported = NO default 17:24:17.154340-0600 audiomxd -CMVAEndptMgr- vaemIsAC3EncodingSupported: Device doesn't support AC3 encoding, canEncodeToAC3 = NO, isAC3Supported = NO default 17:24:17.154938-0600 locationd {"msg":"invoking applicationStateChange handler", "StateChangeData":"{\n BKSApplicationStateAppIsFrontmost = 0;\n BKSApplicationStateExtensionKey = 0;\n SBApplicationStateDisplayIDKey = \"com.apple.InputUI\";\n SBApplicationStateKey = 4;\n SBApplicationStateProcessIDKey = 68600;\n SBMostElevatedStateForProcessID = 4;\n}"} default 17:24:17.155785-0600 audiomxd SpatializationManager.cpp:627 Returning cached value mEntitlementsCache[kUntrackedHeadphoneEntitlement][com.g10developers.reelfeel] = 0 default 17:24:17.155821-0600 audiomxd SpatializationManager.cpp:627 Returning cached value mEntitlementsCache[k3rdPartyUntrackedHeadphoneEntitlement][com.g10developers.reelfeel] = 0 default 17:24:17.157895-0600 audiomxd AQMEIO_HAL.cpp:1398 User-selected BT device category is 0 default 17:24:17.157989-0600 audiomxd SpatializationManager.cpp:183 Spatial info for session ID = 0xcc478f5: { App bundle ID = com.g10developers.reelfeel Route = built-in speakers contentType = 'moov' overrideSpatialMode = 0 preferencesVersion = 1 Spatial preferences: { prefersHeadTrackedSpatialization = 0 prefersLossyAudioSources = 0 maxSpatializableChannels = 16 alwaysSpatialize = 0 spatialAudioSourceCount = 1 spatialAudioSources = [ 'mlti' ] } } default 17:24:17.158780-0600 locationd {"msg":"Post Application State Change Notification", "notification":"BackgroundRunning", "pid":68600, "bundleId":"com.apple.InputUI"} default 17:24:17.159970-0600 runningboardd Invalidating assertion 32-63278-395410 (target:[osservice:63278]) from originator [osservice:63278] default 17:24:17.162750-0600 runningboardd Invalidating assertion 32-68591-395399 (target:[app:68591]) from originator [app:68591] default 17:24:17.162859-0600 runningboardd Invalidating assertion 32-68599-395401 (target:[xpcservice:68591])>:68599]) from originator [xpcservice:68591])>:68599] default 17:24:17.162965-0600 runningboardd Invalidating assertion 32-63278-395403 (target:[osservice:63278]) from originator [osservice:63278] default 17:24:17.163050-0600 audiomxd -CMVAEndptMgr- vaemIsAC3EncodingSupported: Device doesn't support AC3 encoding, canEncodeToAC3 = NO, isAC3Supported = NO ```
ChristopherGabba commented 9 months ago

Any idea if the logs above mean anything to you? @achorein

achorein commented 9 months ago

I think is a similar problem as #28, something in getShareExtensionViewControllerContent code is stucked.

Need to find out what and then update the patch patches/expo-config-plugin-ios-share-extension+0.0.4.patch

I didn't have the time to investigate right now, but will in 1 or 2 week.

achorein commented 9 months ago

@ChristopherGabba can you try with this patch ? should give us more logs (don't forget to clean node_modules) expo-config-plugin-ios-share-extension+0.0.4.patch

achorein commented 8 months ago

i cannot reproduce your problem, I tried sharing instagram multiple times and have no issue at all.

your error is about a crash of the iOS custom view (ShareControllerView), to see debug information we have to open the project into xcode (dir /ios) and attach xcode to the process. Menu : Debug > Attach to process by PID or Name... , then find ShareExtension and attach. This way we can have the true error in the xcode console.

ChristopherGabba commented 8 months ago

@achorein Thanks for looking into this, I just saw your response now! Let me work on this in the coming days so I can replicate it with logs!

ChristopherGabba commented 8 months ago

@achorein is there a reason that the patch link above is striked through? Trying to download it now.

achorein commented 8 months ago

@ChristopherGabba the patch add debug logs but introduce a bug as well :/. If you got the real error in xcode console the new patch is not needed anymore.

ChristopherGabba commented 8 months ago

Hello @achorein, I'm able to reproduce this error very reliably but here is the kicker...

It primarily comes after I update the app to a new version and then share into it without restarting the app. (for instance 1.0.0 to 1.0.1.) I personally think this is not a big deal. I'm going to close the issue. If it starts to become an issue, I can re-open it.