GithubHelp home page GithubHelp logo

Comments (5)

teruyam avatar teruyam commented on May 18, 2024

I quickly tested and found encoding was the problem. ConvertTo-Json cannot parse wrong encoding one.
By default encoding is not UTF8 in Japanese environment...

BAD

Get-Content -LiteralPath "$env:USERPROFILE\Source\Repos\vsts-task-lib\powershell\VstsTaskSdk\Strings\resources.resjson\ja-jp\resources.resjson"|Out-String|ConvertFrom-Json
ConvertFrom-Json : ':' または '}' ではなく無効なオブジェクトが渡されました。 (473): {
"loc.messages.PSLIB_ContainerPathNotFound0": "繧ウ繝ウ繝・リ繝シ縺ョ繝代せ縺瑚ヲ九▽縺九j縺セ縺帙s: '{0}'",
"loc.messages.PSLIB_EndpointAuth0": "'{0}' 繧オ繝シ繝薙せ 繧ィ繝ウ繝峨・繧、繝ウ繝医・雉・シ諠・ア",
"loc.messages.PSLIB_EndpointUrl0": "'{0}' 繧オ繝シ繝薙せ 繧ィ繝ウ繝峨・繧、繝ウ繝医・ URL",
"loc.messages.PSLIB_EnumeratingSubdirectoriesFailedForPath0": "繝代せ '{0}' 縺ョ繧オ繝悶ョ繧」繝ャ繧ッ繝医Μ繧貞・謖吶〒縺阪∪縺帙s縺ァ縺励◆",
"loc.messages.PSLIB_FileNotFound0": "繝輔ぃ繧、繝ォ縺瑚ヲ九▽縺九j縺セ縺帙s: '{0}'",
"loc.messages.PSLIB_Input0": "'{0}' 蜈・蜉・,
"loc.messages.PSLIB_InvalidPattern0": "菴ソ逕ィ縺ァ縺阪↑縺・ヱ繧ソ繝シ繝ウ縺ァ縺・ '{0}'",
"loc.messages.PSLIB_LeafPathNotFound0": "繝ェ繝シ繝・繝代せ縺瑚ヲ九▽縺九j縺セ縺帙s: '{0}'",
"loc.messages.PSLIB_PathLengthNotReturnedFor0": "繝代せ縺ョ豁」隕丞喧/螻暮幕縺ォ螟ア謨励@縺セ縺励◆縲・ernel32 繧オ繝悶す繧ケ繝・Β縺九i繝代せ '{0}' 縺ョ髟キ縺輔′霑斐&繧後∪縺帙s縺ァ縺励◆",
"loc.messages.PSLIB_PathNotFound0": "繝代せ縺瑚ヲ九▽縺九j縺セ縺帙s: '{0}'",
"loc.messages.PSLIB_Process0ExitedWithCode1": "繝励Ο繧サ繧ケ '{0}' 縺後さ繝シ繝・'{1}' 縺ァ邨ゆコ・@縺セ縺励◆縲・,
"loc.messages.PSLIB_Required0": "蠢・ヲ・ {0}",
"loc.messages.PSLIB_StringFormatFailed": "譁・ュ怜・縺ョ蠖「蠑上′豁」縺励¥縺ゅj縺セ縺帙s縲・,
"loc.messages.PSLIB_StringResourceKeyNotFound0": "譁・ュ怜・縺ョ繝ェ繧ス繝シ繧ケ 繧ュ繝シ縺瑚ヲ九▽縺九j縺セ縺帙s: '{0}'",
"loc.messages.PSLIB_TaskVariable0": "'{0}' 繧ソ繧ケ繧ッ螟画焚"
}
発生場所 行:1 文字:156

  • ... esources.resjson\ja-jp\resources.resjson"|Out-String|ConvertFrom-Json
  •                                                      ~~~~~~~~~~~~~~~~
    
    • CategoryInfo : NotSpecified: (:) [ConvertFrom-Json], ArgumentException
    • FullyQualifiedErrorId : System.ArgumentException,Microsoft.PowerShell.Commands.ConvertFromJsonCommand

GOOD

Get-Content -LiteralPath "$env:USERPROFILE\Source\Repos\vsts-task-lib\powershell\VstsTaskSdk\Strings\resources.resjson\ja-jp\resources.resjson" -Encoding UTF8|Out-String|ConvertFrom-Json
loc.messages.PSLIB_ContainerPathNotFound0 : コンテナーのパスが見つかりません: '{0}'
loc.messages.PSLIB_EndpointAuth0 : '{0}' サービス エンドポイントの資格情報
loc.messages.PSLIB_EndpointUrl0 : '{0}' サービス エンドポイントの URL
loc.messages.PSLIB_EnumeratingSubdirectoriesFailedForPath0 : パス '{0}' のサブディレクトリを列挙できませんでした
loc.messages.PSLIB_FileNotFound0 : ファイルが見つかりません: '{0}'
loc.messages.PSLIB_Input0 : '{0}' 入力
loc.messages.PSLIB_InvalidPattern0 : 使用できないパターンです: '{0}'
loc.messages.PSLIB_LeafPathNotFound0 : リーフ パスが見つかりません: '{0}'
loc.messages.PSLIB_PathLengthNotReturnedFor0 : パスの正規化/展開に失敗しました。Kernel32 サブシステムからパス '{0}' の長さが返されませんでした
loc.messages.PSLIB_PathNotFound0 : パスが見つかりません: '{0}'
loc.messages.PSLIB_Process0ExitedWithCode1 : プロセス '{0}' がコード '{1}' で終了しました。
loc.messages.PSLIB_Required0 : 必要: {0}
loc.messages.PSLIB_StringFormatFailed : 文字列の形式が正しくありません。
loc.messages.PSLIB_StringResourceKeyNotFound0 : 文字列のリソース キーが見つかりません: '{0}'
loc.messages.PSLIB_TaskVariable0 : '{0}' タスク変数

For me, CI build completely works fine now.
In my environment I patched following:
agent\tasks\PublishSymbols\1.0.20\ps_modules\VstsTaskSdk\LocalizationFunctions.ps1
agent\tasks\VSBuild\1.0.24\ps_modules\VstsTaskSdk\LocalizationFunctions.ps1

from azure-pipelines-task-lib.

ericsciple avatar ericsciple commented on May 18, 2024

I'll get a patched version of the tasks into the releases/m95 branch of the tasks vso-agent-tasks. I'll add some unit tests to prevent regressions if the encoding of the files change.

Thank you for the investigation/fix.

from azure-pipelines-task-lib.

ericsciple avatar ericsciple commented on May 18, 2024

Also, as a workaround, a variable can be set on the definition: set system.preferpsoverps3 to true.

from azure-pipelines-task-lib.

ericsciple avatar ericsciple commented on May 18, 2024

Here's the patch: http://go.microsoft.com/fwlink/?LinkId=786947

The zip contains a readme.txt and a ps1 script to upload the patched tasks.

from azure-pipelines-task-lib.

ericsciple avatar ericsciple commented on May 18, 2024

Fixed in 2.1

from azure-pipelines-task-lib.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.