The app references non-public selectors in Payload Capacitor.Framework STATE_ERROR.VALIDATION_ERROR.50
Asked Answered
B

9

5

Today, I ran into a problem while trying to upload my capacitor app to the App Store. The app was published a few days ago and, to my understanding, nothing critical for the upload was not changed. The error I receive also does not shed any lights on the actual problem.

The error looks the following: enter image description here

And says:

The app references non-public selectors in Payload/App.app/Frameworks/Capacitor.Framework/Capacitor: applicationNameForUserAgent, initWithFrame:configuration:, isMainFrame, setNavigationDelegate:, targetFrame With error code STATE_ERROR.VALIDATION_ERROR.50 for id (some guid).

I tried numerous approaches, like regenerating the Certificates and the Provisioning Profile. Nothing helps, and this error blocks the publishing of the app. Looks like something internal to Capacitor, but I can't figure what exactly and what specifically has happened in a couple of days from the last successful app publish.

Any help?

Be answered 6/6, 2022 at 22:31 Comment(5)
Could you share your Info.plist, I am getting the same error.Imidazole
It seems like this is some new global issue, based on some conflict between Ionic Capacitor and Apple: github.com/ionic-team/capacitor/issues/5661Be
any work around for the issue?Imidazole
same issue with another package The app references non-public selectors in Payload/App.app/Frameworks/JitsiMeetSDK.framework/JitsiMeetSDK: estimatedProgress, evaluateScript:, initWithFrame:configuration:, isMainFrame, isPassthrough, navigationType, onSuccess:, removeValuesForKeys:completion:, setNavigationDelegate:, setProcessPool:, showLoading, targetFrame, userContentController, websiteDataStore With error code STATE_ERROR.VALIDATION_ERROR.50 for id 8e37a28d-2947-4056-9434-517d84f568cfMenial
I assume you mean, "nothing critical for the upload was changed"? Currently, it says "nothing critical for the upload was not changed."Intervene
B
2

A potential workaround until it will be officially fixed:

I searched the resulting code by Ionic build for applicationNameForUserAgent and isMainFrame—other strings did not match anything—and found one instance for isMainFrame (line 107 was found) in WebViewDelegationHandler and three instances of applicationNameForUserAgent in CAPBridgeViewController (lines 115-120) (all searches in the xCode workspace). I removed all of these lines and the build was magically published.

I found on StackOverflow some thread from 2019 that also blamed (then) cordova-web-view-plugin.

I'm not sure about how bad it is to remove those lines of code, yet at least it offers some sort of a solution, if at all.

I tested on my app and did not observe any flaws.

Be answered 6/6, 2022 at 23:54 Comment(0)
M
6

I'm having this now in Xcode 14.

This is a bug on Apple's backend validation.

However I was able to distribute without any issue.

Mohandis answered 28/9, 2022 at 16:8 Comment(0)
B
2

A potential workaround until it will be officially fixed:

I searched the resulting code by Ionic build for applicationNameForUserAgent and isMainFrame—other strings did not match anything—and found one instance for isMainFrame (line 107 was found) in WebViewDelegationHandler and three instances of applicationNameForUserAgent in CAPBridgeViewController (lines 115-120) (all searches in the xCode workspace). I removed all of these lines and the build was magically published.

I found on StackOverflow some thread from 2019 that also blamed (then) cordova-web-view-plugin.

I'm not sure about how bad it is to remove those lines of code, yet at least it offers some sort of a solution, if at all.

I tested on my app and did not observe any flaws.

Be answered 6/6, 2022 at 23:54 Comment(0)
P
2

I've got the warning as well, but the build is successfully uploaded of TF. If not you can give it a second try.

Peltast answered 11/10, 2022 at 7:55 Comment(3)
This does not provide an answer to the question. Once you have sufficient reputation you will be able to comment on any post; instead, provide answers that don't require clarification from the asker. - From ReviewGrate
its help @saad SheikhChadwell
Agree, these kind of comments are not helping but just pollute the page.Bonbon
O
1

I'm not sure if removing or renaming the references is a safe option. Good for you if it works. The reality is it may be an Apple issue. Sounds weird, but it look like it is. I have the same issue on Capacitor but right now it happens to all Cross-platform community:

Oleander answered 7/6, 2022 at 3:31 Comment(0)
S
1

This was a bug on Apple’s backend, it’s fixed now according to one of their engineers

The issue has been resolved on the app validation backend. Please try resubmitting. Sorry for the trouble.

https://developer.apple.com/forums/thread/127678?answerId=715975022#715975022

Spartacus answered 7/6, 2022 at 8:29 Comment(0)
D
1

I faced the same issue, with updating xcode and ios 16. I solved it by setting the "Minimum Deployments" in Targets > General, to the lowest value available.

I was able to distribute with a warning but doing this removed that too.

Dupuis answered 7/10, 2022 at 7:24 Comment(0)
C
1

If you are using react-native and faced the same issue, with updating xcode and ios 16.

I solved it by setting the "Minimum Deployments" in Targets > General, to the lowest value available that is 11.

Castellany answered 7/11, 2022 at 12:15 Comment(0)
O
0

I can submit the app using Transporter. Archive and export app using Xcode and deliver app using Transporter.

Oaxaca answered 11/10, 2022 at 5:55 Comment(0)
H
0

I tried all the things above and none of it worked. Refer to this GitHub issue for the working answer. Follow the steps as he said or simple copy this piece of code in you Podfile.

def find_and_replace(dir, findstr, replacestr)
  Dir[dir].each do |name|
      text = File.read(name)
      replace = text.gsub(findstr,replacestr)
      if text != replace
          puts "Fix: " + name
          File.open(name, "w") { |file| file.puts replace }
          STDOUT.flush
      end
  end
  Dir[dir + '*/'].each(&method(:find_and_replace))
end

post_install do |installer|
        find_and_replace("./node_modules/react-native/React/Base/RCTKeyCommands.m",
                                "_modifierFlags",
                                "_modifierEventFlags")
        find_and_replace("./node_modules/react-native/React/Base/RCTKeyCommands.m",
                                "_modifiedInput",
                                "_modifiedEventInput")
        find_and_replace("./node_modules/react-native/React/Base/RCTKeyCommands.m",
                                "_isKeyDown",
                                "_isKeyEventDown")
        find_and_replace("./node_modules/react-native/React/DevSupport/RCTPackagerClient.h",
                                "handleNotification",
                                "handlePackageNotification")

        find_and_replace("./node_modules/react-native/React/DevSupport/RCTPackagerConnection.mm",
                                "handleNotification",
                                "handlePackageNotification")
    end

Make sure that you first find this function and replace it post_install do |installer|

Hermaherman answered 26/10, 2022 at 18:8 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.