saagarjha / Ensemble

Cast Mac windows to visionOS
https://testflight.apple.com/join/Pq1HzHqe
GNU Affero General Public License v3.0
847 stars 37 forks source link

Unable to connect to real device #24

Closed dimirey closed 4 months ago

dimirey commented 4 months ago

I've got the build running on both my macbook and my AVP. When i use the emulator the application runs fine. When I try to connect to the actual device, I can see my macbook show up in the application on the AVP. I try selecting the macbook from the menu, but i then see these errors in the xcode stack trace while nothing happens on the AVP.

Let me know if i can provide you any more details and i'll be happy to.

nw_path_evaluator_create_flow_inner failed NECP_CLIENT_ACTION_ADD_FLOW (null) evaluator parameters: tcp, tls, definite, server, attribution: developer, reuse local address, context: Default Network Context (private), proc: 9D3B567A-2A3F-343D-9CB6-A267186E26B9, use awdl, local address: 192.168.1.28:57668
nw_path_evaluator_create_flow_inner NECP_CLIENT_ACTION_ADD_FLOW B4B73350-601A-4035-BEDC-B15F908983F2 [1: Operation not permitted]
nw_endpoint_flow_setup_channel [C610 192.168.1.65:54362 initial channel-flow (satisfied (Path is satisfied), interface: en0[802.11], scoped, ipv4, dns, uses wifi)] failed to request add nexus flow
nw_endpoint_handler_create_from_protocol_listener [C610 192.168.1.65:54362 failed channel-flow (satisfied (Path is satisfied), interface: en0[802.11], scoped, ipv4, dns, uses wifi)] nw_endpoint_flow_pre_attach_protocols
nw_connection_create_from_protocol_on_nw_queue [C610] Failed to create connection from listener
nw_ip_channel_inbox_handle_new_flow nw_connection_create_from_protocol_on_nw_queue failed
nw_path_evaluator_create_flow_inner failed NECP_CLIENT_ACTION_ADD_FLOW (null) evaluator parameters: tcp, tls, definite, server, attribution: developer, reuse local address, context: Default Network Context (private), proc: 9D3B567A-2A3F-343D-9CB6-A267186E26B9, use awdl, local address: 192.168.1.28:57668
nw_path_evaluator_create_flow_inner NECP_CLIENT_ACTION_ADD_FLOW 3D803E7D-B718-4ECF-A40E-AC97B2FAB90A [1: Operation not permitted]
nw_endpoint_flow_setup_channel [C611 192.168.1.65:54376 initial channel-flow (satisfied (Path is satisfied), interface: en0[802.11], scoped, ipv4, dns, uses wifi)] failed to request add nexus flow
nw_endpoint_handler_create_from_protocol_listener [C611 192.168.1.65:54376 failed channel-flow (satisfied (Path is satisfied), interface: en0[802.11], scoped, ipv4, dns, uses wifi)] nw_endpoint_flow_pre_attach_protocols
nw_connection_create_from_protocol_on_nw_queue [C611] Failed to create connection from listener
nw_ip_channel_inbox_handle_new_flow nw_connection_create_from_protocol_on_nw_queue failed
nw_path_evaluator_create_flow_inner failed NECP_CLIENT_ACTION_ADD_FLOW (null) evaluator parameters: tcp, tls, definite, server, attribution: developer, reuse local address, context: Default Network Context (private), proc: 9D3B567A-2A3F-343D-9CB6-A267186E26B9, use awdl, local address: fdea:190d:76b1:8446:18d6:8ce4:89ba:b3d1.57668
nw_path_evaluator_create_flow_inner NECP_CLIENT_ACTION_ADD_FLOW DFB6BC68-214E-4E4F-A7B4-C9457E9CC7DA [1: Operation not permitted]
nw_endpoint_flow_setup_channel [C612 fdea:190d:76b1:8446:1c00:6a65:f10c:3bf0.57645 initial channel-flow (satisfied (Path is satisfied), interface: en0[802.11], scoped, ipv4, dns, uses wifi)] failed to request add nexus flow
nw_endpoint_handler_create_from_protocol_listener [C612 fdea:190d:76b1:8446:1c00:6a65:f10c:3bf0.57645 failed channel-flow (satisfied (Path is satisfied), interface: en0[802.11], scoped, ipv4, dns, uses wifi)] nw_endpoint_flow_pre_attach_protocols
nw_connection_create_from_protocol_on_nw_queue [C612] Failed to create connection from listener
nw_ip_channel_inbox_handle_new_flow nw_connection_create_from_protocol_on_nw_queue failed
nw_path_evaluator_create_flow_inner failed NECP_CLIENT_ACTION_ADD_FLOW (null) evaluator parameters: tcp, tls, definite, server, attribution: developer, reuse local address, context: Default Network Context (private), proc: 9D3B567A-2A3F-343D-9CB6-A267186E26B9, use awdl, local address: fdea:190d:76b1:8446:18d6:8ce4:89ba:b3d1.57668
nw_path_evaluator_create_flow_inner NECP_CLIENT_ACTION_ADD_FLOW D029CC8B-D6F2-4AE7-8A36-EC3E99B4B4DD [1: Operation not permitted]
nw_endpoint_flow_setup_channel [C613 fdea:190d:76b1:8446:1c00:6a65:f10c:3bf0.57646 initial channel-flow (satisfied (Path is satisfied), interface: en0[802.11], scoped, ipv4, dns, uses wifi)] failed to request add nexus flow
nw_endpoint_handler_create_from_protocol_listener [C613 fdea:190d:76b1:8446:1c00:6a65:f10c:3bf0.57646 failed channel-flow (satisfied (Path is satisfied), interface: en0[802.11], scoped, ipv4, dns, uses wifi)] nw_endpoint_flow_pre_attach_protocols
nw_connection_create_from_protocol_on_nw_queue [C613] Failed to create connection from listener
nw_ip_channel_inbox_handle_new_flow nw_connection_create_from_protocol_on_nw_queue failed
nw_path_evaluator_create_flow_inner failed NECP_CLIENT_ACTION_ADD_FLOW (null) evaluator parameters: tcp, tls, definite, server, attribution: developer, reuse local address, context: Default Network Context (private), proc: 9D3B567A-2A3F-343D-9CB6-A267186E26B9, use awdl, local address: 192.168.1.28:57668
nw_path_evaluator_create_flow_inner NECP_CLIENT_ACTION_ADD_FLOW 64450A77-E137-4BF6-948E-A79DC74B6B56 [1: Operation not permitted]
nw_endpoint_flow_setup_channel [C614 192.168.1.65:54377 initial channel-flow (satisfied (Path is satisfied), interface: en0[802.11], scoped, ipv4, dns, uses wifi)] failed to request add nexus flow
nw_endpoint_handler_create_from_protocol_listener [C614 192.168.1.65:54377 failed channel-flow (satisfied (Path is satisfied), interface: en0[802.11], scoped, ipv4, dns, uses wifi)] nw_endpoint_flow_pre_attach_protocols
nw_connection_create_from_protocol_on_nw_queue [C614] Failed to create connection from listener
nw_ip_channel_inbox_handle_new_flow nw_connection_create_from_protocol_on_nw_queue failed
nw_path_evaluator_create_flow_inner failed NECP_CLIENT_ACTION_ADD_FLOW (null) evaluator parameters: tcp, tls, definite, server, attribution: developer, reuse local address, context: Default Network Context (private), proc: 9D3B567A-2A3F-343D-9CB6-A267186E26B9, use awdl, local address: fdea:190d:76b1:8446:18d6:8ce4:89ba:b3d1.57668
nw_path_evaluator_create_flow_inner NECP_CLIENT_ACTION_ADD_FLOW 67149F9C-EFF8-4992-9D68-40CBF8BB2D0C [1: Operation not permitted]
nw_endpoint_flow_setup_channel [C615 fdea:190d:76b1:8446:1c00:6a65:f10c:3bf0.57647 initial channel-flow (satisfied (Path is satisfied), interface: en0[802.11], scoped, ipv4, dns, uses wifi)] failed to request add nexus flow
nw_endpoint_handler_create_from_protocol_listener [C615 fdea:190d:76b1:8446:1c00:6a65:f10c:3bf0.57647 failed channel-flow (satisfied (Path is satisfied), interface: en0[802.11], scoped, ipv4, dns, uses wifi)] nw_endpoint_flow_pre_attach_protocols
nw_connection_create_from_protocol_on_nw_queue [C615] Failed to create connection from listener
nw_ip_channel_inbox_handle_new_flow nw_connection_create_from_protocol_on_nw_queue failed
nw_path_evaluator_create_flow_inner failed NECP_CLIENT_ACTION_ADD_FLOW (null) evaluator parameters: tcp, tls, definite, server, attribution: developer, reuse local address, context: Default Network Context (private), proc: 9D3B567A-2A3F-343D-9CB6-A267186E26B9, use awdl, local address: fdea:190d:76b1:8446:18d6:8ce4:89ba:b3d1.57668
nw_path_evaluator_create_flow_inner NECP_CLIENT_ACTION_ADD_FLOW D876D2CC-C056-4542-BA86-763EC57F36D7 [1: Operation not permitted]
nw_endpoint_flow_setup_channel [C616 fdea:190d:76b1:8446:1c00:6a65:f10c:3bf0.57639 initial channel-flow (satisfied (Path is satisfied), interface: en0[802.11], scoped, ipv4, dns, uses wifi)] failed to request add nexus flow
nw_endpoint_handler_create_from_protocol_listener [C616 fdea:190d:76b1:8446:1c00:6a65:f10c:3bf0.57639 failed channel-flow (satisfied (Path is satisfied), interface: en0[802.11], scoped, ipv4, dns, uses wifi)] nw_endpoint_flow_pre_attach_protocols
nw_connection_create_from_protocol_on_nw_queue [C616] Failed to create connection from listener
nw_ip_channel_inbox_handle_new_flow nw_connection_create_from_protocol_on_nw_queue failed
austinarchibald commented 4 months ago

Don't know why, but it works for me! I did enable Screen Recording and Accessibility permissions in macOS Settings > Privacy & Security. Wasn't sure if it was required. It paired without me even entering a code once apps on vOS and macOS were open at the same time, probably because it's paired via xcode anyways. Then Ensemble on vOS shows all my windows on my mac, then I can add them as single windows on my Vision Pro. Limited testing, but it's working great so far!

dimirey commented 4 months ago

I've updated my mac to the latest version of macOS, and i have a different stacktrace:

Unable to simultaneously satisfy constraints.
    Probably at least one of the constraints in the following list is one you don't want. 
    Try this: 
        (1) look at each constraint and try to figure out which you don't expect; 
        (2) find the code that added the unwanted constraint or constraints and fix it. 
(
    "<NSLayoutConstraint:0x28118eee0 UILayoutGuide:0x280b297a0'TitleViewGuide(0x10602e920)'.trailing <= UILayoutGuide:0x280b29b20'UIViewLayoutMarginsGuide'.trailing   (active)>",
    "<NSLayoutConstraint:0x28118ee90 UILayoutGuide:0x280b297a0'TitleViewGuide(0x10602e920)'.leading >= UILayoutGuide:0x280b29b20'UIViewLayoutMarginsGuide'.leading   (active)>",
    "<NSLayoutConstraint:0x2811e1b80 'UIView-Encapsulated-Layout-Width' _UINavigationBarContentView:0x10602e5a0'Available Macs'.width == 0   (active)>",
    "<NSLayoutConstraint:0x28118ed00 'UIView-leftMargin-guide-constraint' H:|-(24)-[UILayoutGuide:0x280b29b20'UIViewLayoutMarginsGuide'](LTR)   (active, names: '|':_UINavigationBarContentView:0x10602e5a0'Available Macs' )>",
    "<NSLayoutConstraint:0x28118eda0 'UIView-rightMargin-guide-constraint' H:[UILayoutGuide:0x280b29b20'UIViewLayoutMarginsGuide']-(24)-|(LTR)   (active, names: '|':_UINavigationBarContentView:0x10602e5a0'Available Macs' )>"
)

Will attempt to recover by breaking constraint 
<NSLayoutConstraint:0x28118eee0 UILayoutGuide:0x280b297a0'TitleViewGuide(0x10602e920)'.trailing <= UILayoutGuide:0x280b29b20'UIViewLayoutMarginsGuide'.trailing   (active)>

Make a symbolic breakpoint at UIViewAlertForUnsatisfiableConstraints to catch this in the debugger.
The methods in the UIConstraintBasedLayoutDebugging category on UIView listed in <UIKitCore/UIView.h> may also be helpful.
Unable to simultaneously satisfy constraints.
    Probably at least one of the constraints in the following list is one you don't want. 
    Try this: 
        (1) look at each constraint and try to figure out which you don't expect; 
        (2) find the code that added the unwanted constraint or constraints and fix it. 
(
    "<NSLayoutConstraint:0x28118dd10 UILayoutGuide:0x280b28b60'TitleViewGuide(0x106023650)'.trailing <= UILayoutGuide:0x280b28ee0'UIViewLayoutMarginsGuide'.trailing   (active)>",
    "<NSLayoutConstraint:0x28118dcc0 UILayoutGuide:0x280b28b60'TitleViewGuide(0x106023650)'.leading >= UILayoutGuide:0x280b28ee0'UIViewLayoutMarginsGuide'.leading   (active)>",
    "<NSLayoutConstraint:0x2811e36b0 'UIView-Encapsulated-Layout-Width' _UINavigationBarContentView:0x10601f540.width == 0   (active)>",
    "<NSLayoutConstraint:0x28118db30 'UIView-leftMargin-guide-constraint' H:|-(24)-[UILayoutGuide:0x280b28ee0'UIViewLayoutMarginsGuide'](LTR)   (active, names: '|':_UINavigationBarContentView:0x10601f540 )>",
    "<NSLayoutConstraint:0x28118dbd0 'UIView-rightMargin-guide-constraint' H:[UILayoutGuide:0x280b28ee0'UIViewLayoutMarginsGuide']-(24)-|(LTR)   (active, names: '|':_UINavigationBarContentView:0x10601f540 )>"
)

Will attempt to recover by breaking constraint 
<NSLayoutConstraint:0x28118dd10 UILayoutGuide:0x280b28b60'TitleViewGuide(0x106023650)'.trailing <= UILayoutGuide:0x280b28ee0'UIViewLayoutMarginsGuide'.trailing   (active)>

Make a symbolic breakpoint at UIViewAlertForUnsatisfiableConstraints to catch this in the debugger.
The methods in the UIConstraintBasedLayoutDebugging category on UIView listed in <UIKitCore/UIView.h> may also be helpful.
nw_socket_initialize_socket [C1:2] setsockopt SO_NECP_CLIENTUUID failed [22: Invalid argument]
nw_socket_initialize_socket setsockopt SO_NECP_CLIENTUUID failed [22: Invalid argument]
nw_socket_copy_info [C1:2] getsockopt TCP_INFO failed [102: Operation not supported on socket]
nw_socket_copy_info getsockopt TCP_INFO failed [102: Operation not supported on socket]
AggregateDictionary is deprecated and has been removed. Please migrate to Core Analytics.
Class for component AccessibilityComponent already registered
Class for component ImageBasedLightComponent already registered
Component Shadow already registered
Component Shadow already registered
[USDImportService] RealityIO USDImportService instantiated.  RealityIO will be used to service load requests from USDImportService.
edrhater commented 4 months ago

I've updated my mac to the latest version of macOS, and i have a different stacktrace:


Unable to simultaneously satisfy constraints.

  Probably at least one of the constraints in the following list is one you don't want. 

  Try this: 

      (1) look at each constraint and try to figure out which you don't expect; 

      (2) find the code that added the unwanted constraint or constraints and fix it. 

(

    "<NSLayoutConstraint:0x28118eee0 UILayoutGuide:0x280b297a0'TitleViewGuide(0x10602e920)'.trailing <= UILayoutGuide:0x280b29b20'UIViewLayoutMarginsGuide'.trailing   (active)>",

    "<NSLayoutConstraint:0x28118ee90 UILayoutGuide:0x280b297a0'TitleViewGuide(0x10602e920)'.leading >= UILayoutGuide:0x280b29b20'UIViewLayoutMarginsGuide'.leading   (active)>",

    "<NSLayoutConstraint:0x2811e1b80 'UIView-Encapsulated-Layout-Width' _UINavigationBarContentView:0x10602e5a0'Available Macs'.width == 0   (active)>",

    "<NSLayoutConstraint:0x28118ed00 'UIView-leftMargin-guide-constraint' H:|-(24)-[UILayoutGuide:0x280b29b20'UIViewLayoutMarginsGuide'](LTR)   (active, names: '|':_UINavigationBarContentView:0x10602e5a0'Available Macs' )>",

    "<NSLayoutConstraint:0x28118eda0 'UIView-rightMargin-guide-constraint' H:[UILayoutGuide:0x280b29b20'UIViewLayoutMarginsGuide']-(24)-|(LTR)   (active, names: '|':_UINavigationBarContentView:0x10602e5a0'Available Macs' )>"

)

Will attempt to recover by breaking constraint 

<NSLayoutConstraint:0x28118eee0 UILayoutGuide:0x280b297a0'TitleViewGuide(0x10602e920)'.trailing <= UILayoutGuide:0x280b29b20'UIViewLayoutMarginsGuide'.trailing   (active)>

Make a symbolic breakpoint at UIViewAlertForUnsatisfiableConstraints to catch this in the debugger.

The methods in the UIConstraintBasedLayoutDebugging category on UIView listed in <UIKitCore/UIView.h> may also be helpful.

Unable to simultaneously satisfy constraints.

  Probably at least one of the constraints in the following list is one you don't want. 

  Try this: 

      (1) look at each constraint and try to figure out which you don't expect; 

      (2) find the code that added the unwanted constraint or constraints and fix it. 

(

    "<NSLayoutConstraint:0x28118dd10 UILayoutGuide:0x280b28b60'TitleViewGuide(0x106023650)'.trailing <= UILayoutGuide:0x280b28ee0'UIViewLayoutMarginsGuide'.trailing   (active)>",

    "<NSLayoutConstraint:0x28118dcc0 UILayoutGuide:0x280b28b60'TitleViewGuide(0x106023650)'.leading >= UILayoutGuide:0x280b28ee0'UIViewLayoutMarginsGuide'.leading   (active)>",

    "<NSLayoutConstraint:0x2811e36b0 'UIView-Encapsulated-Layout-Width' _UINavigationBarContentView:0x10601f540.width == 0   (active)>",

    "<NSLayoutConstraint:0x28118db30 'UIView-leftMargin-guide-constraint' H:|-(24)-[UILayoutGuide:0x280b28ee0'UIViewLayoutMarginsGuide'](LTR)   (active, names: '|':_UINavigationBarContentView:0x10601f540 )>",

    "<NSLayoutConstraint:0x28118dbd0 'UIView-rightMargin-guide-constraint' H:[UILayoutGuide:0x280b28ee0'UIViewLayoutMarginsGuide']-(24)-|(LTR)   (active, names: '|':_UINavigationBarContentView:0x10601f540 )>"

)

Will attempt to recover by breaking constraint 

<NSLayoutConstraint:0x28118dd10 UILayoutGuide:0x280b28b60'TitleViewGuide(0x106023650)'.trailing <= UILayoutGuide:0x280b28ee0'UIViewLayoutMarginsGuide'.trailing   (active)>

Make a symbolic breakpoint at UIViewAlertForUnsatisfiableConstraints to catch this in the debugger.

The methods in the UIConstraintBasedLayoutDebugging category on UIView listed in <UIKitCore/UIView.h> may also be helpful.

nw_socket_initialize_socket [C1:2] setsockopt SO_NECP_CLIENTUUID failed [22: Invalid argument]

nw_socket_initialize_socket setsockopt SO_NECP_CLIENTUUID failed [22: Invalid argument]

nw_socket_copy_info [C1:2] getsockopt TCP_INFO failed [102: Operation not supported on socket]

nw_socket_copy_info getsockopt TCP_INFO failed [102: Operation not supported on socket]

AggregateDictionary is deprecated and has been removed. Please migrate to Core Analytics.

Class for component AccessibilityComponent already registered

Class for component ImageBasedLightComponent already registered

Component Shadow already registered

Component Shadow already registered

[USDImportService] RealityIO USDImportService instantiated.  RealityIO will be used to service load requests from USDImportService.

Same here

saagarjha commented 4 months ago

I just added an entitlement to the Mac app that might help with this. Can you try pulling the latest code and seeing if that does anything?

BenArtes commented 4 months ago

I had these same issues and the latest update resolved them. (Now stuck at Loading Windows forever.)

ssgelm commented 4 months ago

Yep working for me too!

saagarjha commented 4 months ago

I think that's enough for me to feel comfortable closing this. If anyone else is seeing this let me know and I'll reopen it :)