fix(mobile): suppress Node.js url.parse() deprecation and document Apple session fix

- Add NODE_NO_WARNINGS=1 to all eas.json build profiles (development,
  preview, production) to suppress [DEP0169] url.parse() deprecation
  warnings emitted by EAS CLI when the build image's system Node is 22+
- Add NODE_NO_WARNINGS=1 env to both EAS Cloud Workflow jobs
  (.eas/workflows/create-builds.yml) with explanatory comments
- Fix outdated Node.js prerequisite in docs/MobileApp.md (was "18 or
  later", now "20.19.4 or later" with nvm guidance)
- Add troubleshooting sections in docs/MobileApp.md and mobile/README.md
  covering both the "Session expired Local session" error (Apple ID
  session expiry + App Store Connect API key recommendation) and the
  [DEP0169] Node.js deprecation warning

Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]
2026-03-15 21:06:07 +00:00
parent db115a3c5d
commit dd02ff5677
4 changed files with 96 additions and 1 deletions
+8
View File
@@ -9,6 +9,10 @@ jobs:
build_android:
name: Build Android app
type: build
env:
# Suppress Node.js url.parse() deprecation warnings ([DEP0169]) emitted by
# EAS CLI when running on the build image's system Node 22+.
NODE_NO_WARNINGS: "1"
params:
platform: android
profile: production
@@ -16,6 +20,10 @@ jobs:
build_ios:
name: Build iOS app
type: build
env:
# Suppress Node.js url.parse() deprecation warnings ([DEP0169]) emitted by
# EAS CLI when running on the build image's system Node 22+.
NODE_NO_WARNINGS: "1"
params:
platform: ios
profile: production
+41
View File
@@ -158,3 +158,44 @@ The mobile app uses the following backend endpoints:
| `GET` | `/api/files` | List processed documents |
Authentication uses `Authorization: Bearer <api_token>` on all requests.
## Troubleshooting
### `Session expired Local session` when running `eas build`
EAS CLI stores an Apple ID session locally to manage provisioning profiles and code-signing certificates. This session expires after several weeks.
**Quick fix (local):** Re-authenticate by running:
```bash
eas credentials
```
Select iOS → re-enter your Apple ID credentials when prompted.
**Recommended (CI / automation):** Switch to an [App Store Connect API Key](https://docs.expo.dev/app-signing/app-credentials/#app-store-connect-api-key) which does not expire automatically and works non-interactively:
1. Go to [appstoreconnect.apple.com → Users → Integrations → Keys](https://appstoreconnect.apple.com/access/integrations/api) and create a key with *Developer* or *App Manager* role.
2. Download the `.p8` file; note the **Key ID** and **Issuer ID**.
3. Run `eas credentials` → iOS → *Add an App Store Connect API key* and upload the `.p8` file.
Once an API key is stored in EAS, all future builds (local and CI) will use it automatically without requiring an Apple ID session.
### `[DEP0169] DeprecationWarning: url.parse()` during build
```text
(node:XXXXX) [DEP0169] DeprecationWarning: `url.parse()` behavior is not standardized…
```
This is emitted by EAS CLI itself when it runs on **Node.js 22 or later**, which deprecates `url.parse()`. It is a warning only and does not cause build failures on its own. The `eas.json` build profiles already suppress it via `"NODE_NO_WARNINGS": "1"` in their `env` sections.
To suppress the warning locally, either:
```bash
# Option A: Run with the warning suppressed
NODE_NO_WARNINGS=1 eas build --platform ios
# Option B: Switch to the pinned Node version (no warning on Node 20)
nvm use # reads .nvmrc → Node 20.19.4
eas build --platform ios
```
+9
View File
@@ -8,6 +8,9 @@
"developmentClient": true,
"distribution": "internal",
"node": "20.19.4",
"env": {
"NODE_NO_WARNINGS": "1"
},
"ios": {
"image": "macos-sequoia-15.5-xcode-26.0"
}
@@ -15,6 +18,9 @@
"preview": {
"distribution": "internal",
"node": "20.19.4",
"env": {
"NODE_NO_WARNINGS": "1"
},
"ios": {
"simulator": false,
"image": "macos-sequoia-15.5-xcode-26.0"
@@ -23,6 +29,9 @@
"production": {
"autoIncrement": true,
"node": "20.19.4",
"env": {
"NODE_NO_WARNINGS": "1"
},
"ios": {
"image": "macos-sequoia-15.5-xcode-26.0"
}