makecindy / makecindy/cindy

bug: 伙伴弹出任务执行框后应用闪退

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

Description

### 问题描述 / What happened

安卓或者iOS 伙伴弹出任务执行框后应用闪退,CredentialInstallation 初始化触发 link failed: EACCES

### 环境 / Environment

设备:Xiaomi Mi 10
Android:10(API 29)
MIUI:V12.0.8.0.QJBCNXM
包名:com.xd.cindycn
App 版本:0.1.14(versionCode 26)
设备序列号:edb65576

### 复现步骤 / Steps to reproduce

在伙伴执行任务过程中,界面弹出任务执行框,真机就会闪退,下次进去还是立即闪退

### 日志与截图 / Logs & screenshots

Image

Process: com.xd.cindycn
Package: com.xd.cindycn v26 (0.1.14)
Foreground: Yes

java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
Caused by: android.system.ErrnoException: link failed: EACCES (Permission denied)
at libcore.io.Linux.link(Native Method)
at android.system.Os.link(Os.java:345)
at app.cindy.credentials.CredentialInstallation.(CredentialDirectory.kt:37)
at app.cindy.credentials.MobileCredentialClient.installation_delegate$lambda$0(MobileCredentialClient.kt:33)
at app.cindy.credentials.MobileCredentialClient.getInstallation(MobileCredentialClient.kt:33)
at app.cindy.credentials.MobileCredentialClient.getVault(MobileCredentialClient.kt:34)
at app.cindy.credentials.MobileCredentialClient.close(MobileCredentialClient.kt:199)
at app.cindy.credentials.MobileCredentialClient.reset(MobileCredentialClient.kt:201)
at app.cindy.credentials.MobileCredentialClient.destroy(MobileCredentialClient.kt:202)
at app.cindy.credentials.CindyRemoteCredentialsModule$definition$1$18$1.run(CindyRemoteCredentialsModule.kt:44)
对应代码路径:

apps/mobile/modules/cindy-remote-credentials/android/src/main/java/
app/cindy/credentials/CredentialDirectory.kt:37

当前实现通过:

Os.link(temporary.path, marker.path)
为 noBackupFilesDir/remote-credentials/installation 创建 hard link。该调用在此设备上返回 EACCES,异常未被转化或兜底,最终在主线程 Handler 中导致进程退出。

初步判断

问题大概率发生在移动端远程凭证模块销毁/重置路径:

CindyRemoteCredentialsModule.destroy
→ MobileCredentialClient.destroy/reset/close
→ lazy 初始化 CredentialVault
→ lazy 初始化 CredentialInstallation
→ Os.link(...)
→ EACCES
→ 未捕获异常导致应用崩溃

因此,任务执行框本身可能只是触发了伙伴状态切换或模块销毁的入口;目前日志能确定的是:闪退根因是 CredentialInstallation 创建安装标记时的 Os.link 权限错误,暂不能仅凭日志确认任务执行框 UI 逻辑本身有问题。

疑似 PR #4207 引入的 Android 原生凭证兼容性问题(bce11b8a85);需确认任务执行框与凭证模块销毁之间的触发关系。”

Contributor guide

Open the contributing guide

Research direction

Start with apps/mobile/modules/cindy-remote-credentials/android/src/main/java/app/cindy/credentials/CredentialDirectory.kt:37 and trace the destroy/reset/close path through MobileCredentialClient and CindyRemoteCredentialsModule. Compare the behavior introduced by PR #4207 and reproduce the EACCES case on the reported Android environment. Done means the credential lifecycle no longer crashes the app when installation initialization fails.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, kotlin
Domain
mobile
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.