@userflow-tech/react-native 0.4.3 → 0.4.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +137 -39
- package/docs/deep-linking.md +26 -0
- package/docs/troubleshooting.md +45 -42
- package/expo-plugin/hostDependencyWarnings.d.ts +6 -4
- package/expo-plugin/hostDependencyWarnings.d.ts.map +1 -1
- package/expo-plugin/hostDependencyWarnings.js +8 -6
- package/expo-plugin/hostDependencyWarnings.js.map +1 -1
- package/lib/commonjs/installCheck.js +2 -2
- package/lib/commonjs/installCheck.js.map +1 -1
- package/lib/commonjs/surfaces/bannerWebView/resolveCdnHost.js +10 -16
- package/lib/commonjs/surfaces/bannerWebView/resolveCdnHost.js.map +1 -1
- package/lib/commonjs/version.js +1 -1
- package/lib/module/installCheck.js +2 -2
- package/lib/module/installCheck.js.map +1 -1
- package/lib/module/surfaces/bannerWebView/resolveCdnHost.js +10 -16
- package/lib/module/surfaces/bannerWebView/resolveCdnHost.js.map +1 -1
- package/lib/module/version.js +1 -1
- package/lib/typescript/commonjs/src/installCheck.d.ts +1 -1
- package/lib/typescript/commonjs/src/installCheck.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/surfaces/bannerWebView/resolveCdnHost.d.ts +4 -2
- package/lib/typescript/commonjs/src/surfaces/bannerWebView/resolveCdnHost.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/version.d.ts +1 -1
- package/lib/typescript/module/src/installCheck.d.ts +1 -1
- package/lib/typescript/module/src/installCheck.d.ts.map +1 -1
- package/lib/typescript/module/src/surfaces/bannerWebView/resolveCdnHost.d.ts +4 -2
- package/lib/typescript/module/src/surfaces/bannerWebView/resolveCdnHost.d.ts.map +1 -1
- package/lib/typescript/module/src/version.d.ts +1 -1
- package/package.json +1 -1
- package/src/installCheck.ts +4 -4
- package/src/surfaces/bannerWebView/resolveCdnHost.ts +14 -16
- package/src/version.ts +1 -1
- package/vendor/core/dist/constants.d.ts +6 -3
- package/vendor/core/dist/constants.d.ts.map +1 -1
- package/vendor/core/dist/constants.js +6 -3
- package/vendor/core/dist/constants.js.map +1 -1
- package/vendor/core/dist/engine/UserflowCore.d.ts.map +1 -1
- package/vendor/core/dist/engine/UserflowCore.js +4 -18
- package/vendor/core/dist/engine/UserflowCore.js.map +1 -1
- package/vendor/core/dist/index.d.ts +1 -0
- package/vendor/core/dist/index.d.ts.map +1 -1
- package/vendor/core/dist/index.js +1 -0
- package/vendor/core/dist/index.js.map +1 -1
- package/vendor/core/dist/serverEndpoint.d.ts +7 -0
- package/vendor/core/dist/serverEndpoint.d.ts.map +1 -0
- package/vendor/core/dist/serverEndpoint.js +15 -0
- package/vendor/core/dist/serverEndpoint.js.map +1 -0
- package/vendor/core/dist/types.d.ts +3 -2
- package/vendor/core/dist/types.d.ts.map +1 -1
- package/vendor/core/dist/version.d.ts +1 -1
- package/vendor/core/dist/version.js +1 -1
- package/vendor/core/package.json +1 -1
- package/vendor/protocol/package.json +1 -1
package/docs/troubleshooting.md
CHANGED
|
@@ -5,31 +5,32 @@ Messages are quoted exactly so you can search logs for them.
|
|
|
5
5
|
|
|
6
6
|
## Install
|
|
7
7
|
|
|
8
|
-
| Symptom / log message | Likely cause
|
|
9
|
-
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
10
|
-
| `expo doctor` reports `react-native-view-shot` | The app pins `^5.0.0
|
|
11
|
-
| `Unable to resolve module` for an optional peer (`netinfo`, `expo-secure-store`, `expo-router`, safe-area, navigation) | A custom Metro config does not extend `getDefaultConfig`, so `allowOptionalDependencies` is off.
|
|
12
|
-
| `ERESOLVE` while installing `@userflow-tech/react-native` | The app already has a version outside a peer range: view-shot 4.0.3 (what unpinned `npx expo install` installs on Expo SDK
|
|
13
|
-
|
|
|
14
|
-
|
|
|
15
|
-
|
|
|
16
|
-
| `
|
|
17
|
-
| `
|
|
18
|
-
|
|
|
19
|
-
|
|
|
20
|
-
| `
|
|
21
|
-
| `react-native-view-shot@4.0.3 is older than 5.0.0
|
|
22
|
-
|
|
|
23
|
-
|
|
|
24
|
-
|
|
|
25
|
-
| `- react-native-
|
|
26
|
-
| `- react-native-
|
|
27
|
-
| `- react-native-
|
|
28
|
-
|
|
|
29
|
-
| `[Userflow]
|
|
30
|
-
| `Userflow
|
|
31
|
-
| `
|
|
32
|
-
| `
|
|
8
|
+
| Symptom / log message | Likely cause | Fix |
|
|
9
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
10
|
+
| `expo doctor` reports `react-native-view-shot` | The app pins `^5.0.0`. Expo SDK 55 and older expect 4.0.3. Expo SDK 56 and 57 expect 5.1.0, and the pin installed a newer 5.x. | Expo SDK 55 and older: keep the pin and add `"react-native-view-shot"` to `expo.install.exclude`. Expo SDK 56 and 57: drop the pin, remove `"react-native-view-shot"` from `expo.install.exclude` if it is there, and reinstall with `npx expo install react-native-view-shot`. |
|
|
11
|
+
| `Unable to resolve module` for an optional peer (`netinfo`, `expo-secure-store`, `expo-router`, safe-area, navigation) | A custom Metro config does not extend `getDefaultConfig`, so `allowOptionalDependencies` is off. | Extend `getDefaultConfig` from `expo/metro-config` or `@react-native/metro-config`. |
|
|
12
|
+
| `ERESOLVE` while installing `@userflow-tech/react-native` | The app already has a version outside a peer range: view-shot 4.0.3 (what unpinned `npx expo install` installs on Expo SDK 55 and older), NetInfo 9.x, safe-area-context 3.x, WebView 13.6.x or 14.x, or React Native older than 0.76. | Move that package into the range in the package README. For view-shot, npm prints `Found: react-native-view-shot@4.0.3` and `peer react-native-view-shot@"^5.0.0" from @userflow-tech/react-native`. Install the SDK and `react-native-view-shot@^5.0.0` in one command, then add `"react-native-view-shot"` to `expo.install.exclude` on Expo SDK 55 and older. Do not retry with `--force` or `--legacy-peer-deps`; that leaves 4.0.3 installed. Raise React Native to 0.76 or later when that is the conflict. |
|
|
13
|
+
| `npm warn ERESOLVE overriding peer dependency` naming `react-native-webview`, or `npm ls` lists two versions of `@react-native-async-storage/async-storage` | An unpinned bare install picked WebView 14 (outside `>=13.8.0 <14`) or AsyncStorage 3 (the SDK keeps its own 2.x copy). npm only warns and installs the invalid tree. | Reinstall with the ranges from the bare command in the package README: `'@react-native-async-storage/async-storage@^2'` and `'react-native-webview@>=13.8.0 <14'`. Then run `pod install` and rebuild. |
|
|
14
|
+
| Yarn 1 or `npm install --legacy-peer-deps` succeeded, but `react-native-webview` or `react-native-view-shot` is not installed | Those installs do not fetch peers. WebView and view-shot are required peers, not dependencies. | Install `react-native-webview` and `react-native-view-shot` in the app (on Expo SDK 56 and 57, `npx expo install react-native-view-shot` unpinned; otherwise `react-native-view-shot@^5.0.0`), then rebuild native. |
|
|
15
|
+
| Banners, flow cards, or Builder bars draw under the status bar, notch, or home indicator. Development logs `[Userflow] react-native-safe-area-context is not installed, so banners, flow cards, and Builder bars draw under the status bar and home indicator. Install it (npx expo install react-native-safe-area-context) and wrap the app in <SafeAreaProvider>.` | `react-native-safe-area-context` is not installed, so insets are zero. | Install the package and wrap the tree in `<SafeAreaProvider>`. |
|
|
16
|
+
| `Uncaught Error` / `NativeModule.RNCNetInfo is null` as soon as `Userflow.init` runs | On SDK 0.3.1 and earlier, NetInfo's JavaScript was loaded while its native module was not in the binary. Debug builds show a red screen. Dismissing it leaves the app running; a release build can crash. | Link `@react-native-community/netinfo` and rebuild, or remove it. Current versions skip NetInfo when `RNCNetInfo` is not registered and log one dev warning instead. |
|
|
17
|
+
| `[@userflow-tech/react-native] schemeId "…" looks like an environment id. Pass the scheme_id value that starts with userflow- (an opaque id from the dashboard), not the environment UUID.` | The config plugin received the environment UUID. | Pass the `scheme_id` (`userflow-…`) from the dashboard. |
|
|
18
|
+
| `No schemeId was passed, so the plugin left the native config unchanged. Builder preview and pairing links will not open this app. Pass the environment scheme_id (userflow-...) from the Userflow dashboard as the plugin schemeId.` | `expo prebuild` ran the plugin without `schemeId`. | Add `{ "schemeId": "userflow-…" }` and rebuild native. |
|
|
19
|
+
| react-native-view-shot is not a direct dependency. Builder element selection needs >=5.0.0. On Expo SDK 56 and 57, run `npx expo install react-native-view-shot` unpinned, with no expo.install.exclude entry for it. On Expo SDK 55 and older, an unpinned install resolves 4.0.3, so pin ^5.0.0 and add "react-native-view-shot" to expo.install.exclude. | Prebuild did not find view-shot in the app `package.json`. | Expo SDK 56 and 57: `npx expo install react-native-view-shot` (unpinned). Expo SDK 55 and older: `npx expo install react-native-view-shot@^5.0.0` and add `"react-native-view-shot"` to `expo.install.exclude`. Then rebuild. |
|
|
20
|
+
| `react-native-safe-area-context is not listed in the app package.json. Expo SDK 53 does not autolink native modules that the app only receives indirectly. Without the native module, banners, flow cards, and Builder bars draw under the status bar and home indicator. Install it in the app (npx expo install react-native-safe-area-context) and wrap the app in <SafeAreaProvider>.` | Expo SDK older than 54, and safe-area-context is not a direct dependency, so its native module is not autolinked. | `npx expo install react-native-safe-area-context` and wrap the tree in `<SafeAreaProvider>`. |
|
|
21
|
+
| `[Userflow] react-native-view-shot@4.0.3 is older than 5.0.0, so Builder element selection may not get a screenshot.` The installed version is filled in. The warning also says not to retry with `--force` or `--legacy-peer-deps`. | view-shot 4.x is installed, usually because an `ERESOLVE` was retried with `--force` or `--legacy-peer-deps`, or the 4.0.3 default on Expo SDK 55 and older was left in place. | Expo SDK 56 and 57: remove any view-shot entry from `expo.install.exclude`, run `npx expo install react-native-view-shot` unpinned, and rebuild. Otherwise install `react-native-view-shot@^5.0.0` in the same command as the SDK and rebuild; on Expo SDK 55 and older, also add `"react-native-view-shot"` to `expo.install.exclude`. |
|
|
22
|
+
| `react-native-view-shot@4.0.3 is older than 5.0.0, which does not work with this SDK. On Expo SDK 56 and 57, run npx expo install react-native-view-shot unpinned, with no expo.install.exclude entry for it. Expo SDK 55 and older default to 4.0.3: pin ^5.0.0 and add "react-native-view-shot" to expo.install.exclude.` | The app has view-shot 4.x. | Expo SDK 56 and 57: `npx expo install react-native-view-shot` (unpinned), then rebuild. Expo SDK 55 and older: pin `^5.0.0`, add the exclude, and rebuild. |
|
|
23
|
+
| `@react-native-async-storage/async-storage is not listed in the app package.json. Expo SDK 53 does not autolink native modules that the app only receives indirectly. Install it in the app (npx expo install @react-native-async-storage/async-storage) and rebuild.` | Expo SDK older than 54, and AsyncStorage is only a transitive dependency. The WebView line is the same shape with `react-native-webview`. | Install that package in the app and rebuild. |
|
|
24
|
+
| `[Userflow] Native setup is incomplete. Flows may not run until you fix the following, then rebuild the app (a Metro reload is not enough):` | Dev-only check on the first `Userflow.init`. Following lines name each missing native module. A missing safe-area package is a separate warning, because flows still run. | Install the named packages and rebuild. The footer is `See node_modules/@userflow-tech/react-native/docs/troubleshooting.md.` |
|
|
25
|
+
| `- @react-native-async-storage/async-storage is not linked. Anonymous users and Builder pairing will not persist. Add it to the app package.json (npx expo install @react-native-async-storage/async-storage), run pod install on iOS, and rebuild.` | AsyncStorage's native module is not in this binary. | Add it to the app `package.json`, run `pod install` on iOS, and rebuild. |
|
|
26
|
+
| `- react-native-view-shot is not linked, so Builder element selection gets no screenshot. Install it and rebuild. On Expo SDK 56 and 57, run npx expo install react-native-view-shot unpinned, with no expo.install.exclude entry for it. Otherwise install react-native-view-shot@^5.0.0; on Expo SDK 55 and older, an unpinned npx expo install resolves 4.0.3.` | `RNViewShot` is not registered. | Expo SDK 56 and 57: `npx expo install react-native-view-shot` (unpinned). Otherwise install `react-native-view-shot@^5.0.0`. Then rebuild. |
|
|
27
|
+
| `- react-native-webview is not linked. Evaluate JavaScript and WebView banners will not run. Install it (npx expo install react-native-webview) and rebuild.` | The WebView native module is not registered. | Install `react-native-webview` and rebuild. |
|
|
28
|
+
| `- react-native-device-info is not linked, so app_version and app_build are not sent. npm install react-native-device-info, then rebuild.` | Bare React Native, and `RNDeviceInfo` is not registered. Expo apps that have `expo-constants` do not log this line. | `npm install react-native-device-info` and rebuild. |
|
|
29
|
+
| `[Userflow] This app is running in Expo Go, which cannot load the SDK native modules. Builder preview links will not open the app. Use a development build (npx expo run:ios / npx expo run:android).` | The app is the Expo Go store client. | Use a development build. |
|
|
30
|
+
| `[Userflow] UserflowProvider is not inside a <SafeAreaProvider>, so flow cards use the device's initial safe-area insets. Wrap your app in <SafeAreaProvider> from react-native-safe-area-context.` | `UserflowProvider` has no `SafeAreaProvider` ancestor. The app does not crash. Cards use `initialWindowMetrics`, or zero insets when those are unavailable. | Wrap the tree in `SafeAreaProvider`. |
|
|
31
|
+
| `Userflow.identifyAnonymous() needs @react-native-async-storage/async-storage, which is not linked in this native build. Add it to your app's package.json, run pod install, and rebuild.` | `identifyAnonymous()` ran without a linked AsyncStorage native module. | Install and rebuild, then call it again. |
|
|
32
|
+
| `clientToken is an environment secret key (esk_...). That key must never ship in the app. Pass the client token (ct_...) from Settings → Environments instead.` | `init` was given an `esk_` secret key. | Pass the `ct_…` client token. |
|
|
33
|
+
| `[Userflow] Userflow.init() already ran with different options. The new clientToken, serverEndpoint, and pairingEndpoint are ignored because init runs once per process. Userflow.reset() does not apply new credentials. Restart the app to change them.` | A later `init` passed a different token or endpoint while a previous `init` is in flight or has succeeded. | Restart the app after a successful init. `reset()` clears the user and does not apply new credentials. If the previous `init` rejected, call `init` again with the corrected token or endpoint. |
|
|
33
34
|
|
|
34
35
|
## Init / identify / group
|
|
35
36
|
|
|
@@ -43,6 +44,7 @@ Messages are quoted exactly so you can search logs for them.
|
|
|
43
44
|
| `Call Userflow.group() before updateGroup()` | `updateGroup` or a group-scoped button attribute before `group()` | Call `Userflow.group(...)` first |
|
|
44
45
|
| `Missing clientToken` | Empty / whitespace token | Pass the `ct_...` value from the dashboard |
|
|
45
46
|
| `… invalid_client_token: Invalid Userflow.js Token: …` | Wrong token or deactivated env | Copy the token from the matching environment. |
|
|
47
|
+
| `… region_mismatch: This token was provisioned in the EU region but is being used in the US region…` | `serverEndpoint` points at a host in a different region than the environment | Remove `serverEndpoint` so the SDK picks the host from the client token, or point it at the environment's region. |
|
|
46
48
|
| `… user_signature_required: …` | Env requires identity verification; no `signature` | Compute HMAC on your backend — [identity-verification.md](identity-verification.md) |
|
|
47
49
|
| `… incorrect_user_signature: …` | Signature does not match HMAC-SHA256(secret, userId) | Sign the **same** id string; use `esk_...`, not `ct_...` |
|
|
48
50
|
| `… group_signature_required` / `incorrect_group_signature` | Same rules for `group()` | Sign the group id with the env secret key |
|
|
@@ -112,18 +114,18 @@ Id matching: dashboard `#invite-teammates` ↔ `userflowId="invite-teammates"`,
|
|
|
112
114
|
|
|
113
115
|
Full setup: [deep-linking.md](deep-linking.md). Pairing is available in all builds (including release).
|
|
114
116
|
|
|
115
|
-
| Symptom | Likely cause | Fix
|
|
116
|
-
| ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ |
|
|
117
|
-
| Deep link opens the app but nothing happens | Scheme added in config but **no native rebuild** | `npx expo prebuild` / new development client; Metro reload is not enough
|
|
118
|
-
| Deep link opens the app but nothing happens, and no **Preview mode** top bar appears | `Userflow.init()` rejected, so there is no session to preview into | Check the logs for `[Userflow] Builder pairing link received, but Userflow.init() failed` — fix that error (usually `clientToken`) and re-open the link
|
|
119
|
-
| Killed app opens from a pairing link with no banner, or Preview returns on the wrong step | Pairing did not resume, or the install joined as a new device while the old presence was still on the topic | Install `expo-secure-store` so a relaunch can resume. A cold start should show **Connecting to Builder…** immediately, then **Preview mode**, with the flow at step 1. `exitPreview()` or an expired token ends resume
|
|
120
|
-
| Deep link opens the app and the router shows **Unmatched Route** / "page could not be found" | Deep link is not the root form from the QR; **or** the link was rebuilt with the app's own scheme instead of `scheme_id` | Open the QR unmodified (`userflow-<id>://?pairing_token=…`). If the log says `a scheme Userflow does not own`, do not substitute your app scheme
|
|
121
|
-
| "Can't select this element" right after pairing, or the app jumps to home when pairing | Expo Router navigated on the pairing link | Add `app/+native-intent.ts` exporting `redirectSystemPath` from `@userflow-tech/react-native/expo-router` (see [deep-linking.md](deep-linking.md#expo-router-hosts))
|
|
122
|
-
| Pairing deep link ignored (preview URL may still work) | Scheme is `userflow-*` but the id after it is empty or has stray hyphens | Use the env's `scheme_id` from the dashboard exactly (e.g. `userflow-v7twv2fw2ja2jaco7kesvowmem`), not the env UUID
|
|
123
|
-
| Builder says “A device was paired earlier…” and Preview closes immediately after a brief spinner | Stale pairing session still present; a ghost device acks | Pair again on the device you are watching, or clear the env's pairing session and re-QR
|
|
124
|
-
| Preview succeeds on the server but the phone stays idle | App is not the paired instance (no **Preview mode** top bar) | Confirm the top bar before hitting Preview; re-open the pairing QR on this install
|
|
125
|
-
| QR / `https://…/pair/<jwt>` does nothing in the app | SDK only parses the **scheme** form after the backend redirect | Open via the OS (scan QR) or forward `{schemeId}://?pairing_token=…` with `handlePairingUrl`
|
|
126
|
-
| Builder selector has no screenshot after Confirm | Missing / unlinked `react-native-view-shot`, or Expo SDK
|
|
117
|
+
| Symptom | Likely cause | Fix |
|
|
118
|
+
| ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
119
|
+
| Deep link opens the app but nothing happens | Scheme added in config but **no native rebuild** | `npx expo prebuild` / new development client; Metro reload is not enough |
|
|
120
|
+
| Deep link opens the app but nothing happens, and no **Preview mode** top bar appears | `Userflow.init()` rejected, so there is no session to preview into | Check the logs for `[Userflow] Builder pairing link received, but Userflow.init() failed` — fix that error (usually `clientToken`) and re-open the link |
|
|
121
|
+
| Killed app opens from a pairing link with no banner, or Preview returns on the wrong step | Pairing did not resume, or the install joined as a new device while the old presence was still on the topic | Install `expo-secure-store` so a relaunch can resume. A cold start should show **Connecting to Builder…** immediately, then **Preview mode**, with the flow at step 1. `exitPreview()` or an expired token ends resume |
|
|
122
|
+
| Deep link opens the app and the router shows **Unmatched Route** / "page could not be found" | Deep link is not the root form from the QR; **or** the link was rebuilt with the app's own scheme instead of `scheme_id` | Open the QR unmodified (`userflow-<id>://?pairing_token=…`). If the log says `a scheme Userflow does not own`, do not substitute your app scheme |
|
|
123
|
+
| "Can't select this element" right after pairing, or the app jumps to home when pairing | Expo Router navigated on the pairing link | Add `app/+native-intent.ts` exporting `redirectSystemPath` from `@userflow-tech/react-native/expo-router` (see [deep-linking.md](deep-linking.md#expo-router-hosts)) |
|
|
124
|
+
| Pairing deep link ignored (preview URL may still work) | Scheme is `userflow-*` but the id after it is empty or has stray hyphens | Use the env's `scheme_id` from the dashboard exactly (e.g. `userflow-v7twv2fw2ja2jaco7kesvowmem`), not the env UUID |
|
|
125
|
+
| Builder says “A device was paired earlier…” and Preview closes immediately after a brief spinner | Stale pairing session still present; a ghost device acks | Pair again on the device you are watching, or clear the env's pairing session and re-QR |
|
|
126
|
+
| Preview succeeds on the server but the phone stays idle | App is not the paired instance (no **Preview mode** top bar) | Confirm the top bar before hitting Preview; re-open the pairing QR on this install |
|
|
127
|
+
| QR / `https://…/pair/<jwt>` does nothing in the app | SDK only parses the **scheme** form after the backend redirect | Open via the OS (scan QR) or forward `{schemeId}://?pairing_token=…` with `handlePairingUrl` |
|
|
128
|
+
| Builder selector has no screenshot after Confirm | Missing / unlinked `react-native-view-shot`, or 4.0.3 from Expo SDK 55 and older | Install view-shot (on Expo SDK 56 and 57, `npx expo install react-native-view-shot` unpinned; otherwise `react-native-view-shot@^5.0.0`) and **rebuild native**. At init, look for `- react-native-view-shot is not linked, so Builder element selection gets no screenshot`. When confirming a pick, look for `[Userflow] Required peer react-native-view-shot is not installed; skipping picker screenshot.` |
|
|
127
129
|
|
|
128
130
|
## Expo
|
|
129
131
|
|
|
@@ -135,11 +137,12 @@ Full setup: [deep-linking.md](deep-linking.md). Pairing is available in all buil
|
|
|
135
137
|
|
|
136
138
|
## Jest
|
|
137
139
|
|
|
138
|
-
| Symptom | Likely cause
|
|
139
|
-
| ------------------------------------------------------------------------------------------------------------------------------------- |
|
|
140
|
-
|
|
|
141
|
-
| `
|
|
142
|
-
|
|
|
140
|
+
| Symptom | Likely cause | Fix |
|
|
141
|
+
| ------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- |
|
|
142
|
+
| `Jest encountered an unexpected token` in a test that loads `@userflow-tech/react-native` or one of its subpaths | The package's `react-native` entry is TypeScript source, and the app's `transformIgnorePatterns` does not include `@userflow-tech`, so Jest reads that source untransformed. | Add the README's Jest mock to the setup file, with a mock for each subpath the app imports. See the README section "Jest". |
|
|
143
|
+
| Snapshots gain `nativeID="uf_…"`, `collapsable={false}`, `__ufid`, or `__ufManual` props, and keep changing after unrelated JSX edits | The Babel plugin runs under Jest, because `babel-jest` reads `babel.config.js`. Its ids depend on file path, component name, sibling order, and static labels. | Skip the plugin when `api.env('test')` is true. See the README section "Babel plugin and snapshot tests". |
|
|
144
|
+
| `Caching has already been configured with .never or .forever()` after adding `api.env('test')` | `babel.config.js` still calls `api.cache(true)` before `api.env`. | Remove `api.cache(true)`. `api.env` already caches per environment. |
|
|
145
|
+
| Component tests load the SDK after enabling the Babel plugin | Full mode imports `@userflow-tech/react-native` into every stamped file. | Mock the SDK in the Jest setup file, or skip the plugin in tests. |
|
|
143
146
|
|
|
144
147
|
## Still stuck?
|
|
145
148
|
|
|
@@ -7,10 +7,12 @@ export interface HostDependencyWarning {
|
|
|
7
7
|
/**
|
|
8
8
|
* Prebuild checks that do not change the native config.
|
|
9
9
|
*
|
|
10
|
-
* `react-native-view-shot` must be at least 5. Expo SDK
|
|
11
|
-
* resolves 4.0.3
|
|
12
|
-
*
|
|
13
|
-
*
|
|
10
|
+
* `react-native-view-shot` must be at least 5. On Expo SDK 55 and older an
|
|
11
|
+
* unpinned install resolves 4.0.3; Expo SDK 56 and 57 bundle 5.1.0, so a
|
|
12
|
+
* `^5.0.0` pin there only adds a version mismatch. Expo SDK 53 and older only
|
|
13
|
+
* autolink native modules listed in the app's own package.json, so
|
|
14
|
+
* AsyncStorage, WebView, and safe-area-context have to be direct dependencies
|
|
15
|
+
* there. Expo SDK 54 and later autolink
|
|
14
16
|
* safe-area-context when Expo Router or React Navigation brought it in, so
|
|
15
17
|
* prebuild does not warn about it on those SDKs. `Userflow.init` warns when
|
|
16
18
|
* the package itself cannot be loaded.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hostDependencyWarnings.d.ts","sourceRoot":"","sources":["../plugin/hostDependencyWarnings.ts"],"names":[],"mappings":"AAKA,kFAAkF;AAClF,eAAO,MAAM,sBAAsB,wOACoM,CAAC;AAExO,MAAM,WAAW,qBAAqB;IACpC,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;CACjB;AAcD
|
|
1
|
+
{"version":3,"file":"hostDependencyWarnings.d.ts","sourceRoot":"","sources":["../plugin/hostDependencyWarnings.ts"],"names":[],"mappings":"AAKA,kFAAkF;AAClF,eAAO,MAAM,sBAAsB,wOACoM,CAAC;AAExO,MAAM,WAAW,qBAAqB;IACpC,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;CACjB;AAcD;;;;;;;;;;;;GAYG;AACH,wBAAgB,sBAAsB,CACpC,WAAW,EAAE,MAAM,GAAG,SAAS,EAC/B,UAAU,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GACpC,qBAAqB,EAAE,CA+CzB;AAED,0FAA0F;AAC1F,wBAAgB,qBAAqB,CACnC,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,KAAK,GAAG,SAAS,EAC3B,QAAQ,EAAE,MAAM,GAAG,IAAI,GACtB,IAAI,CAaN"}
|
|
@@ -17,10 +17,12 @@ const TRANSITIVE_NATIVE_MODULES = [
|
|
|
17
17
|
/**
|
|
18
18
|
* Prebuild checks that do not change the native config.
|
|
19
19
|
*
|
|
20
|
-
* `react-native-view-shot` must be at least 5. Expo SDK
|
|
21
|
-
* resolves 4.0.3
|
|
22
|
-
*
|
|
23
|
-
*
|
|
20
|
+
* `react-native-view-shot` must be at least 5. On Expo SDK 55 and older an
|
|
21
|
+
* unpinned install resolves 4.0.3; Expo SDK 56 and 57 bundle 5.1.0, so a
|
|
22
|
+
* `^5.0.0` pin there only adds a version mismatch. Expo SDK 53 and older only
|
|
23
|
+
* autolink native modules listed in the app's own package.json, so
|
|
24
|
+
* AsyncStorage, WebView, and safe-area-context have to be direct dependencies
|
|
25
|
+
* there. Expo SDK 54 and later autolink
|
|
24
26
|
* safe-area-context when Expo Router or React Navigation brought it in, so
|
|
25
27
|
* prebuild does not warn about it on those SDKs. `Userflow.init` warns when
|
|
26
28
|
* the package itself cannot be loaded.
|
|
@@ -38,7 +40,7 @@ function hostDependencyWarnings(projectRoot, sdkVersion) {
|
|
|
38
40
|
if (!viewShot) {
|
|
39
41
|
warnings.push({
|
|
40
42
|
property: VIEW_SHOT,
|
|
41
|
-
message: 'react-native-view-shot is not a direct dependency. Builder element selection needs >=5.0.0. On Expo SDK
|
|
43
|
+
message: 'react-native-view-shot is not a direct dependency. Builder element selection needs >=5.0.0. On Expo SDK 56 and 57, run `npx expo install react-native-view-shot` unpinned, with no expo.install.exclude entry for it. On Expo SDK 55 and older, an unpinned install resolves 4.0.3, so pin ^5.0.0 and add "react-native-view-shot" to expo.install.exclude.',
|
|
42
44
|
});
|
|
43
45
|
}
|
|
44
46
|
else {
|
|
@@ -46,7 +48,7 @@ function hostDependencyWarnings(projectRoot, sdkVersion) {
|
|
|
46
48
|
if (major != null && major < 5) {
|
|
47
49
|
warnings.push({
|
|
48
50
|
property: VIEW_SHOT,
|
|
49
|
-
message: `react-native-view-shot@${viewShot} is older than 5.0.0. Expo SDK
|
|
51
|
+
message: `react-native-view-shot@${viewShot} is older than 5.0.0, which does not work with this SDK. On Expo SDK 56 and 57, run npx expo install react-native-view-shot unpinned, with no expo.install.exclude entry for it. Expo SDK 55 and older default to 4.0.3: pin ^5.0.0 and add "react-native-view-shot" to expo.install.exclude.`,
|
|
50
52
|
});
|
|
51
53
|
}
|
|
52
54
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hostDependencyWarnings.js","sourceRoot":"","sources":["../plugin/hostDependencyWarnings.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"hostDependencyWarnings.js","sourceRoot":"","sources":["../plugin/hostDependencyWarnings.ts"],"names":[],"mappings":";;;AAuCA,wDAkDC;AAGD,sDAiBC;AA7GD,qCAAuC;AACvC,yCAAiC;AAEjC,yDAAyD;AAEzD,kFAAkF;AACrE,QAAA,sBAAsB,GACjC,qOAAqO,CAAC;AAYxO,MAAM,SAAS,GAAG,wBAAwB,CAAC;AAC3C,MAAM,SAAS,GAAG,gCAAgC,CAAC;AACnD,MAAM,yBAAyB,GAAG;IAChC,2CAA2C;IAC3C,sBAAsB;CACd,CAAC;AAEX;;;;;;;;;;;;GAYG;AACH,SAAgB,sBAAsB,CACpC,WAA+B,EAC/B,UAAqC;IAErC,IAAI,CAAC,WAAW,EAAE,CAAC;QACjB,OAAO,EAAE,CAAC;IACZ,CAAC;IAED,MAAM,YAAY,GAAG,sBAAsB,CAAC,WAAW,CAAC,CAAC;IACzD,IAAI,CAAC,YAAY,EAAE,CAAC;QAClB,OAAO,EAAE,CAAC;IACZ,CAAC;IAED,MAAM,QAAQ,GAA4B,EAAE,CAAC;IAC7C,MAAM,QAAQ,GAAG,YAAY,CAAC,SAAS,CAAC,CAAC;IACzC,IAAI,CAAC,QAAQ,EAAE,CAAC;QACd,QAAQ,CAAC,IAAI,CAAC;YACZ,QAAQ,EAAE,SAAS;YACnB,OAAO,EACL,6VAA6V;SAChW,CAAC,CAAC;IACL,CAAC;SAAM,CAAC;QACN,MAAM,KAAK,GAAG,YAAY,CAAC,QAAQ,CAAC,CAAC;QAC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MAAM,CAAC,SAAS,EAAE,WAAW,EAAE,MAAM,CAAC,UAAU,CAAC,EAAE,CAAC;QAC/F,GAAG,CAAC,OAAO,CAAC,QAAQ,EAAE,OAAO,CAAC,OAAO,CAAC,CAAC;IACzC,CAAC;AACH,CAAC;AAED,SAAS,sBAAsB,CAAC,WAAmB;IACjD,IAAI,CAAC;QACH,MAAM,GAAG,GAAG,IAAA,sBAAY,EAAC,IAAA,gBAAI,EAAC,WAAW,EAAE,cAAc,CAAC,EAAE,MAAM,CAAC,CAAC;QACpE,MAAM,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAgB,CAAC;QAC3C,OAAO,EAAE,GAAG,GAAG,CAAC,YAAY,EAAE,GAAG,GAAG,CAAC,eAAe,EAAE,CAAC;IACzD,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,IAAI,CAAC;IACd,CAAC;AACH,CAAC;AAED,yEAAyE;AACzE,SAAS,YAAY,CAAC,SAAiB;IACrC,MAAM,KAAK,GAAG,SAAS,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;IACrC,IAAI,CAAC,KAAK,EAAE,CAAC;QACX,OAAO,IAAI,CAAC;IACd,CAAC;IACD,OAAO,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;AAC1B,CAAC"}
|
|
@@ -20,7 +20,7 @@ var _asyncStorage = require("./storage/asyncStorage.js");
|
|
|
20
20
|
var _safeArea = require("./surfaces/safeArea.js");
|
|
21
21
|
const INSTALL_CHECK_HEADER = exports.INSTALL_CHECK_HEADER = '[Userflow] Native setup is incomplete. Flows may not run until you fix the following, then rebuild the app (a Metro reload is not enough):';
|
|
22
22
|
const INSTALL_ASYNC_STORAGE_LINE = exports.INSTALL_ASYNC_STORAGE_LINE = '- @react-native-async-storage/async-storage is not linked. Anonymous users and Builder pairing will not persist. Add it to the app package.json (npx expo install @react-native-async-storage/async-storage), run pod install on iOS, and rebuild.';
|
|
23
|
-
const INSTALL_VIEW_SHOT_LINE = exports.INSTALL_VIEW_SHOT_LINE = '- react-native-view-shot is not linked, so Builder element selection gets no screenshot. Install react-native-view-shot
|
|
23
|
+
const INSTALL_VIEW_SHOT_LINE = exports.INSTALL_VIEW_SHOT_LINE = '- react-native-view-shot is not linked, so Builder element selection gets no screenshot. Install it and rebuild. On Expo SDK 56 and 57, run npx expo install react-native-view-shot unpinned, with no expo.install.exclude entry for it. Otherwise install react-native-view-shot@^5.0.0; on Expo SDK 55 and older, an unpinned npx expo install resolves 4.0.3.';
|
|
24
24
|
const INSTALL_WEBVIEW_LINE = exports.INSTALL_WEBVIEW_LINE = '- react-native-webview is not linked. Evaluate JavaScript and WebView banners will not run. Install it (npx expo install react-native-webview) and rebuild.';
|
|
25
25
|
const INSTALL_DEVICE_INFO_LINE = exports.INSTALL_DEVICE_INFO_LINE = '- react-native-device-info is not linked, so app_version and app_build are not sent. npm install react-native-device-info, then rebuild.';
|
|
26
26
|
const INSTALL_CHECK_FOOTER = exports.INSTALL_CHECK_FOOTER = 'See node_modules/@userflow-tech/react-native/docs/troubleshooting.md.';
|
|
@@ -36,7 +36,7 @@ const INSTALL_SAFE_AREA_WARNING = exports.INSTALL_SAFE_AREA_WARNING = '[Userflow
|
|
|
36
36
|
* Builder screenshots may not. The installed version is interpolated.
|
|
37
37
|
*/
|
|
38
38
|
function formatViewShotVersionWarning(version) {
|
|
39
|
-
return `[Userflow] react-native-view-shot@${version} is older than 5.0.0, so Builder element selection may not get a screenshot. ` + '
|
|
39
|
+
return `[Userflow] react-native-view-shot@${version} is older than 5.0.0, so Builder element selection may not get a screenshot. ` + 'On Expo SDK 56 and 57, run npx expo install react-native-view-shot unpinned, with no expo.install.exclude entry for it, and rebuild. ' + 'Otherwise install react-native-view-shot@^5.0.0 in the same command as the SDK and rebuild; on Expo SDK 55 and older, also add "react-native-view-shot" to expo.install.exclude. ' + 'Do not retry the install with --force or --legacy-peer-deps; that leaves this version in place.\n' + INSTALL_CHECK_FOOTER;
|
|
40
40
|
}
|
|
41
41
|
const EXPO_GO_WARNING = exports.EXPO_GO_WARNING = '[Userflow] This app is running in Expo Go, which cannot load the SDK native modules. Builder preview links will not open the app. Use a development build (npx expo run:ios / npx expo run:android).';
|
|
42
42
|
const INIT_OPTIONS_IGNORED_WARNING = exports.INIT_OPTIONS_IGNORED_WARNING = '[Userflow] Userflow.init() already ran with different options. The new clientToken, serverEndpoint, and pairingEndpoint are ignored because init runs once per process. Userflow.reset() does not apply new credentials. Restart the app to change them.';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_getWebView","require","_nativeModules","_asyncStorage","_safeArea","INSTALL_CHECK_HEADER","exports","INSTALL_ASYNC_STORAGE_LINE","INSTALL_VIEW_SHOT_LINE","INSTALL_WEBVIEW_LINE","INSTALL_DEVICE_INFO_LINE","INSTALL_CHECK_FOOTER","INSTALL_SAFE_AREA_WARNING","formatViewShotVersionWarning","version","EXPO_GO_WARNING","INIT_OPTIONS_IGNORED_WARNING","VIEW_SHOT_MODULE","DEVICE_INFO_MODULE","didWarn","readExpoConstants","mod","record","default","executionEnvironment","readViewShotVersion","pkg","length","viewShotVersionWarning","match","major","Number","collectInstallFindings","findings","isAsyncStorageLinked","push","isNativeModuleLinked","isEvalJsWebViewNativeLinked","expoGoWarning","constants","environment","formatInstallWarning","join","warnIfInstallIncomplete","__DEV__","console","warn","isSafeAreaContextInstalled","oldViewShot","expoGo","resetInstallCheckForTests","recordedInitOptions","initOptionsCommitted","recordInitOptions","config","clientToken","serverEndpoint","pairingEndpoint","warnIfInitOptionsIgnored","next","commitInitOptions","releaseFailedInitOptions"],"sourceRoot":"../../src","sources":["installCheck.ts"],"mappings":";;;;;;;;;;;;;;;;AAAA,IAAAA,WAAA,GAAAC,OAAA;AACA,IAAAC,cAAA,GAAAD,OAAA;AACA,IAAAE,aAAA,GAAAF,OAAA;AACA,IAAAG,SAAA,GAAAH,OAAA;AAEO,MAAMI,oBAAoB,GAAAC,OAAA,CAAAD,oBAAA,GAC/B,4IAA4I;AAEvI,MAAME,0BAA0B,GAAAD,OAAA,CAAAC,0BAAA,GACrC,oPAAoP;AAE/O,MAAMC,sBAAsB,GAAAF,OAAA,CAAAE,sBAAA,GACjC,
|
|
1
|
+
{"version":3,"names":["_getWebView","require","_nativeModules","_asyncStorage","_safeArea","INSTALL_CHECK_HEADER","exports","INSTALL_ASYNC_STORAGE_LINE","INSTALL_VIEW_SHOT_LINE","INSTALL_WEBVIEW_LINE","INSTALL_DEVICE_INFO_LINE","INSTALL_CHECK_FOOTER","INSTALL_SAFE_AREA_WARNING","formatViewShotVersionWarning","version","EXPO_GO_WARNING","INIT_OPTIONS_IGNORED_WARNING","VIEW_SHOT_MODULE","DEVICE_INFO_MODULE","didWarn","readExpoConstants","mod","record","default","executionEnvironment","readViewShotVersion","pkg","length","viewShotVersionWarning","match","major","Number","collectInstallFindings","findings","isAsyncStorageLinked","push","isNativeModuleLinked","isEvalJsWebViewNativeLinked","expoGoWarning","constants","environment","formatInstallWarning","join","warnIfInstallIncomplete","__DEV__","console","warn","isSafeAreaContextInstalled","oldViewShot","expoGo","resetInstallCheckForTests","recordedInitOptions","initOptionsCommitted","recordInitOptions","config","clientToken","serverEndpoint","pairingEndpoint","warnIfInitOptionsIgnored","next","commitInitOptions","releaseFailedInitOptions"],"sourceRoot":"../../src","sources":["installCheck.ts"],"mappings":";;;;;;;;;;;;;;;;AAAA,IAAAA,WAAA,GAAAC,OAAA;AACA,IAAAC,cAAA,GAAAD,OAAA;AACA,IAAAE,aAAA,GAAAF,OAAA;AACA,IAAAG,SAAA,GAAAH,OAAA;AAEO,MAAMI,oBAAoB,GAAAC,OAAA,CAAAD,oBAAA,GAC/B,4IAA4I;AAEvI,MAAME,0BAA0B,GAAAD,OAAA,CAAAC,0BAAA,GACrC,oPAAoP;AAE/O,MAAMC,sBAAsB,GAAAF,OAAA,CAAAE,sBAAA,GACjC,kWAAkW;AAE7V,MAAMC,oBAAoB,GAAAH,OAAA,CAAAG,oBAAA,GAC/B,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Ae,EAAEH,MAAM,CAACG,eAAe,IAAI;EAC7C,CAAC;AACH;AAEO,SAASC,wBAAwBA,CAACJ,MAIxC,EAAQ;EACP,MAAMK,IAAI,GAAGN,iBAAiB,CAACC,MAAM,CAAC;EACtC,IAAI,CAACH,mBAAmB,EAAE;IACxBA,mBAAmB,GAAGQ,IAAI;IAC1B;EACF;EACA,IACER,mBAAmB,CAACI,WAAW,KAAKI,IAAI,CAACJ,WAAW,IACpDJ,mBAAmB,CAACK,cAAc,KAAKG,IAAI,CAACH,cAAc,IAC1DL,mBAAmB,CAACM,eAAe,KAAKE,IAAI,CAACF,eAAe,EAC5D;IACA;EACF;EACA,IAAI,CAACb,OAAO,EAAE;EACd;EACAC,OAAO,CAACC,IAAI,CAAC9B,4BAA4B,CAAC;AAC5C;;AAEA;AACO,SAAS4C,iBAAiBA,CAAA,EAAS;EACxCR,oBAAoB,GAAG,IAAI;AAC7B;;AAEA;AACA;AACA;AACA;AACA;AACO,SAASS,wBAAwBA,CAAA,EAAS;EAC/C,IAAIT,oBAAoB,EAAE;EAC1BD,mBAAmB,GAAG,IAAI;AAC5B","ignoreList":[]}
|
|
@@ -7,25 +7,19 @@ exports.resolveCdnHost = resolveCdnHost;
|
|
|
7
7
|
exports.resolveCustomStylesheetUrl = resolveCustomStylesheetUrl;
|
|
8
8
|
exports.themeHasPublishedCustomCss = themeHasPublishedCustomCss;
|
|
9
9
|
exports.themePublishedCssVersion = themePublishedCssVersion;
|
|
10
|
+
/** Backend hosts that serve a theme CDN at `cdn.<host>`. */
|
|
11
|
+
const CDN_BACKEND_HOSTS = ['userflow.com', 'userflowtoolz.com'];
|
|
12
|
+
|
|
10
13
|
/**
|
|
11
|
-
* Map the end-user websocket host to the theme stylesheet CDN host
|
|
12
|
-
*
|
|
14
|
+
* Map the end-user websocket host to the theme stylesheet CDN host. Like web
|
|
15
|
+
* userflow.js this is always `cdn.<backendHost>`: there is no regional CDN
|
|
16
|
+
* (theme CSS is served from the control plane), so `e.eu.` hosts use the US
|
|
17
|
+
* CDN. Local stacks, proxies and unknown hosts fall back to `cdn.userflow.com`.
|
|
13
18
|
*/
|
|
14
19
|
function resolveCdnHost(serverEndpoint) {
|
|
15
|
-
const
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
host = host.slice('https://'.length);
|
|
19
|
-
} else if (host.startsWith('http://')) {
|
|
20
|
-
host = host.slice('http://'.length);
|
|
21
|
-
}
|
|
22
|
-
if (host.startsWith('e.')) {
|
|
23
|
-
return `cdn.${host.slice(2)}`;
|
|
24
|
-
}
|
|
25
|
-
if (host.includes('localhost') || host.includes('127.0.0.1')) {
|
|
26
|
-
return 'cdn.userflow.com';
|
|
27
|
-
}
|
|
28
|
-
return `cdn.${host}`;
|
|
20
|
+
const host = serverEndpoint.trim().replace(/^[a-z][a-z\d+.-]*:\/\//i, '').split(/[:/?#]/)[0] ?? '';
|
|
21
|
+
const backendHost = host.replace(/^e\./, '').replace(/^eu\./, '');
|
|
22
|
+
return CDN_BACKEND_HOSTS.includes(backendHost) ? `cdn.${backendHost}` : 'cdn.userflow.com';
|
|
29
23
|
}
|
|
30
24
|
function themePublishedCssVersion(theme) {
|
|
31
25
|
const cssVersion = theme.cssVersion;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["CDN_BACKEND_HOSTS","resolveCdnHost","serverEndpoint","host","trim","replace","split","backendHost","includes","themePublishedCssVersion","theme","cssVersion","version","String","themeHasPublishedCustomCss","resolveCustomStylesheetUrl","cdnHost","id"],"sourceRoot":"../../../../src","sources":["surfaces/bannerWebView/resolveCdnHost.ts"],"mappings":";;;;;;;;;AAEA;AACA,MAAMA,iBAAiB,GAAG,CAAC,cAAc,EAAE,mBAAmB,CAAC;;AAE/D;AACA;AACA;AACA;AACA;AACA;AACO,SAASC,cAAcA,CAACC,cAAsB,EAAU;EAC7D,MAAMC,IAAI,GACRD,cAAc,CACXE,IAAI,CAAC,CAAC,CACNC,OAAO,CAAC,yBAAyB,EAAE,EAAE,CAAC,CACtCC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE;EAC7B,MAAMC,WAAW,GAAGJ,IAAI,CAACE,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,CAACA,OAAO,CAAC,OAAO,EAAE,EAAE,CAAC;EACjE,OAAOL,iBAAiB,CAACQ,QAAQ,CAACD,WAAW,CAAC,GAAG,OAAOA,WAAW,EAAE,GAAG,kBAAkB;AAC5F;AAEO,SAASE,wBAAwBA,CAACC,KAAoB,EAAiB;EAC5E,MAAMC,UAAU,GAAGD,KAAK,CAACC,UAAU;EACnC,IAAI,OAAOA,UAAU,KAAK,QAAQ,IAAI,OAAOA,UAAU,KAAK,QAAQ,EAAE;IACpE,OAAO,IAAI;EACb;EACA,MAAMC,OAAO,GAAGC,MAAM,CAACF,UAAU,CAAC;EAClC,OAAOC,OAAO,GAAGA,OAAO,GAAG,IAAI;AACjC;AAEO,SAASE,0BAA0BA,CAACJ,KAAoB,EAAW;EACxE,OAAOD,wBAAwB,CAACC,KAAK,CAAC,IAAI,IAAI;AAChD;AAEO,SAASK,0BAA0BA,CACxCb,cAAsB,EACtBQ,KAAoB,EACL;EACf,MAAME,OAAO,GAAGH,wBAAwB,CAACC,KAAK,CAAC;EAC/C,IAAI,CAACE,OAAO,EAAE;IACZ,OAAO,IAAI;EACb;EACA,MAAMI,OAAO,GAAGf,cAAc,CAACC,cAAc,CAAC;EAC9C,OAAO,WAAWc,OAAO,WAAWN,KAAK,CAACO,EAAE,gBAAgBL,OAAO,aAAa;AAClF","ignoreList":[]}
|
package/lib/commonjs/version.js
CHANGED
|
@@ -5,5 +5,5 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.SDK_VERSION = void 0;
|
|
7
7
|
/** Generated by scripts/write-version.mjs — do not edit. */
|
|
8
|
-
const SDK_VERSION = exports.SDK_VERSION = '0.4.
|
|
8
|
+
const SDK_VERSION = exports.SDK_VERSION = '0.4.5';
|
|
9
9
|
//# sourceMappingURL=version.js.map
|
|
@@ -6,7 +6,7 @@ import { isAsyncStorageLinked } from "./storage/asyncStorage.js";
|
|
|
6
6
|
import { isSafeAreaContextInstalled } from "./surfaces/safeArea.js";
|
|
7
7
|
export const INSTALL_CHECK_HEADER = '[Userflow] Native setup is incomplete. Flows may not run until you fix the following, then rebuild the app (a Metro reload is not enough):';
|
|
8
8
|
export const INSTALL_ASYNC_STORAGE_LINE = '- @react-native-async-storage/async-storage is not linked. Anonymous users and Builder pairing will not persist. Add it to the app package.json (npx expo install @react-native-async-storage/async-storage), run pod install on iOS, and rebuild.';
|
|
9
|
-
export const INSTALL_VIEW_SHOT_LINE = '- react-native-view-shot is not linked, so Builder element selection gets no screenshot. Install react-native-view-shot
|
|
9
|
+
export const INSTALL_VIEW_SHOT_LINE = '- react-native-view-shot is not linked, so Builder element selection gets no screenshot. Install it and rebuild. On Expo SDK 56 and 57, run npx expo install react-native-view-shot unpinned, with no expo.install.exclude entry for it. Otherwise install react-native-view-shot@^5.0.0; on Expo SDK 55 and older, an unpinned npx expo install resolves 4.0.3.';
|
|
10
10
|
export const INSTALL_WEBVIEW_LINE = '- react-native-webview is not linked. Evaluate JavaScript and WebView banners will not run. Install it (npx expo install react-native-webview) and rebuild.';
|
|
11
11
|
export const INSTALL_DEVICE_INFO_LINE = '- react-native-device-info is not linked, so app_version and app_build are not sent. npm install react-native-device-info, then rebuild.';
|
|
12
12
|
export const INSTALL_CHECK_FOOTER = 'See node_modules/@userflow-tech/react-native/docs/troubleshooting.md.';
|
|
@@ -22,7 +22,7 @@ export const INSTALL_SAFE_AREA_WARNING = '[Userflow] react-native-safe-area-cont
|
|
|
22
22
|
* Builder screenshots may not. The installed version is interpolated.
|
|
23
23
|
*/
|
|
24
24
|
export function formatViewShotVersionWarning(version) {
|
|
25
|
-
return `[Userflow] react-native-view-shot@${version} is older than 5.0.0, so Builder element selection may not get a screenshot. ` + '
|
|
25
|
+
return `[Userflow] react-native-view-shot@${version} is older than 5.0.0, so Builder element selection may not get a screenshot. ` + 'On Expo SDK 56 and 57, run npx expo install react-native-view-shot unpinned, with no expo.install.exclude entry for it, and rebuild. ' + 'Otherwise install react-native-view-shot@^5.0.0 in the same command as the SDK and rebuild; on Expo SDK 55 and older, also add "react-native-view-shot" to expo.install.exclude. ' + 'Do not retry the install with --force or --legacy-peer-deps; that leaves this version in place.\n' + INSTALL_CHECK_FOOTER;
|
|
26
26
|
}
|
|
27
27
|
export const EXPO_GO_WARNING = '[Userflow] This app is running in Expo Go, which cannot load the SDK native modules. Builder preview links will not open the app. Use a development build (npx expo run:ios / npx expo run:android).';
|
|
28
28
|
export const INIT_OPTIONS_IGNORED_WARNING = '[Userflow] Userflow.init() already ran with different options. The new clientToken, serverEndpoint, and pairingEndpoint are ignored because init runs once per process. Userflow.reset() does not apply new credentials. Restart the app to change them.';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["isEvalJsWebViewNativeLinked","isNativeModuleLinked","isAsyncStorageLinked","isSafeAreaContextInstalled","INSTALL_CHECK_HEADER","INSTALL_ASYNC_STORAGE_LINE","INSTALL_VIEW_SHOT_LINE","INSTALL_WEBVIEW_LINE","INSTALL_DEVICE_INFO_LINE","INSTALL_CHECK_FOOTER","INSTALL_SAFE_AREA_WARNING","formatViewShotVersionWarning","version","EXPO_GO_WARNING","INIT_OPTIONS_IGNORED_WARNING","VIEW_SHOT_MODULE","DEVICE_INFO_MODULE","didWarn","readExpoConstants","mod","require","record","default","executionEnvironment","readViewShotVersion","pkg","length","viewShotVersionWarning","match","major","Number","collectInstallFindings","findings","push","expoGoWarning","constants","environment","formatInstallWarning","join","warnIfInstallIncomplete","__DEV__","console","warn","oldViewShot","expoGo","resetInstallCheckForTests","recordedInitOptions","initOptionsCommitted","recordInitOptions","config","clientToken","serverEndpoint","pairingEndpoint","warnIfInitOptionsIgnored","next","commitInitOptions","releaseFailedInitOptions"],"sourceRoot":"../../src","sources":["installCheck.ts"],"mappings":";;AAAA,SAASA,2BAA2B,QAAQ,wBAAqB;AACjE,SAASC,oBAAoB,QAAQ,oBAAiB;AACtD,SAASC,oBAAoB,QAAQ,2BAAwB;AAC7D,SAASC,0BAA0B,QAAQ,wBAAqB;AAEhE,OAAO,MAAMC,oBAAoB,GAC/B,4IAA4I;AAE9I,OAAO,MAAMC,0BAA0B,GACrC,oPAAoP;AAEtP,OAAO,MAAMC,sBAAsB,GACjC,
|
|
1
|
+
{"version":3,"names":["isEvalJsWebViewNativeLinked","isNativeModuleLinked","isAsyncStorageLinked","isSafeAreaContextInstalled","INSTALL_CHECK_HEADER","INSTALL_ASYNC_STORAGE_LINE","INSTALL_VIEW_SHOT_LINE","INSTALL_WEBVIEW_LINE","INSTALL_DEVICE_INFO_LINE","INSTALL_CHECK_FOOTER","INSTALL_SAFE_AREA_WARNING","formatViewShotVersionWarning","version","EXPO_GO_WARNING","INIT_OPTIONS_IGNORED_WARNING","VIEW_SHOT_MODULE","DEVICE_INFO_MODULE","didWarn","readExpoConstants","mod","require","record","default","executionEnvironment","readViewShotVersion","pkg","length","viewShotVersionWarning","match","major","Number","collectInstallFindings","findings","push","expoGoWarning","constants","environment","formatInstallWarning","join","warnIfInstallIncomplete","__DEV__","console","warn","oldViewShot","expoGo","resetInstallCheckForTests","recordedInitOptions","initOptionsCommitted","recordInitOptions","config","clientToken","serverEndpoint","pairingEndpoint","warnIfInitOptionsIgnored","next","commitInitOptions","releaseFailedInitOptions"],"sourceRoot":"../../src","sources":["installCheck.ts"],"mappings":";;AAAA,SAASA,2BAA2B,QAAQ,wBAAqB;AACjE,SAASC,oBAAoB,QAAQ,oBAAiB;AACtD,SAASC,oBAAoB,QAAQ,2BAAwB;AAC7D,SAASC,0BAA0B,QAAQ,wBAAqB;AAEhE,OAAO,MAAMC,oBAAoB,GAC/B,4IAA4I;AAE9I,OAAO,MAAMC,0BAA0B,GACrC,oPAAoP;AAEtP,OAAO,MAAMC,sBAAsB,GACj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