Skip to content
This repository has been archived by the owner on Jul 28, 2020. It is now read-only.

Failed to save configuration: Error Domain=NEVPNErrorDomain Code=5 "IPC failed" #1

Open
ApplantaDev opened this issue Feb 8, 2017 · 15 comments

Comments

@ApplantaDev
Copy link

When I try to run the app, I get the following error:

Failed to save configuration: Error Domain=NEVPNErrorDomain Code=5 "IPC failed" UserInfo={NSLocalizedDescription=IPC failed}
Error Domain=NEVPNErrorDomain Code=5 "IPC failed" UserInfo={NSLocalizedDescription=IPC failed}
Go!
Error Domain=NEVPNErrorDomain Code=1 "(null)"

Do I have to request entitlements from apple?

@davlxd
Copy link
Owner

davlxd commented Feb 9, 2017

Oh yes, there are 2 things about NetworkExtension: you cannot run on simulator, and you need entitlements even you just debug on your iPhone without releasing.

BTW this project is unfinished and I'm kinda abandoned it because of my procrastination -_-||| . I will finish this (with an elaborate installation guide) if you really need it :)

@ApplantaDev
Copy link
Author

Thanks for the info. I was able to get the entitlements set up. Did you ever establish a VPN connection using the current code that you have now?

@davlxd
Copy link
Owner

davlxd commented Feb 14, 2017

Yes, I just complete this repo, and it works fine on my iPhone, with server side setup.

@ApplantaDev
Copy link
Author

I just followed the instructions from both repos. I am still getting this as thew output in the console

VPN Status changed:
Invliad
VPN Status changed:
Disconnected...
Save successfully

VPN status is always invalid

@davlxd
Copy link
Owner

davlxd commented Feb 15, 2017

My bad, my instructions are not elaborate enough. Here it is.

  • After build & run simple-vpn-demo, your terminal should be like this.
  • After build & run NEPacketTunnelVPNDemo on your iPhone, Xcode log window should look like this, iPhone screen should look like this. And this is where you are.
  • The Connect at the center of iPhone screen is a BUTTON, after you click it, your iPhone screen should look like this, and Xcode log window should look like this. simple-vpn-demo terminal window should look like this, which means VPN server is now receiving traffic.
  • Your IP address of http://whatismyipaddress.com/ on your iPhone should be different before and after click the Connect button.

Q.E.D.

@davlxd
Copy link
Owner

davlxd commented Mar 3, 2017

Hi Touchcore, does this work for you? I am closing this issue if it does.

@ApplantaDev
Copy link
Author

I will try this today and get back to you. Thanks a lot!

@ApplantaDev
Copy link
Author

I got it working. However, the following method is never called in PacketTunnelProvider.swift:
startTunnel(options: [String : NSObject]?, completionHandler: @escaping (Error?) -> Void)
Do you have any idea?

@davlxd
Copy link
Owner

davlxd commented Mar 9, 2017

To verify it's called, you might need to set a break point and debug after Xcode attach to NEPacketTunnelVPNDemoTunnel, like this, kind of cumbersome.

@ApplantaDev
Copy link
Author

ApplantaDev commented Mar 9, 2017

For some reason I can establish a vpn connection but no methods in the PacketTunnel Provider file are ever called. This is my stackoverflow link http://stackoverflow.com/questions/42701530/packettunnelprovider-network-extension-not-called-swift-3

@visionstech
Copy link

visionstech commented Feb 27, 2018

@lxdcn
I just followed the instructions from both repos. I am still getting this as thew output in the console
NEPacketTunnelVPNDemo[9687:1248755] refreshPreferences: HangTracerEnabled: 0
2018-02-27 11:52:43.975500+0530 NEPacketTunnelVPNDemo[9687:1248755] refreshPreferences: HangTracerDuration: 500
2018-02-27 11:52:43.975565+0530 NEPacketTunnelVPNDemo[9687:1248755] refreshPreferences: ActivationLoggingEnabled: 0 ActivationLoggingTaskedOffByDA:0
VPN Status changed:
Invliad
VPN Status changed:
Disconnected...
Save successfully
Go!
VPN Status changed:
Connecting...
VPN Status changed:
Disconnected...

@kukushechkin
Copy link

@visionstech were you able to overcome this Connecting-Disconnected problem?

@TheMrugraj
Copy link

Any update on this issue ?

@ms-tii
Copy link

ms-tii commented Jan 22, 2019

Any update on this issue ?

Hi Sir, Do you able to solve the Connecting-Disconnected problem?

@TheMrugraj
Copy link

Yes, In my case I was missing an additional Capability for Personal VPN to add in entitlements.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants