Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

在相對性能不足的手機上 10 s 影片拍攝會直接 crashing #753

Closed
scott-dt opened this issue Jun 28, 2021 · 4 comments
Closed
Labels
bug Something isn't working fix/feature verified The fix has been verified by QA
Milestone

Comments

@scott-dt
Copy link

Description

10s 影片拍攝完後會一直跑圈圈 然後會直接 crashing app 沒有回應

Steps to Reproduce

  1. 將原本於手機的 capture APP 刪除
  2. 後新安裝 APP
  3. 不載入帳號舊有資料
  4. 點擊相機 ICON 選擇錄製影像 ( 沒有更動 " 相機配置 " )

原始相機配置為
FHD 格式
60 FPS

5. 點擊錄影  時間 10 s 按下確認
6. 會跳回 capture 頁面並於面顯示 capture 收集資訊的狀態  " 轉圈圈 " 
7. app 自行關閉 

## Expected Behavior

- Expected: 可正常錄製影像 10 s , 上傳成功
- Actual: app 會直接關閉 , 該 capture 無法正確上傳 且 無法在重新上傳 

## Logs
https://dt42-numbers.slack.com/files/U016NFQ5M5F/F02683DKE91/screen_recording_20210625-232447_capture.mp4


## Environment

- Version: 0.32.0 , 0.33.0 , 0.34.1
- OS:  Android 9 
- Device: HTC Exodus 1 
@scott-dt scott-dt added the bug Something isn't working label Jun 28, 2021
@scott-dt
Copy link
Author

scott-dt commented Jun 30, 2021

Environment

  • Version: 0.31.1
  • OS: Android 9
  • Device: HTC Exodus 1
    測試錄製
    15 s 兩次 pass
    20 s 兩次 pass
    25 s 兩次 pass
    30 s 兩次 crash

@shc261392
Copy link
Contributor

The issue is reproducible on Google Play downloaded v0.34.1

@scott-dt scott-dt added this to the RC 4.0 milestone Jul 1, 2021
@shc261392
Copy link
Contributor

The crash is caused by signing a very large serialized data with Web3. It's highly possible that the reason of crashing is directly tied to the size of string.

The current signedTargets would contain the whole file content in base64 format which could be very large for video Capture. (about 10MB for 2s video on Exodus 1)

{
  "indexedAssets":{
    "<the-whole-file-content-base64-string>":{
      "mimeType":"video/mp4"
    }
  },
  "truth":{
    "providers":{
      "CapacitorFactsProvider":{
        "APP_BUILD":"152",
        "APP_ID":"io.numbersprotocol.capturelite",
        "APP_NAME":"Capture",
        "APP_VERSION":"0.32.2",
        "BATTERY_LEVEL":0.9599999785423279,
        "DEVICE_NAME":"EXODUS 1",
        "DISK_FREE":412057600,
        "DISK_TOTAL":4225581056,
        "GEOLOCATION_LATITUDE":25.005851,
        "GEOLOCATION_LONGITUDE":121.4586974,
        "IS_CHARGING":true,
        "IS_VIRTUAL":false,
        "MANUFACTURER":"HTC",
        "MEM_USED":5414752,
        "OPERATING_SYSTEM":"android",
        "OS_VERSION":"9",
        "PLATFORM":"android",
        "UUID":"16eb24e0fa1f8a28"
      }
    },
    "timestamp":1625213302097
  }
}

The actual reason of crashing is probably a Web3 upstream issue so I'm not planning to trace it further deep down.

A quick and solid solution for us would be replace the base64 key with sha256sum like below.

{
  "indexedAssets":{
    "47af037408a25364f8d18b133fa96ba4afb2b60e53d5329ee629e2a28a8e2bcd":{
      "mimeType":"video/mp4"
    }
  },
  "truth":{
    "providers":{
      "CapacitorFactsProvider":{
        "APP_BUILD":"152",
        "APP_ID":"io.numbersprotocol.capturelite",
        "APP_NAME":"Capture",
        "APP_VERSION":"0.32.2",
        "BATTERY_LEVEL":0.9599999785423279,
        "DEVICE_NAME":"EXODUS 1",
        "DISK_FREE":412057600,
        "DISK_TOTAL":4225581056,
        "GEOLOCATION_LATITUDE":25.005851,
        "GEOLOCATION_LONGITUDE":121.4586974,
        "IS_CHARGING":true,
        "IS_VIRTUAL":false,
        "MANUFACTURER":"HTC",
        "MEM_USED":5414752,
        "OPERATING_SYSTEM":"android",
        "OS_VERSION":"9",
        "PLATFORM":"android",
        "UUID":"16eb24e0fa1f8a28"
      }
    },
    "timestamp":1625213302097
  }
}

@scott-dt
Copy link
Author

scott-dt commented Jul 7, 2021

210706 0.34.2 fix

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working fix/feature verified The fix has been verified by QA
Projects
None yet
Development

No branches or pull requests

2 participants