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

Abierto
#2,796 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
1-2 días
Aptitud para principiantes
42/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
kotlin

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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.

Lenguaje dominante
Kotlin
Estrellas
1.7k
Forks
85
Métricas de merge de PR
Sin PR fusionados en 30 d

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de DimensionDev/Flare

Todos los issues de DimensionDev/Flare

Issues similares

Más issues de Kotlin

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.