makecindy / makecindy/cindy

Android 端点击图标启动即崩溃:缺少 EAS Project ID 导致 observability 初始化抛异常

Open
#561 1 comment 0 reactions 0 assignees View on GitHub
bug
Dominant language
TypeScript
Stars
2.7k
Forks
395
Avg merge
21h 48m
Merged PRs (30d)
776

Description

**提交人**: chenshangyu
**客户端版本**: 0.1.14

---

## 现象
在 Android 平板上点击 Cindy 应用图标后**立即闪退**(启动即崩,进不了任何界面)。稳定必现。

## 环境(崩溃相关设备信息)
- 设备:LENOVO TB323FU(联想拯救者 Y700)
- 系统:Android 16 / SDK 36 / ZUXOS 2.0.12.088(`TB323FU_CN_OPEN_USER_Q00020.0_A16_ZUXOS_2.0.12.088_ST_260610`)
- Cindy Android 版本:0.1.0(versionCode 12),包名 `com.xd.cindycn`

## 复现步骤
1. 在 launcher 点击 Cindy 图标启动
2. 应用秒退,无任何可见界面

## 期望行为
应用正常启动进入主界面。

## 实际行为
JS 运行时在全局模块加载阶段(`global@1:136895` → metroRequire 链)即抛出异常,`expo-updates-error-recovery` 将其上报为 FATAL EXCEPTION,进程崩溃。错误恢复重试后再次崩溃(logcat 中 10:30:33、10:30:37 连续两次同样的 FATAL)。

**根因(崩溃消息):**
```
FATAL EXCEPTION: expo-updates-error-recovery
Process: com.xd.cindycn
com.facebook.react.common.JavascriptException: [runtime not ready]: Error: Exception in HostFunction: Project ID is required to send observability metrics. Make sure you have configured it correctly in app.json.
```

即 observability metrics 模块初始化时要求 EAS **Project ID**,但当前发布包的 `app.json`(`expo.extra.eas.projectId`)未正确配置。因该初始化位于 bundle 全局加载阶段,异常导致 JS runtime 无法就绪(`[runtime not ready]`),应用启动即崩。

**Java 侧堆栈(节选):**
```
at com.facebook.react.modules.core.ExceptionsManagerModule.reportException(ExceptionsManagerModule.kt:52)
at com.facebook.react.runtime.ReactInstance$ReactJsExceptionHandlerImpl.reportJsException(ReactInstance.kt:303)
at com.facebook.jni.NativeRunnable.run(Native Method)
...
```

## 建议排查方向
检查该 Android 发布包构建时 `app.json` / EAS 配置中的 `projectId` 是否缺失或与实际项目不匹配;或让 observability metrics 初始化在缺少 Project ID 时降级/跳过而非抛致命异常,避免启动崩溃。

(完整 logcat crash 缓冲区已通过 USB 调试抓取,可按需提供。)
---
**OS**: win32 x64 (10.0.26200)
**界面语言**: zh-CN

Contributor guide

Open the contributing guide

Research direction

Check app.json and the EAS build configuration for expo.extra.eas.projectId, then trace the observability metrics initialization described in the startup stack. Reproduce with the affected Android release build and inspect logcat; done means the app reaches the main screen without a fatal startup exception.

Written by the indexing model from the issue text.

Assessment

Tech stack
react-native, typescript
Domain
mobile, observability-sre
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
58/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.