Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Apple rejects React Native build with "ITMS-90338: Non-public API usage" #33789

Closed
Tak-As opened this issue May 9, 2022 · 50 comments
Closed
Labels
Impact: App Rejected Describes an issue that may result in the app getting rejected from an app store. Needs: Attention Issues where the author has responded to feedback. Platform: iOS iOS applications. Priority: Mid Tech: React Native Core Issue related to the Core of React Native Type: New Architecture Issues and PRs related to new architecture (Fabric/Turbo Modules)

Comments

@Tak-As
Copy link

Tak-As commented May 9, 2022

Description

Submitting a React Native app build to the Apple App Store results in a rejection email regarding "Non-public API usage".

Dear Developer,

We identified one or more issues with a recent delivery for your app, "AppName" 1.0.0 (1.2.0). Please correct the following issues, then upload again.

ITMS-90338: Non-public API usage - The app references non-public selectors in AppName: centerY, hide:, isPassthrough, onSuccess:, permissionType, removeValuesForKeys:completion:, setLabelText:, show:, valueOffset, viewManager. If method names in your source code match the private Apple APIs listed above, altering your method names will help prevent this app from being flagged in future submissions. In addition, note that one or more of the above APIs may be located in a static library that was included with your app. If so, they must be removed. For further information, visit the Technical Support Information at http://developer.apple.com/support/technical/

Best regards,

The App Store Team

Version

0.68.1

Output of npx react-native info

System:
OS: macOS 11.6.4
CPU: (8) arm64 Apple M1
Memory: 148.92 MB / 16.00 GB
Shell: 5.8 - /bin/zsh
Binaries:
Node: 16.0.0 - ~/.nvm/versions/node/v16.0.0/bin/node
Yarn: 1.22.17 - ~/.nvm/versions/node/v16.0.0/bin/yarn
npm: 7.10.0 - ~/.nvm/versions/node/v16.0.0/bin/npm
Watchman: 2022.02.28.00 - /opt/homebrew/bin/watchman
Managers:
CocoaPods: 1.11.2 - /usr/local/bin/pod
SDKs:
iOS SDK:
Platforms: DriverKit 21.2, iOS 15.2, macOS 12.1, tvOS 15.2, watchOS 8.3
Android SDK: Not Found
IDEs:
Android Studio: Not Found
Xcode: 13.2.1/13C100 - /usr/bin/xcodebuild
Languages:
Java: Not Found
npmPackages:
@react-native-community/cli: Not Found
react: 17.0.2 => 17.0.2
react-native: 0.68.1 => 0.68.1
react-native-macos: Not Found
npmGlobalPackages:
react-native: Not Found

Steps to reproduce

1:Archive App(Release scheme)
2:Upload the resulting .ipa file to App Store Connect via Transporter (available on the Apple App Store)
3:Receive an email from apple that the build was rejected.

Snack, code example, screenshot, or link to a repository

image

@cortinico
Copy link
Contributor

Which engine are you using?

@Tak-As
Copy link
Author

Tak-As commented May 9, 2022

Which engine are you using?

How can I find out?

@github-actions github-actions bot added Needs: Attention Issues where the author has responded to feedback. and removed Needs: Author Feedback labels May 9, 2022
@Tak-As
Copy link
Author

Tak-As commented May 9, 2022

Which engine are you using?

How can I find out?

I'm using 'jsc' engine. not hermes.

{
  "expo.jsEngine": "jsc"
}

@Tak-As
Copy link
Author

Tak-As commented May 10, 2022

I upgraded the OS to Monterey12.3.1, but there is no change.
However, in Xcode 13.3.1, the Validate App fails. (No error if Xcode 13.2.1)
image

@Andressaray
Copy link

Frame 1
I have the same issue, won't let me upload version to Testflight and I dont know the reason.

@fortmarek
Copy link
Contributor

Hey, there is a PR trying to address a similar thing - can you confirm you are trying to upload an app in debug mode? Any additional information about the issue would be helpful here @Tak-As @Andressaray

@brentvatne
Copy link
Collaborator

Hi there! Are you using expo-dev-client? Also, can you make sure you are using the latest version of the expo package - the latest as of writing is 45.0.4.

@Tak-As
Copy link
Author

Tak-As commented May 17, 2022

Hey, there is a PR trying to address a similar thing - can you confirm you are trying to upload an app in debug mode? Any additional information about the issue would be helpful here @Tak-As @Andressaray

Thanks for reply.
In my environment ("react-native": "0.68.2") the result is the same in debug mode and release mode.
I can expect that my problem will be solved if the PR is merged.

Hi there! Are you using expo-dev-client? Also, can you make sure you are using the latest version of the expo package - the latest as of writing is 45.0.4.

Thanks for reply.
Yes, I was install "expo-dev-client". but my project is rejected expo.(bare workflow)
Build fails when upgrading to expo 45.0.4 & expo-dev-client 0.9.5. (Command PhaseScriptExecution failed with a nonzero exit code)

@cipolleschi cipolleschi added Impact: App Rejected Describes an issue that may result in the app getting rejected from an app store. Type: New Architecture Issues and PRs related to new architecture (Fabric/Turbo Modules) Tech: React Native Core Issue related to the Core of React Native Platform: iOS iOS applications. Priority: Mid labels May 17, 2022
@Kudo
Copy link
Contributor

Kudo commented May 17, 2022

@Tak-As please let me clarify whether the app you submit the app store had expo-dev-client installed or not?

@Tak-As
Copy link
Author

Tak-As commented May 18, 2022

@Tak-As please let me clarify whether the app you submit the app store had expo-dev-client installed or not?

It is installed.

Part of package.json

"dependencies": {
    "@react-native-async-storage/async-storage": "~1.17.3",
    "@react-navigation/bottom-tabs": "^6.0.9",
    "@react-navigation/native": "^6.0.6",
    "@react-navigation/native-stack": "^6.2.5",
    "expo": "~45.0.4",
    "expo-dev-client": "~0.9.5",
    "native-base": "3.3.11",
    "react": "17.0.2",
    "react-dom": "17.0.2",
    "react-native": "0.68.2",
    "react-native-base64": "^0.2.1",
    "react-native-safe-area-context": "4.2.4",
    "react-native-screens": "~3.11.1",
    "react-native-step-indicator": "^1.0.3",
    "react-native-storage": "^1.0.1",
    "react-native-svg": "12.3.0",
    "redux": "^4.1.2"
  },
  "devDependencies": {
    "@babel/core": "^7.12.9",
    "@types/react": "~17.0.21",
    "@types/react-native": "~0.67.6",
    "@types/react-native-base64": "^0.2.0",
    "@typescript-eslint/eslint-plugin": "^5.9.1",
    "@typescript-eslint/parser": "^5.9.1",
    "eslint": "^8.6.0",
    "eslint-config-prettier": "^8.3.0",
    "eslint-plugin": "^1.0.1",
    "eslint-plugin-import": "^2.25.4",
    "eslint-plugin-prettier": "^4.0.0",
    "eslint-plugin-react": "^7.28.0",
    "eslint-plugin-unused-imports": "^2.0.0",
    "expo-cli": "^5.4.4",
    "prettier": "^2.5.1",
    "react-redux": "^8.0.1",
    "typescript": "4.6.4"
  },

@brentvatne
Copy link
Collaborator

what version of expo-modules-autolinking is installed? can you share the output of npm why expo-modules-autolinking or yarn why expo-modules-autolinking?

@Tak-As
Copy link
Author

Tak-As commented May 18, 2022

what version of expo-modules-autolinking is installed? can you share the output of npm why expo-modules-autolinking or yarn why expo-modules-autolinking?

yarn why v1.22.17
[1/4] 🤔  Why do we have the module "expo-modules-autolinking"...?
[2/4] 🚚  Initialising dependency graph...
[3/4] 🔍  Finding dependency...
[4/4] 🚡  Calculating file sizes...
=> Found "expo-modules-autolinking@0.7.1"
info Has been hoisted to "expo-modules-autolinking"
info Reasons this module exists
   - Hoisted from "expo-cli#@expo#prebuild-config#expo-modules-autolinking"
   - Hoisted from "expo#@expo#cli#@expo#prebuild-config#expo-modules-autolinking"
info Disk size without dependencies: "944KB"
info Disk size with unique dependencies: "1.97MB"
info Disk size with transitive dependencies: "7.21MB"
info Number of shared dependencies: 40
=> Found "expo#expo-modules-autolinking@0.8.1"
info This module exists because "expo" depends on it.
info Disk size without dependencies: "432KB"
info Disk size with unique dependencies: "1.47MB"
info Disk size with transitive dependencies: "6.71MB"
info Number of shared dependencies: 40
✨  Done in 0.48s.

@Kudo
Copy link
Contributor

Kudo commented May 19, 2022

@Tak-As could you use patch-package or modify node_modules/react-native locally for #33153 change and try to submit to app store again? because your private apis centerY, hide:, isPassthrough, onSuccess:, permissionType, removeValuesForKeys:completion:, setLabelText:, show:, valueOffset, viewManager do not have the private key events where the pr addressed. i am wondering #33153 may not able to fix your problem. at the same time, i also feel curious where the private apis coming from.

@Tak-As
Copy link
Author

Tak-As commented Jun 6, 2022

@Tak-As could you use patch-package or modify node_modules/react-native locally for #33153 change and try to submit to app store again? because your private apis centerY, hide:, isPassthrough, onSuccess:, permissionType, removeValuesForKeys:completion:, setLabelText:, show:, valueOffset, viewManager do not have the private key events where the pr addressed. i am wondering #33153 may not able to fix your problem. at the same time, i also feel curious where the private apis coming from.

I don't know how to apply PR changes to local node_modules. Is there any good way?

@douglasjunior
Copy link

Today we received this message:

Dear Developer,

We identified one or more issues with a recent submission for TestFlight review for your app, "Move App Staging" 2.8.0 (44). Please correct the > following issues, then upload again.

ITMS-90338: Non-public API usage - The app references non-public selectors in ventasStaging: estimatedProgress, initWithFrame:configuration:, > isMainFrame, isPassthrough, navigationType, onSuccess:, relativeSize, removeValuesForKeys:completion:, setIsEnabled:, setNavigationDelegate:, > setProcessPool:, spanArray, spanArray_Count, underline, updateSettings:, userContentController, viewManager, websiteDataStore. If method names in your > source code match the private Apple APIs listed above, altering your method names will help prevent this app from being flagged in future submissions. > In addition, note that one or more of the above APIs may be located in a static library that was included with your app. If so, they must be removed. > For further information, visit the Technical Support Information at http://developer.apple.com/support/technical/

Best regards,

The App Store Team

The weirdest thing is that nothing has been installed or updated in the app, only JS code has been modified since the last build.

React Native versions:

    "react": "17.0.2",
    "react-native": "0.66.2",

Expo versions:

    "expo": "43.0.4",
    "expo-camera": "12.0.3",
    "expo-document-picker": "10.1.0",
    "expo-file-system": "13.0.3",
    "expo-image-manipulator": "10.1.2",
    "expo-keep-awake": "10.0.1",
    "expo-screen-orientation": "4.0.3",
    "expo-sharing": "10.0.3",

yarn why expo-modules-autolinking

=> Found "expo-modules-autolinking@0.3.4"
info Reasons this module exists
   - "expo" depends on it
   - Hoisted from "expo#expo-modules-autolinking"
info Disk size without dependencies: "836KB"
info Disk size with unique dependencies: "1.58MB"
info Disk size with transitive dependencies: "2.99MB"
info Number of shared dependencies: 30

@diegogurpegui
Copy link

Same issue here. We just got this error from Apple after building and submitting a new app.
The weird thing is, we just submitted an app 2 days ago, and the only change is a couple of JS lines.

@gabrieldonadel
Copy link
Collaborator

I'm facing the same problem here as well

@beisert1
Copy link

beisert1 commented Jun 6, 2022

Same issue here affecting our apps this afternoon, seems to be related to the outage they had earlier today.

@stuckj
Copy link

stuckj commented Jun 6, 2022

Same here. The selectors mentioned in the rejection notice are publically documented Apple APIs. So, this appears to be an Apple issue and not a react native issue (at least what's happening today).

@MasoudJB
Copy link

MasoudJB commented Jun 6, 2022

Same issue here, I was able to build and submit yesterday without any issue and we only have some minor changes.

@jwoo92
Copy link

jwoo92 commented Jun 6, 2022

I'm also seeing this from Apple after a few lines of JS code changes.

Only notable change since last release is I've updated Xcode (I was on latest until new update).

MacOS Monterey Version 12.4 (21F79)

Xcode Version 13.4 (13F17a)

"react": "17.0.1",

"react-native": "0.64.3",

"expo": "^44.0.0",

"expo-dev-client": "~0.8.5",

"expo-app-loading": "~1.3.0",

"expo-apple-authentication": "~4.1.0",

"expo-application": "~4.0.1",

"expo-asset": "~8.4.6",

"expo-av": "~10.2.0",

"expo-blur": "~11.0.0",

"expo-camera": "~12.1.2",

"expo-cellular": "~4.1.0",

"expo-constants": "~13.0.1",

"expo-device": "~4.1.0",

"expo-facebook": "~12.1.0",

"expo-file-system": "~13.1.2",

"expo-font": "~10.0.4",

"expo-google-sign-in": "~10.1.0",

"expo-haptics": "~11.1.0",

"expo-image-manipulator": "~10.2.0",

"expo-image-picker": "~12.0.1",

"expo-keep-awake": "~10.0.1",

"expo-linear-gradient": "~11.0.0",

"expo-linking": "~3.0.0",

"expo-media-library": "~14.0.0",

"expo-navigation-bar": "~1.1.1",

"expo-network": "~4.1.0",

"expo-permissions": "~13.1.0",

"expo-secure-store": "~11.1.0",

"expo-splash-screen": "~0.14.1",

"expo-status-bar": "~1.2.0",

"expo-store-review": "~5.1.0",

"expo-system-ui": "~1.1.0",

"expo-updates": "~0.11.7",

"expo-web-browser": "~10.1.0",

yarn why expo-modules-autolinking

=> Found "expo-modules-autolinking@0.5.5"

info Reasons this module exists

   - "expo" depends on it

   - Hoisted from "expo#expo-modules-autolinking"

   - Hoisted from "expo-splash-screen#@expo#prebuild-config#expo-modules-autolinking"

info Disk size without dependencies: "948KB"

info Disk size with unique dependencies: "1.74MB"

info Disk size with transitive dependencies: "3.14MB"

info Number of shared dependencies: 30

Just tried again after updating Xcode to 13.4.1... no luck, same outcome.

@MasoudJB MasoudJB mentioned this issue Jun 6, 2022
@RSchneider94
Copy link

RSchneider94 commented Jun 7, 2022

Same here, just changed one line in my TS code and it is not working anymore, no Xcode updates, nothing!

Edit: I'm using Expo! CLIs: expo-cli@5.4.9 / eas-cli@0.53.0 and "expo": "~44.0.0"

@gabriellend
Copy link

gabriellend commented Jun 7, 2022

As many others, the same thing is happening to us. No packages updated, just some minor javascript changes. Not using expo. We resolved the issue in debug mode by changing a few variable names but in release mode we are getting a notification about different ones and there are way more, doesn't seem feasible to manually change them all. Glad to find this thread, at least we're not alone! Seems like an Apple issue, there is a thread over there of a bunch of people with the same problem: https://developer.apple.com/forums/thread/127678. I submitted a report to them. Here's hoping it gets fixed soon!

@thomaskbird
Copy link

Experiencing the same with React Native and everything was working as of yesterday for us.

@jwaldrip
Copy link

jwaldrip commented Jun 7, 2022

Same here, builds are not rolling out...

@ikeller96
Copy link

This may be due to apple updating their policy. Saw a comment that suggested needing to log in to your apple developer account (separate from app store connect) and agree to the updated policy. Apparently submissions will work after this? I'm testing this now.

@bennsandoval
Copy link

"The issue has been resolved on the app validation backend. Please try resubmitting. Sorry for the trouble."
by Developer Tools Engineer https://developer.apple.com/forums/thread/127678?page=6

@paulocoutinhox
Copy link

Hi,

Message from Apple: "The issue has been resolved on the app validation backend. Please try resubmitting. Sorry for the trouble."

Thanks.

@stuckj
Copy link

stuckj commented Jun 7, 2022

I can verify that we're able to submit now (with the same code).

@diegogurpegui
Copy link

I can confirm too that the issue was resolved by Apple.

@jwoo92
Copy link

jwoo92 commented Jun 7, 2022

"The issue has been resolved on the app validation backend. Please try resubmitting. Sorry for the trouble." by Developer Tools Engineer https://developer.apple.com/forums/thread/127678?page=6

Thanks for the callout, @bennsandoval.

Tried uploading again and found success.

@Tak-As
Copy link
Author

Tak-As commented Jun 29, 2022

I solved it once, but the problem occurred again.
Is it just my problem?

@paulocoutinhox
Copy link

I solved it once, but the problem occurred again. Is it just my problem?

Update the macOS to Mojave and Xcode to latest version.

@Tak-As
Copy link
Author

Tak-As commented Jul 19, 2022

This issue has not yet been resolved.
Many people seem to be able to fix it by changing the schema to a release, but it doesn't seem to work in my environment.
Is there any workaround for the issue where the release build doesn't work?
thank you.

@Tak-As Tak-As closed this as completed Jul 19, 2022
@Tak-As Tak-As reopened this Jul 19, 2022
@airowe
Copy link

airowe commented Aug 5, 2022

Seeing the same issue as @Tak-As. Building a release scheme. Debug mode works just fine.

@abazudosen
Copy link

I can confirm too that the issue was resolved by Apple.

how did you solve it

@diegogurpegui
Copy link

I can confirm too that the issue was resolved by Apple.

how did you solve it

I didn't. It was an Apple issue, after a day it was sorted out and, without doing anything different, it worked.

@mvniekerk
Copy link

Still an issue.
Even with blank new ejected Expo app.
I've logged a report here #34716

@saad9624-tribalScale
Copy link

saad9624-tribalScale commented Oct 11, 2022

https://developer.apple.com/forums/thread/127678?page=6

Still getting the same issue with newer version of xcode i.e 14.2

@prakarti-shush
Copy link

getting the same issue with newer version of Xcode 14

@kelset
Copy link
Contributor

kelset commented Oct 18, 2022

This issue has gone in many different directions (in some cases it's Apple's backend, in some it's Expo-related, etc etc) and there's no clear repro that pinpoints how this is a specific issue caused by react-native core itself.

I am closing this so if anyone has this issue with the latest version of react-native 0.70 (NOT EXPO) they can open a new issue with a clear, usable repro so that it can be investigated further.

@kelset kelset closed this as completed Oct 18, 2022
@facebook facebook locked and limited conversation to collaborators Oct 18, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Impact: App Rejected Describes an issue that may result in the app getting rejected from an app store. Needs: Attention Issues where the author has responded to feedback. Platform: iOS iOS applications. Priority: Mid Tech: React Native Core Issue related to the Core of React Native Type: New Architecture Issues and PRs related to new architecture (Fabric/Turbo Modules)
Projects
None yet
Development

No branches or pull requests