With VPN switched on no messages can be seen on console and can not connect with Xcode

When I tested with my iPhone SE(1st generation, iOS 14.0.1) I found that with the VPN(NETunnelProvider) switched on there are no messages shown on the console and also on Xcode it shows iPhone(unavailable). After I switched off the VPN it came back to normal.

Is there anyone else has this problem?
This is odd. Are you debugging with a network connected device or a device connected via lightning cable? If network connected, try with a lightning cable.

Matt Eaton
DTS Engineering, CoreOS
meaton3@apple.com
Thanks for your reply Matt.
I was using a USB cable to connect the iOS device with the MBP's left side USB port.
The mac OS version is Catalina 10.15.7.
Xcode 12.0.1.
If you are getting messages about your container app then there is most likely an issue with your logs making it to the Console.app. Make sure you are using os_log in your Network Extension and run a few tests just to make sure a simple log is being output to the Console. If you are not seeing ANY logs for your device then this is a bug report. You should see at least some logs for your device. If you open a bug report please follow up with the Feedback ID.


Matt Eaton
DTS Engineering, CoreOS
meaton3@apple.com
Thanks Matt.
Just raised a bug report: FB8815876 (With VPN switched on no messages can be seen on console and can not connect with Xcode)

Also add more details here for others to see if they can reproduce the same issue step by step.


Description of the issue:

When I tested with my iPhone SE(1st generation, iOS 14.0.1) on Mac OS Catalina 10.15.7 / Xcode 12.0.1 I found that with the VPN(NETunnelProvider, 'includeAllNetworks' set to be true) switched on there are no messages being shown on the console, and also on Xcode it shows 'iPhone(unavailable)'. After I switched off the VPN it came back to normal.
I was using a USB cable to connect the iOS device with the MBP's left side USB port.

Steps to reproduce:
  1. An iPhone SE(1st generation, iOS 14.0.1) / Mac OS Catalina 10.15.7 / Xcode 12.0.1;

  2. A VPN application coded with NETunnelProvider, set 'includeAllNetworks' to be true (if it's false then cannot reproduce this issue);

  3. Install the VPN application on the iPhone and switch it on;

  4. Connect the iPhone to the Mac Book Pro with a USB cable;

  5. Only after the iPhone is connected with the Mac Book Pro then(this is critical to reproduce the issue)

  6. open 'Console' on the Mac Book Pro and check the messages on the iPhone;

  7. Open 'Xcode' to select a device to run.

Expect results:
  1. On 'Console' could see the messages;

  2. On 'Xcode' could see the 'iPhone';

Actual results:
  1. On 'Console' there are no messages output;

  2. On 'Xcode' it shows iPhone(unavailable).

With this issue it also can not Attach to Process in the Xcode to the packet tunnel.
It shows
Code Block
Details
Failed to start remote service "com.apple.mobile.installation_proxy" on device.
Domain: com.apple.dtdevicekit
Code: 811
Recovery Suggestion: Please check your connection to your device.
User Info: {
  DVTRadarComponentKey = 261622;
}
--
Could not connect to the device.
Domain: com.apple.dt.MobileDeviceErrorDomain
Code: -402653083
User Info: {
  DVTRadarComponentKey = 261622;
  MobileDeviceErrorCode = "(0xE8000065)";
  "com.apple.dtdevicekit.stacktrace" = (
0  DTDeviceKitBase           0x0000000127d3f93f DTDKCreateNSErrorFromAMDErrorCode + 220
1  DTDeviceKitBase           0x0000000127d4fb04 63-[DTDKRemoteDeviceConnection startFirstServiceOf:unlockKeybag:]_block_invoke + 613
2  DTDeviceKitBase           0x0000000127d4f1d0 48-[DTDKRemoteDeviceConnection futureWithSession:]_block_invoke_3 + 22
3  DTDeviceKitBase           0x0000000127d41a9f DTDKExecuteInSession_block_invoke_2 + 35
4  DTDeviceKitBase           0x0000000127d41179 DTDKExecuteWithConnection_block_invoke_2 + 218
5  DTDeviceKitBase           0x0000000127d41076 DTDKExecuteWithConnection_block_invoke + 106
6  libdispatch.dylib          0x00007fff6c6c3658 _dispatch_client_callout + 8
7  libdispatch.dylib          0x00007fff6c6cf6ec _dispatch_lane_barrier_sync_invoke_and_complete + 60
8  DVTFoundation            0x000000010bf3edef DVTDispatchBarrierSync + 208
9  DVTFoundation            0x000000010bf15f06 -[DVTDispatchLock performLockedBlock:] + 60
10 DTDeviceKitBase           0x0000000127d40f77 DTDKExecuteWithConnection + 226
11 DTDeviceKitBase           0x0000000127d41943 DTDKExecuteInSession + 239
12 DTDeviceKitBase           0x0000000127d4f022 48-[DTDKRemoteDeviceConnection futureWithSession:]_block_invoke_2 + 131
13 DVTFoundation            0x000000010bf3c2aa DVT_CALLING_CLIENT_BLOCK + 7
14 DVTFoundation            0x000000010bf3decc __DVTDispatchAsync_block_invoke + 1191
15 libdispatch.dylib          0x00007fff6c6c26c4 _dispatch_call_block_and_release + 12
16 libdispatch.dylib          0x00007fff6c6c3658 _dispatch_client_callout + 8
17 libdispatch.dylib          0x00007fff6c6c8c44 _dispatch_lane_serial_drain + 597
18 libdispatch.dylib          0x00007fff6c6c9609 _dispatch_lane_invoke + 414
19 libdispatch.dylib          0x00007fff6c6d2c09 _dispatch_workloop_worker_thread + 596
20 libsystem_pthread.dylib       0x00007fff6c91da3d _pthread_wqthread + 290
21 libsystem_pthread.dylib       0x00007fff6c91cb77 start_wqthread + 15
);
}
--
System Information
macOS Version 10.15.7 (Build 19H2)
Xcode 12.0.1 (17220)

First, thank you for opening the bug report. I see it internally and have copied myself on it. A few things to note here; You mentioned:

A VPN application coded with NETunnelProvider, set 'includeAllNetworks' to be true (if it's false then cannot reproduce this issue);
Install the VPN application on the iPhone and switch it on;
Connect the iPhone to the Mac Book Pro with a USB cable;

If you test with either includeAllNetworks to be false or plugging in the iPhone device before you start the tunnel does it workaround this issue?


Matt Eaton
DTS Engineering, CoreOS
meaton3@apple.com
Yes. If set includeAllNetworks to be false there is no such issue. Or firstly connect with the console without VPN switched on, when it shows messages then switch on the VPN it's also normal.
With VPN switched on no messages can be seen on console and can not connect with Xcode
 
 
Q