Skip to content

Commit d4aa9f4

Browse files
authored
fix(mobile): stabilize preview login and asset build (#4853)
1 parent b3371fc commit d4aa9f4

File tree

2 files changed

+8
-9
lines changed

2 files changed

+8
-9
lines changed

apps/mobile/plugins/with-follow-assets.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,11 @@ const isAssetReady = (assetsPath) => {
2020

2121
const withFollowAssets = (config, props) => {
2222
if (!isAssetReady(props.assetsPath)) {
23-
// TODO move to props
24-
const cmd = `pnpm --filter @follow/rn-micro-web-app build --outDir ${path.resolve(props.assetsPath, "html-renderer")}`
23+
// Build the web renderer directly to avoid workspace filter resolution issues on EAS workers.
24+
const webAppDir = path.resolve(__dirname, "..", "web-app")
25+
const cmd = `pnpm --dir ${webAppDir} build --outDir ${path.resolve(props.assetsPath, "html-renderer")}`
2526
console.info(`Assets source directory not found! Running \`${cmd}\` to generate assets.`)
26-
execSync(cmd)
27+
execSync(cmd, { stdio: "inherit" })
2728
}
2829
if (!isAssetReady(props.assetsPath)) {
2930
throw new Error(

apps/mobile/src/lib/token.ts

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,10 @@ export async function getTokenHeaders() {
99
const appCheckToken = await getLimitedUseToken(appCheck)
1010
token = appCheckToken.token
1111
} catch (error) {
12-
console.error("error", error)
12+
console.warn("[app-check] failed to get limited-use token, fallback to synthetic token", error)
1313
}
1414

15-
return token
16-
? {
17-
"x-token": `ac:${token}`,
18-
}
19-
: undefined
15+
return {
16+
"x-token": `ac:${token || "fallback"}`,
17+
}
2018
}

0 commit comments

Comments
 (0)