Skip to content

Open-source gym & body-weight tracker, now in the App Store (iPhone + Apple Watch) and as an Android APK. Plan routines, log workouts, see which muscles are trained, import from Strong/Hevy/FitNotes. Self-host it or use it on the phone alone.

Settings, Server & sync: a phone an earlier version unpaired says it is not connected to a server once, and its server row reads Server address unknown instead of repeating the same sentence

Duarte Santos34f92f8118e3
diff --git a/frontend/src/components/ServerSync.jsx b/frontend/src/components/ServerSync.jsx
index 44f3ca4c3..ff22fb4fa 100644
--- a/frontend/src/components/ServerSync.jsx
+++ b/frontend/src/components/ServerSync.jsx
@@ -237,7 +237,9 @@ export function ServerSyncSection({ children }) {
try { await syncNowWithToast() } finally { setBusy(false) }
}
return <Section title={t('Server & sync')}>
- <Row icon="globe" iconTint="var(--blue)" title={sync.server ? hostOf(sync.server) : t('This phone is not connected to a server.')}
+ {/* No address: a phone an earlier version unpaired. The status row below already says it is
+ not connected; this row only says which server, and there is none to name. */}
+ <Row icon="globe" iconTint="var(--blue)" title={sync.server ? hostOf(sync.server) : t('Server address unknown')}
subtitle={t('Signed in as {0}', user.name)} />
<Row icon={view.icon} iconTint={TINT[view.tone]} title={view.line} subtitle={sub} className="sync-status" />
<Row icon="reset" iconTint="var(--acc)" title={busy ? t('Syncing…') : t('Sync now')} onClick={now} />
diff --git a/frontend/src/lib/pt-br-locale.test.js b/frontend/src/lib/pt-br-locale.test.js
index 3d7b9cf0f..0aaf701ca 100644
--- a/frontend/src/lib/pt-br-locale.test.js
+++ b/frontend/src/lib/pt-br-locale.test.js
@@ -41,7 +41,7 @@ describe('Brazilian Portuguese locale', () => {
// has to be taught is a number nobody reads. What the numbers stood for is asserted above.
// If the hash fails, review the changed keys and wording before accepting a new one. From
// frontend/: node scripts/pt-br-inheritance-fingerprint.mjs --list
- expect(fingerprint, 'pt-PT inheritance changed; review the inherited pt-BR wording').toBe('1a6ecca227bbbead13b5be3e4e410f1e1c9ac36bd32d31199bfd1581d792f4ef')
+ expect(fingerprint, 'pt-PT inheritance changed; review the inherited pt-BR wording').toBe('84118d194e69dafad1d5ec891d78b04346621b5107a5199ed4e9b89c422f7b4d')
})
test('does not leak European Portuguese UI terms', () => {
diff --git a/frontend/src/locales/ar.js b/frontend/src/locales/ar.js
index ab6994aa7..19a51ed31 100644
--- a/frontend/src/locales/ar.js
+++ b/frontend/src/locales/ar.js
@@ -1600,4 +1600,5 @@ export default {
'The server cannot be reached': 'تعذّر الوصول إلى الخادم',
'Your server cannot be reached — your changes are saved on this device and sync once it answers again.': 'تعذّر الوصول إلى خادمك — تُحفظ تغييراتك على هذا الجهاز وتتزامن عندما يستجيب مجددًا.',
'Your server cannot be reached — showing the last copy synced with it.': 'تعذّر الوصول إلى خادمك — يُعرض آخر نسخة متزامنة معه.',
+ 'Server address unknown': 'عنوان الخادم غير معروف',
}
diff --git a/frontend/src/locales/de.js b/frontend/src/locales/de.js
index b19a376cb..9339b3270 100644
--- a/frontend/src/locales/de.js
+++ b/frontend/src/locales/de.js
@@ -1567,4 +1567,5 @@ export default {
'The server cannot be reached': 'Der Server ist nicht erreichbar',
'Your server cannot be reached — your changes are saved on this device and sync once it answers again.': 'Dein Server ist nicht erreichbar — deine Änderungen sind auf diesem Gerät gespeichert und werden synchronisiert, sobald er wieder antwortet.',
'Your server cannot be reached — showing the last copy synced with it.': 'Dein Server ist nicht erreichbar — zeigt die zuletzt mit ihm synchronisierte Kopie.',
+ 'Server address unknown': 'Serveradresse unbekannt',
}
diff --git a/frontend/src/locales/es.js b/frontend/src/locales/es.js
index 5c467db17..b1fc0a708 100644
--- a/frontend/src/locales/es.js
+++ b/frontend/src/locales/es.js
@@ -1547,4 +1547,5 @@ export default {
'The server cannot be reached': 'No se puede llegar al servidor',
'Your server cannot be reached — your changes are saved on this device and sync once it answers again.': 'No se puede llegar a tu servidor: tus cambios se guardan en este dispositivo y se sincronizarán cuando vuelva a responder.',
'Your server cannot be reached — showing the last copy synced with it.': 'No se puede llegar a tu servidor: se muestra la última copia sincronizada con él.',
+ 'Server address unknown': 'Dirección del servidor desconocida',
}
diff --git a/frontend/src/locales/fr.js b/frontend/src/locales/fr.js
index 407b4f42b..b57df512c 100644
--- a/frontend/src/locales/fr.js
+++ b/frontend/src/locales/fr.js
@@ -1547,4 +1547,5 @@ export default {
'The server cannot be reached': 'Le serveur est injoignable',
'Your server cannot be reached — your changes are saved on this device and sync once it answers again.': 'Votre serveur est injoignable — vos modifications sont enregistrées sur cet appareil et seront synchronisées dès qu\'il répondra à nouveau.',
'Your server cannot be reached — showing the last copy synced with it.': 'Votre serveur est injoignable — affichage de la dernière copie synchronisée avec lui.',
+ 'Server address unknown': 'Adresse du serveur inconnue',
}
diff --git a/frontend/src/locales/hi.js b/frontend/src/locales/hi.js
index 0fc1d9abd..7449e26cc 100644
--- a/frontend/src/locales/hi.js
+++ b/frontend/src/locales/hi.js
@@ -1547,4 +1547,5 @@ export default {
'The server cannot be reached': 'सर्वर तक नहीं पहुँचा जा सकता',
'Your server cannot be reached — your changes are saved on this device and sync once it answers again.': 'आपके सर्वर तक नहीं पहुँचा जा सकता — आपके बदलाव इस डिवाइस पर सहेजे गए हैं और उसके फिर से जवाब देते ही सिंक हो जाएँगे।',
'Your server cannot be reached — showing the last copy synced with it.': 'आपके सर्वर तक नहीं पहुँचा जा सकता — उससे सिंक की गई आख़िरी प्रति दिखाई जा रही है।',
+ 'Server address unknown': 'सर्वर का पता अज्ञात',
}
diff --git a/frontend/src/locales/hu.js b/frontend/src/locales/hu.js
index 1fd2096a9..280aa9530 100644
--- a/frontend/src/locales/hu.js
+++ b/frontend/src/locales/hu.js
@@ -1550,4 +1550,5 @@ export default {
'The server cannot be reached': 'A szerver nem érhető el',
'Your server cannot be reached — your changes are saved on this device and sync once it answers again.': 'A szervered nem érhető el — a módosításaid ezen az eszközön vannak mentve, és szinkronizálódnak, amint újra válaszol.',
'Your server cannot be reached — showing the last copy synced with it.': 'A szervered nem érhető el — a vele utoljára szinkronizált másolat látható.',
+ 'Server address unknown': 'A szerver címe ismeretlen',
}
diff --git a/frontend/src/locales/it.js b/frontend/src/locales/it.js
index 40a870092..e8d5e204b 100644
--- a/frontend/src/locales/it.js
+++ b/frontend/src/locales/it.js
@@ -1547,4 +1547,5 @@ export default {
'The server cannot be reached': 'Il server non è raggiungibile',
'Your server cannot be reached — your changes are saved on this device and sync once it answers again.': 'Il tuo server non è raggiungibile — le tue modifiche sono salvate su questo dispositivo e verranno sincronizzate quando risponderà di nuovo.',
'Your server cannot be reached — showing the last copy synced with it.': 'Il tuo server non è raggiungibile — viene mostrata l’ultima copia sincronizzata con esso.',
+ 'Server address unknown': 'Indirizzo del server sconosciuto',
}
diff --git a/frontend/src/locales/ko.js b/frontend/src/locales/ko.js
index 4d538a56f..f5f7c4eef 100644
--- a/frontend/src/locales/ko.js
+++ b/frontend/src/locales/ko.js
@@ -1547,4 +1547,5 @@ export default {
'The server cannot be reached': '서버에 연결할 수 없음',
'Your server cannot be reached — your changes are saved on this device and sync once it answers again.': '서버에 연결할 수 없습니다 — 변경 사항은 이 기기에 저장되며 서버가 다시 응답하면 동기화됩니다.',
'Your server cannot be reached — showing the last copy synced with it.': '서버에 연결할 수 없습니다 — 서버와 마지막으로 동기화된 사본을 표시합니다.',
+ 'Server address unknown': '서버 주소를 알 수 없음',
}
diff --git a/frontend/src/locales/pl.js b/frontend/src/locales/pl.js
index 12ab4f662..6e78f9d27 100644
--- a/frontend/src/locales/pl.js
+++ b/frontend/src/locales/pl.js
@@ -1547,4 +1547,5 @@ export default {
'The server cannot be reached': 'Serwer jest nieosiągalny',
'Your server cannot be reached — your changes are saved on this device and sync once it answers again.': 'Twój serwer jest nieosiągalny — zmiany są zapisane na tym urządzeniu i zsynchronizują się, gdy znów odpowie.',
'Your server cannot be reached — showing the last copy synced with it.': 'Twój serwer jest nieosiągalny — wyświetlana jest ostatnia kopia z nim zsynchronizowana.',
+ 'Server address unknown': 'Nieznany adres serwera',
}
diff --git a/frontend/src/locales/pt.js b/frontend/src/locales/pt.js
index c2702a75b..a239afcfc 100644
--- a/frontend/src/locales/pt.js
+++ b/frontend/src/locales/pt.js
@@ -1547,4 +1547,5 @@ export default {
'The server cannot be reached': 'Não é possível chegar ao servidor',
'Your server cannot be reached — your changes are saved on this device and sync once it answers again.': 'Não é possível chegar ao teu servidor — as tuas alterações ficam guardadas neste dispositivo e sincronizam assim que ele voltar a responder.',
'Your server cannot be reached — showing the last copy synced with it.': 'Não é possível chegar ao teu servidor — a mostrar a última cópia sincronizada com ele.',
+ 'Server address unknown': 'Endereço do servidor desconhecido',
}
diff --git a/frontend/src/locales/ru.js b/frontend/src/locales/ru.js
index b0ba9019b..e0a335511 100644
--- a/frontend/src/locales/ru.js
+++ b/frontend/src/locales/ru.js
@@ -1547,4 +1547,5 @@ export default {
'The server cannot be reached': 'Сервер недоступен',
'Your server cannot be reached — your changes are saved on this device and sync once it answers again.': 'Ваш сервер недоступен — изменения сохранены на этом устройстве и синхронизируются, как только он снова ответит.',
'Your server cannot be reached — showing the last copy synced with it.': 'Ваш сервер недоступен — показана последняя копия, синхронизированная с ним.',
+ 'Server address unknown': 'Адрес сервера неизвестен',
}
diff --git a/frontend/src/locales/th.js b/frontend/src/locales/th.js
index ea0cd7f54..a9486ebd2 100644
--- a/frontend/src/locales/th.js
+++ b/frontend/src/locales/th.js
@@ -1558,4 +1558,5 @@ export default {
'The server cannot be reached': 'เชื่อมต่อเซิร์ฟเวอร์ไม่ได้',
'Your server cannot be reached — your changes are saved on this device and sync once it answers again.': 'เชื่อมต่อเซิร์ฟเวอร์ของคุณไม่ได้ — การเปลี่ยนแปลงถูกบันทึกไว้ในอุปกรณ์นี้และจะซิงค์เมื่อเซิร์ฟเวอร์ตอบกลับอีกครั้ง',
'Your server cannot be reached — showing the last copy synced with it.': 'เชื่อมต่อเซิร์ฟเวอร์ของคุณไม่ได้ — แสดงสำเนาล่าสุดที่ซิงค์กับเซิร์ฟเวอร์',
+ 'Server address unknown': 'ไม่ทราบที่อยู่เซิร์ฟเวอร์',
}
diff --git a/frontend/src/locales/tr.js b/frontend/src/locales/tr.js
index a09e283e3..a7e88ead5 100644
--- a/frontend/src/locales/tr.js
+++ b/frontend/src/locales/tr.js
@@ -1547,4 +1547,5 @@ export default {
'The server cannot be reached': 'Sunucuya ulaşılamıyor',
'Your server cannot be reached — your changes are saved on this device and sync once it answers again.': 'Sunucuna ulaşılamıyor — değişikliklerin bu cihazda kayıtlı, sunucu yeniden yanıt verince eşitlenecek.',
'Your server cannot be reached — showing the last copy synced with it.': 'Sunucuna ulaşılamıyor — sunucuyla en son eşitlenen kopya gösteriliyor.',
+ 'Server address unknown': 'Sunucu adresi bilinmiyor',
}
diff --git a/frontend/src/locales/uk.js b/frontend/src/locales/uk.js
index 91a1de071..0b5637c5d 100644
--- a/frontend/src/locales/uk.js
+++ b/frontend/src/locales/uk.js
@@ -1544,4 +1544,5 @@ export default {
'The server cannot be reached': 'Сервер недоступний',
'Your server cannot be reached — your changes are saved on this device and sync once it answers again.': 'Твій сервер недоступний — зміни збережено на цьому пристрої, вони синхронізуються, щойно він знову відповість.',
'Your server cannot be reached — showing the last copy synced with it.': 'Твій сервер недоступний — показано останню копію, синхронізовану з ним.',
+ 'Server address unknown': 'Адреса сервера невідома',
}
diff --git a/frontend/src/locales/zh.js b/frontend/src/locales/zh.js
index daa4797ed..3b8f78a3f 100644
--- a/frontend/src/locales/zh.js
+++ b/frontend/src/locales/zh.js
@@ -1547,4 +1547,5 @@ export default {
'The server cannot be reached': '无法连接服务器',
'Your server cannot be reached — your changes are saved on this device and sync once it answers again.': '无法连接你的服务器 — 你的更改已保存在此设备上,服务器恢复响应后会自动同步。',
'Your server cannot be reached — showing the last copy synced with it.': '无法连接你的服务器 — 正在显示最后一次与它同步的副本。',
+ 'Server address unknown': '服务器地址未知',
}
diff --git a/frontend/src/views/Settings.server-sync.test.jsx b/frontend/src/views/Settings.server-sync.test.jsx
index 98068e152..0fdd9d9bb 100644
--- a/frontend/src/views/Settings.server-sync.test.jsx
+++ b/frontend/src/views/Settings.server-sync.test.jsx
@@ -123,6 +123,17 @@ describe('Server & sync', () => {
expect(mocks.toast).toHaveBeenCalledWith('The server refuses this phone')
})
+ // A v1.3.8 phone that lost its pairing, upgraded: both rows said "This phone is not connected to a
+ // server." (Android QA, v1.3.9). The status row says it; the server row says there is no address.
+ it('a phone an earlier version unpaired says it is not connected once, and that its address is unknown', () => {
+ mocks.sync = sync('auth', { auth: true, pending: true, server: null, lastError: { status: 0, code: 'not-paired' } })
+ const page = mount(<Settings />)
+ const b = block(page)
+ expect(rowByTitle(b, 'Server address unknown').textContent).toContain('Signed in as andi')
+ expect([...b.querySelectorAll('.lrow-t')].filter(el => el.textContent === 'This phone is not connected to a server.')).toHaveLength(1)
+ expect(rowByTitle(b, 'Pair again')).toBeTruthy()
+ })
+
it('a browser with a server error shows the HTTP code; one that never synced here says so', () => {
mocks.MOBILE = false
mocks.sync = sync('error', { pending: true, lastError: { status: 502, code: 'http' } })