buildMetaData task doesn't generate reproducible binaries

オープン
#1,885 コメント 0 件 リアクション 2 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
45/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
android

調査の方向性

まず Android runtime の buildMetaData タスクを特定し、ローカルおよび Docker、Podman、または GitHub Actions 環境で APK の生成を再現します。出力を diffoscope で比較します。同じ compileSdk に対して、環境に関係なくメタデータバイナリが byte-for-byte で同一であれば完了です。

索引モデルが issue の本文から書いたものです。

説明

Environment
Provide version numbers for the following components (information can be retrieved by running tns info in your project folder or by inspecting the package.json of the project):

  • CLI: 9.0.1
  • Cross-platform modules:
  • Android Runtime: 8.9.2 and 9.0.0
  • iOS Runtime (if applicable): -
  • Plugin(s): -

Describe the bug
buildMetaData task generates metadata binaries that are not deterministic and reproducible, Even with the same --compileSdk version set and exact Java, SDK, etc.. So, security checks will fail specially in opensource app stores like IzzyOnDroid and F-Droid.
The issue might be related to using methods like listFiles() without performing a sort on files or maybe different locale properties, I'm just guessing from my researches.
I've attached a diffoscope result to see the difference.

diff-with-upstream.html

To Reproduce

  • Generate an APK locally
  • Generate the same APK using a docker/podman container or Github actions
  • diff the results using any tool like diffoscope

Expected behavior
The metadata binaries should be exactly same for a specific compileSdk without considering which environment its running the buildMetaData task.

主要言語
C++
スター
563
フォーク
144
平均マージ
10時間 46分
マージ済み PR(30日)
14

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

NativeScript/android のほかの issue

NativeScript/android の issue をすべて見る

似ている issue

C++ の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。