Web client: importing a 1.8.0 data export crashes on an unknown UiStrings value ('ForYou') and applies nothing

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

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

評価

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

調査の方向性

Start by tracing ImportDataPresenter.import(), then inspect ImportAppDatabasePresenter and ImportSettingsPresenter to see how database and settings imports handle unknown values. The issue does not identify relevant test files, so locate existing import tests before choosing a reproduction. Done means importing the supplied export no longer aborts without applying any data, and the failure is surfaced or handled clearly.

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

説明

What happened

I exported my data from the iOS app (Settings → Data export, app version 1.8.0) and imported the JSON file on https://web.flareapp.moe. The import fails with a raw Kotlin exception shown to the user:

dev.dimension.flare.ui.model.UiStrings does not contain element with name 'ForYou'
at path $.tabSettingsV2.homeSlots[0].content.children[2].content.target.title.string

After that, neither the exported accounts nor the tab settings appear in the web client (account list is still empty).

Environment

  • Source of the export: Flare iOS 1.8.0 (App Store build), containing tabs from several platforms
  • Target: web client at https://web.flareapp.moe (Chromium, Windows)
  • Failing tab: xqt.featured (title UiText.Localized("ForYou")), alongside xqt.popular → "Popular"

Minimal reproduction (redacted)

Account ids, DID, protobuf data payloads and all credentials are replaced with placeholders.
In this trimmed file the failing tab is at index 0 of the group — in my original export it sat at index 2 of the mixed timeline group.

{
 "appDatabase": {
  "accounts": [
   {"account_key":{"id":"2222222222","host":"x.com"},
    "credential_json":"{\"redacted\":\"<credentials removed>\"}",
    "platform_type":"xQt","last_active":1700000000000,"sort_id":1}
  ]
 },
 "settings": {
  "appearanceBag": {"entries": {}},
  "appSettings": {"version":"1.8.0","refreshHomeTimelineOnLaunch":false,"rememberHomeTimelinePosition":true},
  "tabSettingsV2": {
   "homeSlots": [
    {"id":"mixed_timeline_system_home",
     "content":{"type":"group","source":"SystemHome","mergePolicy":"TimePerPage","children":[
       {"id":"xqt.featured:[email protected]",
        "content":{"type":"source","target":{
          "id":"xqt.featured:[email protected]","specId":"xqt.featured",
          "title":{"type":"dev.dimension.flare.ui.model.UiText.Localized","string":"ForYou"},
          "icon":{"type":"dev.dimension.flare.data.model.IconType.FavIcon","host":"x.com"},
          "data":"<redacted>",
          "ownerAccountKey":{"id":"2222222222","host":"x.com"}}}}
     ]}}
   ]
  }
 }
}

Analysis

  1. ImportDataPresenter.import() runs ImportAppDatabasePresenter and then ImportSettingsPresenter. UiText.Localized.string is a serialized UiStrings enum, so a value that the running build does not know makes kotlinx.serialization throw, and the whole import is aborted. There is no fallback to UiText.Raw / no per-tab skip.
  2. The currently deployed web build cannot know ForYou: the shipped /_app/immutable/assets/flare.*.wasm contains Featured, MastodonLocal, XQT, but zero occurrences of ForYou / Popular / WeiboFriendsCircle / xQt. So the deployed web build predates the August 2026 platform-id migration (XQT → xQt), while iOS 1.8.0 already writes the new ids.
  3. Even with a newer web build, the web client only bundles Bluesky / Mastodon / Misskey (web-shared/build.gradle.kts), so tabs belonging to platforms that aren't bundled (e.g. the X tab here) are not renderable there at all. Importing such a file into the web client is a dead end that currently surfaces as a crash instead of a clear message.

Suggested improvements

  • Make import forward-compatible: unknown UiStrings / unknown specId / unknown platformId should be skipped with a warning (or mapped to UiText.Raw(fallbackString)) instead of throwing and aborting the entire import.
  • Surface a human-readable error instead of the raw SerializationException (UiStrings does not contain element with name … at path $.tabSettingsV2…).
  • Skip accounts whose platform is not registered in the current build, and tell the user which ones were skipped.
  • Redeploy https://web.flareapp.moe from master — the deployed bundle is several months behind the app.

Side note on credentials

The export embeds plaintext credentials in credential_json (session cookies / access tokens for every connected account) in unencrypted JSON (see also #1677). It would help to warn about this in the export dialog and to offer a "settings/tabs only, no credentials" export, since the file looks like a harmless config dump.

主要言語
Kotlin
スター
1.7k
フォーク
85
PR マージ指標
30日以内にマージされた PR はありません

環境構築

はじめの一歩

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

DimensionDev/Flare のほかの issue

DimensionDev/Flare の issue をすべて見る

似ている issue

Kotlin の issue をもっと見る

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

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