tripflex / WifiWizard2

A Cordova plugin for managing Wifi networks (new version of WiFiWizard) - Latest is version 3+
https://www.npmjs.com/package/cordova-plugin-wifiwizard2
Apache License 2.0
122 stars 146 forks source link

Empty Array in com.apple.developer.networking.networkextension prevents Apple Upload #116

Open dmastag opened 3 years ago

dmastag commented 3 years ago

Prerequisites

Check all boxes if you have done the following:

Issue type

Select all that apply

Description

As per Today all my CI Builds are failing and after analyzing the issue I found that the root cause is that Apple doesn't let empty Array strings in the Entitlement file anymore with the following error being spit out when uploading the file to Apple

ERROR: ERROR ITMS-90164: "Invalid Code Signing Entitlements. The entitlements in your app bundle signature do not match the ones that are contained in the provisioning profile. According to the provisioning profile, the bundle contains a key value that is not allowed: '[ ]' for the key 'com.apple.developer.networking.networkextension' in 'Payload/xxx.app/xxx'."

and after looking for similar issues I found these two that were also from today

https://developer.apple.com/forums/thread/671352

https://stackoverflow.com/questions/65719776/xcode-according-to-the-provisioning-profile-the-bundle-contains-a-key-value-th/65719802#65719802

Looks like Apple messed something up.

In my case the problem is that WifiWizard2 is creating an empty array in the Plugin.xml for com.apple.developer.networking.networkextension

In https://github.com/tripflex/WifiWizard2/blob/master/plugin.xml#L62

[Description of the issue]

Steps to Reproduce

  1. Start New Project
  2. Add WifiWizard2
  3. Build on iOS
  4. Upload to Apple

Expected behavior: [What you expect to happen] Upload is successfull

Actual behavior: [What actually happens] Error Message from Apple Server as per quote above

Reproduces how often: [What percentage of the time does it reproduce?] Everytime

Versions

I am using directly from git and build on a Mac

Additional Information

Any additional information, configuration or data that might be necessary to reproduce the issue.

dmastag commented 3 years ago

Do we actually need 'com.apple.developer.networking.networkextension' in the Entitlement file ?

The build is uploaded successfully if I manually edit the Entitlement file and remove it.

dmastag commented 3 years ago

Spoke to soon, just received an email from Apple saying

ITMS-90000: This bundle is invalid - $message.

So I am keeping my fingers crossed that this an Apple issue that will resolve in a couple of days But won't be surprised if it doesn't

xLarry commented 3 years ago

I think the error message @dmastag mentioned above (ITMS-90000: This bundle is invalid - $message) has been caused by an outage in Apple's App Processing System last night:

image https://developer.apple.com/system-status/

However, I also had to manually remove the Network Extension entitlement to workaround the actual error message that's been given in the issue description.

I'm wondering if the entitlement is really required? Since none of the values are selected and my app seems to work fine without it 🤷‍♂️

dmastag commented 3 years ago

I am wondering myself if we need the com.apple.developer.networking.networkextension

Looking at the documentation, wouldn't you need one of the string values inside the Array?

https://developer.apple.com/documentation/bundleresources/entitlements/com_apple_developer_networking_networkextension

gregor-srdic commented 3 years ago

Anyone managed to solve this yet? :O

dmastag commented 3 years ago

@gregor-srdic I created a pull request for this. The build works on my end with no seen drawbacks yet

arsenal942 commented 3 years ago

@dmastag Having a look at this thread: https://developer.apple.com/forums/thread/671352 it seems that it is a bug on the end of Apple. Is this something we should wait until Apple resolve and therefore not merge into the main branch of code?

If you need to upload your app now, a work around would be to remove it, but I imagine Apple will eventually resolve the issue.

dmastag commented 3 years ago

I agree, though I am not sure that Apple will fix it in the near future. In the meantime I will build using my branch.