Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Xamarin.Build.Download] Using 7z to extract .tgz files can cause the build task to hang forever. #1047

Open
maonaoda opened this issue Nov 16, 2024 · 1 comment · May be fixed by #1048
Open

Comments

@maonaoda
Copy link

Android framework version

Other

Affected platform version

It should have started a long time ago.

Description

  1. Currently, I am using the latest VS2022 17.12.0, and when building an iOS application on Windows, the build task hangs forever.

  2. And through diagnostics, I had found that the process was stuck in the state of extracting GAppM-10.28.0.tgz.

1>ファイル "E:\DataFromC\NuGet\packages\xamarin.build.download\0.11.4\buildTransitive\Xamarin.Build.Download.targets" 内のターゲット "_XamarinBuildDownloadCore":
1>  TaskRun 中にアセンブリが読み込まれました: Xamarin.Build.Download, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null (場所: E:\DataFromC\NuGet\packages\xamarin.build.download\0.11.4\buildTransitive\Xamarin.Build.Download.dll、MVID: 2e6281bd-9798-47ee-9ea8-82f214394218、AppDomain: [Default])
1>  "XamarinDownloadArchives" タスクをアセンブリ "E:\DataFromC\NuGet\packages\xamarin.build.download\0.11.4\buildTransitive\Xamarin.Build.Download.dll" から使用しています。
1>  タスク "XamarinDownloadArchives"
1>    E:\DataFromC\NuGet\packages\xamarin.build.download\0.11.4\buildTransitive\Xamarin.Build.Download.targets(56,4): message : D:\Program Files\7-Zip
1>    タスク パラメーター:User7ZipPath=D:\Program Files\7-Zip
1>    タスク パラメーター:IsAndroid=False
1>    タスク パラメーター:CacheDirectory=C:\Users\xxx\AppData\Local\XamarinBuildDownloadCache\
1>    タスク パラメーター:
1>        Archives=
1>            GAppM-10.28.0
1>                    Kind=Tgz
1>                    Url=https://dl.google.com/firebase/ios/analytics/4d5ec9a36b6d4fd4/GoogleAppMeasurement-10.28.0.tar.gz
1>            MLKCommon-11.0.0
1>                    Kind=Tgz
1>                    Url=https://dl.google.com/dl/cpdc/85bda285a1954024/MLKitCommon-11.0.0.tar.gz
1>            MLKVision-7.0.0
1>                    Kind=Tgz
1>                    Url=https://dl.google.com/dl/cpdc/a82625c72bbef814/MLKitVision-7.0.0.tar.gz
1>            MLImage-1.0.0-beta5
1>                    Kind=Tgz
1>                    Url=https://dl.google.com/dl/cpdc/10ddbf30d0514f6d/MLImage-1.0.0-beta5.tar.gz
1>            MLKImgLblCommon-7.0.0
1>                    Kind=Tgz
1>                    Url=https://dl.google.com/dl/cpdc/32805ca33739d2ef/MLKitImageLabelingCommon-7.0.0.tar.gz
1>            MLKObjCommon-7.0.0
1>                    Kind=Tgz
1>                    Url=https://dl.google.com/dl/cpdc/113871a79ef25131/MLKitObjectDetectionCommon-7.0.0.tar.gz
1>            MLKitBarcodeScanning-5.0.0
1>                    Kind=Tgz
1>                    Url=https://dl.google.com/dl/cpdc/a0171fe6f0004baf/MLKitBarcodeScanning-5.0.0.tar.gz
1>            FCrshlytcs-10.29.0
1>                    Kind=Uncompressed
1>                    ToFile=C:\Users\wangyk\AppData\Local\XamarinBuildDownloadCache\FCrshlytcs-10.29.0\upload-symbols.sh
1>                    Url=https://raw.githubusercontent.com/firebase/firebase-ios-sdk/eca84fd638116dd6adb633b5a3f31cc7befcbb7d/Crashlytics/upload-symbols
1>            FAnlytcs-10.28.0
1>                    Kind=Tgz
1>                    Url=https://dl.google.com/firebase/ios/analytics/83850700831975be/FirebaseAnalytics-10.28.0.tar.gz
1>    タスク パラメーター:VsInstallRoot=C:\Program Files\Microsoft Visual Studio\2022\Enterprise
1>    タスク パラメーター:AllowUnsecureUrls=False
1>    タスク パラメーター:DestinationBase=C:\Users\wangyk\AppData\Local\XamarinBuildDownloadCache\
1>    TaskRun (Xamarin.Build.Download.XamarinDownloadArchives) 中にアセンブリが読み込まれました: Microsoft.Win32.Registry, Version=4.1.3.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a (場所: E:\DataFromC\NuGet\packages\xamarin.build.download\0.11.4\buildTransitive\Microsoft.Win32.Registry.dll、MVID: f165d2aa-905d-4dd4-8e4a-317d747f8224、AppDomain: [Default])
1>    Extracting C:\Users\xxx\AppData\Local\XamarinBuildDownloadCache\GAppM-10.28.0.tgz to C:\Users\xxx\AppData\Local\XamarinBuildDownloadCache\GAppM-10.28.0
  1. Once I kill the 14100 process, the next extraction will finally begin.

Image

1>    TaskRun (Xamarin.Build.Download.XamarinDownloadArchives) 中にアセンブリが読み込まれました: Microsoft.Win32.Registry, Version=4.1.3.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a (場所: E:\DataFromC\NuGet\packages\xamarin.build.download\0.11.4\buildTransitive\Microsoft.Win32.Registry.dll、MVID: f165d2aa-905d-4dd4-8e4a-317d747f8224、AppDomain: [Default])
1>    Extracting C:\Users\wangyk\AppData\Local\XamarinBuildDownloadCache\GAppM-10.28.0.tgz to C:\Users\wangyk\AppData\Local\XamarinBuildDownloadCache\GAppM-10.28.0
1>    E:\DataFromC\NuGet\packages\xamarin.build.download\0.11.4\buildTransitive\Xamarin.Build.Download.targets(51,3): error XBD002: Unpacking failed. Please download 'https://dl.google.com/firebase/ios/analytics/4d5ec9a36b6d4fd4/GoogleAppMeasurement-10.28.0.tar.gz' and extract it to the 'C:\Users\wangyk\AppData\Local\XamarinBuildDownloadCache\GAppM-10.28.0' directory and create an empty file called 'C:\Users\wangyk\AppData\Local\XamarinBuildDownloadCache\GAppM-10.28.0.unpacked'.
1>    Unpacking failure reason: 
1>    7-Zip 18.05 (x86) : Copyright (c) 1999-2018 Igor Pavlov : 2018-04-30
1>    
1>    Scanning the drive for archives:
1>    1 file, 10038515 bytes (9804 KiB)
1>    
1>    Extracting archive: C:\Users\wangyk\AppData\Local\XamarinBuildDownloadCache\GAppM-10.28.0.tgz
1>    --
1>    Path = C:\Users\wangyk\AppData\Local\XamarinBuildDownloadCache\GAppM-10.28.0.tgz
1>    Type = gzip
1>    Headers Size = 10
1>    
1>    
1>    Would you like to replace the existing file:
1>      Path:     C:\Users\wangyk\AppData\Local\XamarinBuildDownloadCache\GAppM-10.28.0\GAppM-10.28.0.tar
1>      Size:     40711680 bytes (39 MiB)
1>      Modified: 2024-06-12 13:37:33
1>    with the file from archive:
1>      Path:     GAppM-10.28.0.tar
1>      Size:     40711680 bytes (39 MiB)
1>      Modified: 2024-06-12 13:37:33
1>    ? (Y)es / (N)o / (A)lways / (S)kip all / A(u)to rename all / (Q)uit?
1>      Downloading https://dl.google.com/dl/cpdc/85bda285a1954024/MLKitCommon-11.0.0.tar.gz to C:\Users\wangyk\AppData\Local\XamarinBuildDownloadCache\MLKCommon-11.0.0.tgz
1>    	(2272/2400715b), total 0.0%
1>    	(240320/2400715b), total 10.0%
1>    	(480928/2400715b), total 20.0%
1>    	(721056/2400715b), total 30.0%
1>    	(960480/2400715b), total 40.0%
1>    	(1212416/2400715b), total 50.0%
1>    	(1441792/2400715b), total 60.0%
1>    	(1687552/2400715b), total 70.0%
1>    	(1933312/2400715b), total 80.0%
1>    	(2162672/2400715b), total 90.0%
1>    	(2400715/2400715b), total 100.0%
1>      Downloading Complete
1>    Extracting C:\Users\wangyk\AppData\Local\XamarinBuildDownloadCache\MLKCommon-11.0.0.tgz to C:\Users\wangyk\AppData\Local\XamarinBuildDownloadCache\MLKCommon-11.0.0

4.Look, what have we found? It wants us to agree to whether to overwrite.
? (Y)es / (N)o / (A)lways / (S)kip all / A(u)to rename all / (Q)uit?
Obviously, the extraction has been waiting for a response.


So, the fix is quite simple.

Relevant log output

@VideoSystems
Copy link

For any stumbling across this issue, there's a manual workaround that allows me to build my project again:

  1. Navigate in Windows to the following directory: C:\Users[USER]\AppData\Local\XamarinBuildDownloadCache
  2. Look for GAppM-10.28.0.tgz and extract it. If it doesn't exist, you can download it from here: https://dl.google.com/firebase/ios/analytics/4d5ec9a36b6d4fd4/GoogleAppMeasurement-10.28.0.tar.gz. Make sure to extract it to the folder name "GAppM-10.28.0".
  3. You should see a file called "GAppM-8.9.1.unpacked" in the XamarinBuildDownloadCache directory. Make a copy of that and rename the file to "GAppM-10.28.0.unpacked".
  4. VS should now recognize that the folder now exists and shouldn't prompt for the Overwrite of the folder in the background, which was the cause of the build hang.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants