6 Replies
      Latest reply: Sep 14, 2017 1:36 AM by eskimo RSS
      roee84 Level 1 Level 1 (0 points)

        I've implemented a VPN app with Packet Tunnel Provider for MacOS.

        I'm using loadAllFromPreferences to find the manager that belongs to the specific user.

        Sometimes (rarely happens, but it's not good enough), the manager is not

        • Re: NETunnelProviderManager - manager not found
          eskimo Apple Staff Apple Staff (7,180 points)

          It’s hard to offer any suggestions without more concrete details about the problem.  For example:

          • Are the expected configurations created by your app?  Or installed via a configuration profile?

          • When this happens, does it to continue to happen for that specific environment?  Or is this a transient thing?

          • If it’s not a transient thing, do you know of anything that clears the problem?  Like removing and re-installing your profile?  Or re-creating the configuration in the app?

          Share and Enjoy

          Quinn “The Eskimo!”
          Apple Developer Relations, Developer Technical Support, Core OS/Hardware
          let myEmail = "eskimo" + "1" + "@apple.com"

            • Re: NETunnelProviderManager - manager not found
              roee84 Level 1 Level 1 (0 points)

              All the configurations created by my app.

              I have a suspicion that it might be related to  MacOS 10.12.6 since it suddenly happened to 3 different users with this OS version.

              removing and re-installing the profile solved the problem, but not all the users are aware to this fact..

                • Re: NETunnelProviderManager - manager not found
                  eskimo Apple Staff Apple Staff (7,180 points)

                  All the configurations created by my app.

                  removing and re-installing the profile solved the problem, but not all the users are aware to this fact..

                  I’m confused.  If the configuration was created by our app then why is there a configuration profile to remove and re-install?

                  Share and Enjoy

                  Quinn “The Eskimo!”
                  Apple Developer Relations, Developer Technical Support, Core OS/Hardware
                  let myEmail = "eskimo" + "1" + "@apple.com"

                    • Re: NETunnelProviderManager - manager not found
                      roee84 Level 1 Level 1 (0 points)

                      The user enters his details - and the app creates the VPN profile.

                      After an unknown number of uses - the profile cannot be found for some reason (rarely happens, as I mentioned above).

                      Deleting the user from the app (it's a Mac app which contains several users) - and adding him again - will create a new profile, and everything is ok.

                        • Re: NETunnelProviderManager - manager not found
                          roee84 Level 1 Level 1 (0 points)

                          Well, it's seems that those errors occured after using Mac Time Machine.

                          I'm Not sure yet if it's deleted the VPN profiles/ the pass ref from keychain, or the user defaults files that the app uses to hold data.

                            • Re: NETunnelProviderManager - manager not found
                              eskimo Apple Staff Apple Staff (7,180 points)

                              The user enters his details - and the app creates the VPN profile.

                              OK, you’re using the term “profile” in a non-standard way here.  In the context of VPN a profile refers to a configuration profile that contains a VPN payload (com.apple.vpn.managed).  Installing a profile creates a VPN configuration, but you can also create VPN configurations programmatically.

                              Notably, when you save a VPN configuration programmatically it shows up in the Network preferences panel (or Settings > General > Profiles on iOS) but not in the Profiles preferences panel (Settings > General > VPN on iOS).


                              As to your actual issue, it’s hard to offer any input without more on how the configuration is getting lost.  You wrote:

                              Well, it's seems that those errors occured after using Mac Time Machine.

                              Let me know if you’re able to confirm this.

                              Share and Enjoy

                              Quinn “The Eskimo!”
                              Apple Developer Relations, Developer Technical Support, Core OS/Hardware
                              let myEmail = "eskimo" + "1" + "@apple.com"