fix(beta): provide a reversible storage reset helper
This commit is contained in:
1 parent
0b45afbd6d
commit
9a3d2862df
6 files changed
+67
-1
No files matched your search
@@ -146,6 +146,12 @@ incompatible, update the domain's Server and connected Apps together, then refre
|
||||
3. Start with the same application-data directory. Send the current invitation
|
||||
if its address changed.
|
||||
|
||||
If a private beta reports `unsupported_storage_version`, stop App and run the
|
||||
supplied `reset-beta-app-data.ps1` helper. It renames the old Windows data
|
||||
directory to a timestamped backup and leaves it in place; the next start uses a
|
||||
fresh directory. This intentionally resets the private beta format instead of
|
||||
silently migrating an old experiment.
|
||||
|
||||
The launcher checks published releases and links to their notes. During this
|
||||
unpublished test, follow the supplied test-update instructions rather than
|
||||
switching to a different public channel.
|
||||
|
||||
@@ -113,7 +113,9 @@ the Web page after updating App. If App reports `unsupported_domain_checkpoint`,
|
||||
it has preserved data from an older test format. Keep that data and follow the
|
||||
package's fresh-data instructions; [saved-data settings](../../prototype/channel-server/README.md#saved-data-and-files)
|
||||
explain the separate App and Server directories. Public 2.x downloads are not
|
||||
the 3.0 test update.
|
||||
the 3.0 test update. If the beta reports `unsupported_storage_version`, stop
|
||||
App and run the supplied `reset-beta-app-data.ps1`; it keeps the old App
|
||||
directory as a timestamped backup.
|
||||
|
||||
## Share from an existing site
|
||||
|
||||
|
||||
@@ -97,6 +97,8 @@
|
||||
`unsupported_domain_checkpoint`,表示已有数据来自更早的测试格式,原数据仍保留。
|
||||
先留存旧资料,再按包内说明使用新的测试数据;App 与 Server 的独立数据目录见
|
||||
[数据设置](../../prototype/channel-server/README.md#saved-data-and-files)。公开的 2.x 下载不是本次 3.0 内测更新。
|
||||
如果内测 App 提示 `unsupported_storage_version`,请退出 App 后运行随包提供的
|
||||
`reset-beta-app-data.ps1`;旧 App 目录会保留为带时间戳的备份。
|
||||
|
||||
## 使用已有站点分享
|
||||
|
||||
|
||||
@@ -225,6 +225,15 @@ voice or file transfer fails, check that activity below.
|
||||
A failed or canceled file transfer does not end room chat. Do not clear site
|
||||
storage to retry; that can remove retained files, identity or a Browser-hosted room.
|
||||
|
||||
### The beta App reports `unsupported_storage_version`
|
||||
|
||||
This is the expected boundary when a private beta changes its local storage
|
||||
format. Stop Piik App, keep any room backups, and run the supplied
|
||||
`reset-beta-app-data.ps1` helper. It renames the old App data directory with a
|
||||
timestamp and keeps it as a backup; the next start creates a fresh beta directory.
|
||||
The helper does not migrate or delete the old database. This reset helper is for
|
||||
the 3.0 internal beta only.
|
||||
|
||||
## Starting a share
|
||||
|
||||
[No picker](#no-screen-picker) · [Missing windows](#app-windows-or-screens-are-missing) ·
|
||||
|
||||
@@ -186,6 +186,12 @@ Piik App 的本地网络邀请使用临时自签名 HTTPS 证书,浏览器可
|
||||
|
||||
文件失败或取消不会结束房间聊天。不要为重试清除站点存储,这可能删除保留文件、身份或 Browser 托管的房间。
|
||||
|
||||
### 内测 App 提示 `unsupported_storage_version`
|
||||
|
||||
这是私有内测版本更换本地存储格式时的预期边界。先退出 Piik App,并保存需要的房间备份,
|
||||
再运行随包提供的 `reset-beta-app-data.ps1`。它会把旧 App 数据目录改名为带时间戳的备份目录,
|
||||
不会迁移或删除旧数据库;下次启动会创建新的内测数据目录。这个清理脚本只用于 3.0 内测。
|
||||
|
||||
## 开始分享
|
||||
|
||||
[没有选源器](#没有屏幕选择弹窗) · [找不到窗口](#app-找不到窗口或屏幕) ·
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
param(
|
||||
[string]$DataDirectory,
|
||||
[switch]$Yes
|
||||
)
|
||||
|
||||
$ErrorActionPreference = "Stop"
|
||||
|
||||
if ([string]::IsNullOrWhiteSpace($DataDirectory)) {
|
||||
$localAppData = [Environment]::GetFolderPath("LocalApplicationData")
|
||||
if ([string]::IsNullOrWhiteSpace($localAppData)) { throw "Local application data directory is unavailable." }
|
||||
$DataDirectory = Join-Path $localAppData "Piik\channel-app"
|
||||
}
|
||||
|
||||
$appProcesses = @(Get-Process -Name "piik-app", "piik-channel-app" -ErrorAction SilentlyContinue)
|
||||
if ($appProcesses.Count -gt 0) {
|
||||
throw "Piik App is still running. Close it normally, then run this script again."
|
||||
}
|
||||
|
||||
if (-not (Test-Path -LiteralPath $DataDirectory -PathType Container)) {
|
||||
Write-Host "No App data directory found: $DataDirectory"
|
||||
exit 0
|
||||
}
|
||||
|
||||
$resolvedDataDirectory = (Resolve-Path -LiteralPath $DataDirectory).Path
|
||||
$parentDirectory = Split-Path -Parent $resolvedDataDirectory
|
||||
$leaf = Split-Path -Leaf $resolvedDataDirectory
|
||||
$stamp = [DateTime]::UtcNow.ToString("yyyyMMdd-HHmmssZ")
|
||||
$backupDirectory = Join-Path $parentDirectory "$leaf.beta-backup.$stamp"
|
||||
|
||||
if (-not $Yes) {
|
||||
Write-Host "This beta-only action will rename the old data directory and keep it as a backup:"
|
||||
Write-Host " $resolvedDataDirectory"
|
||||
Write-Host "→ $backupDirectory"
|
||||
Write-Host "It does not migrate or delete the old database."
|
||||
$answer = Read-Host "Type RESET to continue"
|
||||
if ($answer -cne "RESET") { Write-Host "Cancelled."; exit 1 }
|
||||
}
|
||||
|
||||
Move-Item -LiteralPath $resolvedDataDirectory -Destination $backupDirectory
|
||||
Write-Host "Created a fresh beta data directory on the next App start."
|
||||
Write-Host "Old data kept at: $backupDirectory"
|
||||
Reference in new issue
Block a user