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

XCode preaction scripts should rely on the users set PATH rather than XCode path #39288

Closed
5 tasks
kdenhartog opened this issue Jun 22, 2024 · 0 comments
Closed
5 tasks
Assignees
Labels
build closed/not-actionable dev-setup OS/iOS Fixes related to iOS browser functionality

Comments

@kdenhartog
Copy link
Member

kdenhartog commented Jun 22, 2024

Description

Since XCode relies on it's own path rather than one normally set by a profile in zsh if a developer has /usr/local/bin/node and usr/local/bin/npm available the preaction the will then rely on the symlinked versions rather than the ones set by the developers own path.

In this case, I had accidentally symlinked my versions to v12.20.0 of node which doesn't support the fs/promises API used by command.js in the build scripts. This meant that XCode was unable to build an iOS version to use on a simulator.

This should either search through all versions of node and select the latest (more complicated) or alternatively just rely on the PATH set by the user rather than XCode.

See https://bravesoftware.slack.com/archives/C06UXF3KJ/p1719000668657099 for additional details about how the error might present itself.

Steps to reproduce

  1. ln -s <outdated version of node which doesn't support fs/promises> /usr/local/bin/node
  2. Run XCode build

Actual result

command script fails because it can't use fs/promises API in node if the node version is too old

Expected result

build script runs

Reproduces how often

Easily reproduced

Brave version

N/A

Device/iOS version

N/A

Affected browser versions

  • latest AppStore
  • latest TestFlight
  • previous TestFlight

Reproducibility

  • with Brave Shields disabled
  • in the latest version of mobile Safari

Miscellaneous information

No response

@kdenhartog kdenhartog added dev-setup build OS/iOS Fixes related to iOS browser functionality labels Jun 22, 2024
@iccub iccub self-assigned this Jul 3, 2024
@iccub iccub closed this as not planned Won't fix, can't repro, duplicate, stale Jul 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build closed/not-actionable dev-setup OS/iOS Fixes related to iOS browser functionality
Projects
None yet
Development

No branches or pull requests

2 participants