Scighost / Starward

Game Launcher for miHoYo - 米家游戏启动器
https://starward.scighost.com
MIT License
3.54k stars 165 forks source link

[Bug] 无法更新 #762

Closed Emm-GOOD closed 5 months ago

Emm-GOOD commented 7 months ago

Checklist

Description

在更新原神4.6版本时遇到了无法更新的情况

Reproduction Steps

[Uploading step.zip…]()

Expected Behavior

No response

Screenshots

image

Starward Version

0.11.4

Windows Version

19045.4291

Log

[06:58:05.881] [INFO] 
Welcome to Starward v0.11.4
System: Microsoft Windows NT 10.0.19045.0
Command Line: E:\Starward_Portable_0.9.1_x64\Starward\app-0.11.4\Starward.dll download --biz hk4e_cn --loc "F:\Genshin Impact Game" --lang 3

[06:58:05.931] [INFO] Starward.Services.DatabaseService
Database path is 'E:\mihoyo'

[06:58:05.963] [INFO] Starward.Services.DatabaseService
Database version is 8, target version is 8.

[06:58:06.290] [INFO] Starward.Services.InstallGame.GenshinInstallGameService
Initialize install game service
biz: hk4e_cn
path: "F:\Genshin Impact Game"
lang: Chinese, English
repair: False
reinstall: False

[06:58:06.346] [INFO] Starward.Services.InstallGame.GenshinInstallGameService
Start install game, skipVerify: False

[06:58:06.348] [INFO] Starward.Services.InstallGame.GenshinInstallGameService
Prepare for download.

[06:58:07.910] [INFO] Starward.Services.InstallGame.GenshinInstallGameService
Update game.

[06:58:07.916] [INFO] Starward.Services.InstallGame.GenshinInstallGameService
Request head: "https://autopatchcn.yuanshen.com/client_app/update/hk4e_cn/18/zh-cn_4.5.0_4.6.0_hdiff_2a7jHyNe6YWsM3Ob.zip"

[06:58:07.916] [INFO] Starward.Services.InstallGame.GenshinInstallGameService
Request head: "https://autopatchcn.yuanshen.com/client_app/update/hk4e_cn/18/en-us_4.5.0_4.6.0_hdiff_zY5rUsWHTdvLp76g.zip"

[06:58:07.916] [INFO] Starward.Services.InstallGame.GenshinInstallGameService
Request head: "https://autopatchcn.yuanshen.com/client_app/update/hk4e_cn/18/game_4.5.0_4.6.0_hdiff_kiOtCmQKDxTEojvz.zip"

[06:58:11.182] [INFO] Starward.Services.InstallGame.GenshinInstallGameService
Start download files.

[06:58:11.183] [INFO] Starward.Services.InstallGame.GenshinInstallGameService
3 files need to download.

[06:58:11.192] [INFO] Starward.Services.InstallGame.GenshinInstallGameService
Verify downloaded files.

[06:59:21.371] [INFO] Starward.Services.InstallGame.GenshinInstallGameService
Decompress downloaded files.

[06:59:21.372] [INFO] Starward.Services.InstallGame.GenshinInstallGameService
Decompress "game_4.5.0_4.6.0_hdiff_kiOtCmQKDxTEojvz.zip"

[06:59:23.451] [EROR] Starward.Services.InstallGame.GenshinInstallGameService
Install game error.
System.UnauthorizedAccessException: Access to the path 'F:\Genshin Impact Game\YuanShen_Data\Plugins\chrome_100_percent.pak' is denied.
   at Microsoft.Win32.SafeHandles.SafeFileHandle.CreateFile(String, FileMode, FileAccess, FileShare, FileOptions)
   at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String, FileMode, FileAccess, FileShare, FileOptions, Int64, Nullable`1 )
   at System.IO.Strategies.OSFileStreamStrategy..ctor(String, FileMode, FileAccess, FileShare, FileOptions, Int64, Nullable`1)
   at System.IO.Strategies.FileStreamHelpers.ChooseStrategyCore(String, FileMode, FileAccess, FileShare, FileOptions, Int64, Nullable`1)
   at System.IO.FileStream..ctor(String, FileStreamOptions)
   at System.IO.Compression.ZipFileExtensions.ExtractToFile(ZipArchiveEntry, String, Boolean)
   at Starward.Services.InstallGame.InstallGameService.<>c__DisplayClass83_0.<DecompressFileAsync>b__1() in D:\a\Starward\Starward\src\Starward\Services\InstallGame\InstallGameService.cs:line 954
   at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread, ExecutionContext, ContextCallback, Object)
--- End of stack trace from previous location ---
   at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread, ExecutionContext, ContextCallback, Object)
   at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task&, Thread )
--- End of stack trace from previous location ---
   at Starward.Services.InstallGame.InstallGameService.DecompressFileAsync(String[] files) in D:\a\Starward\Starward\src\Starward\Services\InstallGame\InstallGameService.cs:line 922
   at Starward.Services.InstallGame.InstallGameService.DecompressAndApplyDiffPackagesAsync(CancellationToken cancellationToken) in D:\a\Starward\Starward\src\Starward\Services\InstallGame\InstallGameService.cs:line 665
   at Starward.Services.InstallGame.InstallGameService.StartAsync(Boolean skipVerify) in D:\a\Starward\Starward\src\Starward\Services\InstallGame\InstallGameService.cs:line 257

Additional Context

除chrome,Starward,华为电脑管家和步骤记录器外的任何程序

Emm-GOOD commented 7 months ago

Additional Context这里打错了应该是除去chrome,Starward,华为电脑管家和步骤记录器外未打开任何程序

FLIP0103 commented 6 months ago

I got the same problem and had to reinstall the game 😞

chali1997 commented 6 months ago

Starward下载的zip压缩包原神启动器似乎可以识别,然后用原神启动器进行更新

Emm-GOOD commented 6 months ago

我就是用官方启动器更新的

FLIP0103 commented 6 months ago

我就是用官方启动器更新的

I tried to do that too but mine said "Game not found". Any idea how I could fix it?

Scighost commented 6 months ago

@Emm-GOOD 谢谢你的反馈,此问题的原因是文件夹内的部分文件被设置为已读文件,在更新流程中没有对此做适配,后续版本中会修复

Scighost commented 6 months ago

I tried to do that too but mine said "Game not found". Any idea how I could fix it?

@FLIP0103 In the official launcher, you should click locate game button and then select folder containing GenshinImpact.exe.

image
FLIP0103 commented 6 months ago

I tried to do that too but mine said "Game not found". Any idea how I could fix it?

@FLIP0103 In the official launcher, you should click locate game button and then select folder containing GenshinImpact.exe.

image

I tried to do that also but even when I locate the folder that has GenshinImpact.exe, it won't detect it. Should I try to move the game file to another folder and try again?

Fightxing commented 6 months ago

将 Plugins 文件夹的只读属性取消即可解决问题

DreamToffee commented 6 months ago

@Emm-GOOD谢谢您的反馈,此问题的原因是文件夹内的部分文件被设置为已读取文件,在更新流程中没有为此做调整,后续版本中会修复

我将Plugins的所有文件都取消了-只-读-,目前可以更新了,会有问题吗