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

Post install hook failing on ios build #2707

Open
ahmedprusevic opened this issue Nov 19, 2024 · 4 comments
Open

Post install hook failing on ios build #2707

ahmedprusevic opened this issue Nov 19, 2024 · 4 comments

Comments

@ahmedprusevic
Copy link

Build/Submit details page URL

https://expo.dev/accounts/ahmedprusevic/projects/polaris/builds/b3057f65-7eb8-4b53-a245-55ba8cb894c2

Summary

Running post install hook on eas pipeline fails on ios, it is trying to run openapi-generator-cli generate command which is supposed to make http request to my server (not sure weather this makes any change) ,

node version in nvm is v18.18.0 to match the one from the image

It is passing on android build so really wierd issue

Managed or bare?

Bare

Environment

expo-env-info 1.2.1 environment info:
    System:
      OS: macOS 15.1
      Shell: 5.9 - /bin/zsh
    Binaries:
      Node: 20.15.1 - ~/.nvm/versions/node/v20.15.1/bin/node
      Yarn: 1.22.22 - ~/.nvm/versions/node/v20.15.1/bin/yarn
      npm: 10.7.0 - ~/.nvm/versions/node/v20.15.1/bin/npm
    Managers:
      CocoaPods: 1.15.2 - /opt/homebrew/bin/pod
    SDKs:
      iOS SDK:
        Platforms: DriverKit 24.1, iOS 18.1, macOS 15.1, tvOS 18.1, visionOS 2.1, watchOS 11.1
    IDEs:
      Android Studio: 2024.1 AI-241.19072.14.2412.12360217
      Xcode: 16.1/16B40 - /usr/bin/xcodebuild
    npmPackages:
      expo: ~51.0.36 => 51.0.36 
      expo-router: ~3.5.23 => 3.5.23 
      react: 18.2.0 => 18.2.0 
      react-dom: 18.2.0 => 18.2.0 
      react-native: 0.74.5 => 0.74.5 
      react-native-web: ~0.19.10 => 0.19.12 
    npmGlobalPackages:
      eas-cli: 13.2.3
    Expo Workflow: bare

Detailed check results:

The following issues were found when validating your dependencies against React Native Directory:
No metadata available: @dev-plugins/react-query, @hookform/resolvers, date-fns, i18next, jotai, lodash.debounce, react-native-chart-kit, styled-components, zod
Advice: 
- Update React Native Directory to include metadata for unknown packages. Alternatively, set expo.doctor.reactNativeDirectoryCheck.listUnknownPackages in package.json to false to skip warnings about packages with no metadata, if the warning is not relevant.

The following packages should be updated for best compatibility with the installed expo version:
  [email protected] - expected version: ~51.0.39
  [email protected] - expected version: ~4.0.29
  [email protected] - expected version: ~3.5.24
  [email protected] - expected version: ~0.27.7
  [email protected] - expected version: 15.2.0
Your project may not work correctly until you install the expected versions of the packages.
Found outdated dependencies
Advice: Use 'npx expo install --check' to review and upgrade your dependencies.

Error output

No response

Reproducible demo or steps to reproduce from a blank project

try running openapi-generator-cli generate command that fetches schema from some server in eas-build-post-install hook on ios build

@ahmedprusevic ahmedprusevic added the needs review Issue is ready to be reviewed by a maintainer label Nov 19, 2024
@szdziedzic
Copy link
Member

I'm not sure what's wrong here, but can you just try to run it as npx -y @openapitools/openapi-generator-cli ...?

@szdziedzic szdziedzic added eas build and removed needs review Issue is ready to be reviewed by a maintainer labels Nov 20, 2024
@ahmedprusevic
Copy link
Author

I've tried that as well (still failing) attaching screen shot for the reference

Screenshot 2024-11-20 at 10 50 05

@szdziedzic
Copy link
Member

what does openapischema.js do inside?

@ahmedprusevic
Copy link
Author

Just generates openapitools.json based on env copying file contents here

const output = {
  $schema:
    "./node_modules/@openapitools/openapi-generator-cli/config.schema.json",
  spaces: 2,
  "generator-cli": {
    version: "7.10.0",
    generators: {
      "v3.0": {
        generatorName: "typescript-axios",
        output: "openapi",
        // eslint-disable-next-line no-undef
        inputSpec: `${process.env.EXPO_PUBLIC_API_URL}/swagger/doc.json`,
      },
    },
  },
}
const jsonString = JSON.stringify(output)

fs.writeFileSync("openapitools.json", jsonString)

double checked weather env variable is present in eas.json it is, since the same command passes for android build

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

No branches or pull requests

2 participants