azure-pipelines-tasks: Exception in PublishSymbols (Exception calling "Filter" with "3" argument(s): "Value cannot be null)

I am trying to use the publish symbols task. The following is my task configuration:

  - task: PublishSymbols@2
    displayName: publish symbols
    inputs:
      SearchPattern: ___output/**/*.pdb
      SymbolServerType: TeamServices

I keep getting the error Exception calling “Filter” with “3” argument(s): "Value cannot be null.

I have pasted the debug output below. What am I missing to get this task working?

##[debug]Evaluating condition for step: 'publish symbols'
##[debug]Evaluating: SucceededNode()
##[debug]Evaluating SucceededNode:
##[debug]=> True
##[debug]Result: True
##[section]Starting: publish symbols
==============================================================================
Task         : Index Sources & Publish Symbols
Description  : Index your source code and publish symbols to a file share or Azure Artifacts Symbol Server
Version      : 2.0.14
Author       : Microsoft Corporation
Help         : See [more information](https://go.microsoft.com/fwlink/?LinkID=613722) on how to use this task.
==============================================================================
##[debug]VstsTaskSdk 0.9.0 commit 6c48b16164b9a1c9548776ad2062dad5cd543352
##[debug]Entering D:\a\_tasks\PublishSymbols_0675668a-7bba-4ccb-901d-5ad6554ca653\2.0.14\PublishSymbols.ps1.
##[debug]Loading resource strings from: D:\a\_tasks\PublishSymbols_0675668a-7bba-4ccb-901d-5ad6554ca653\2.0.14\Task.json
##[debug]Loaded 23 strings.
##[debug]SYSTEM_CULTURE: 'en-US'
##[debug]Loading resource strings from: D:\a\_tasks\PublishSymbols_0675668a-7bba-4ccb-901d-5ad6554ca653\2.0.14\Strings\resources.resjson\en-US\resources.resjson
##[debug]Loaded 23 strings.
##[debug]Loading module from path 'D:\a\_tasks\PublishSymbols_0675668a-7bba-4ccb-901d-5ad6554ca653\2.0.14\SymbolsCommon.psm1'.
##[debug]Exporting function 'Get-PdbstrPath'.
##[debug]Exporting function 'Get-DbghelpPath'.
##[debug]Exporting function 'Get-SymStorePath'.
##[debug]Importing function 'Get-DbghelpPath'.
##[debug]Importing function 'Get-PdbstrPath'.
##[debug]Importing function 'Get-SymStorePath'.
##[debug]INPUT_SYMBOLSERVERTYPE: 'TeamServices'
##[debug]INPUT_DETAILEDLOG: 'true'
##[debug] Converted to bool: True
##[debug]INPUT_INDEXSOURCES: 'true'
##[debug] Converted to bool: True
##[debug]INPUT_COMPRESSSYMBOLS: 'false'
##[debug] Converted to bool: False
##[debug]INPUT_TREATNOTINDEXEDASWARNING: 'false'
##[debug] Converted to bool: False
##[debug]BUILD_SOURCESDIRECTORY: 'D:\a\1\s'
##[debug]INPUT_SYMBOLSFOLDER: 'D:\a\1\s'
##[debug]INPUT_SEARCHPATTERN: '___output/**/*.pdb'
##[debug]Entering Find-VstsMatch.
##[debug]DefaultRoot: 'D:\a\1\s'
##[debug]FindOptions.FollowSpecifiedSymbolicLink: 'True'
##[debug]FindOptions.FollowSymbolicLinks: 'True'
##[debug]MatchOptions.Dot: 'True'
##[debug]MatchOptions.FlipNegate: 'False'
##[debug]MatchOptions.MatchBase: 'False'
##[debug]MatchOptions.NoBrace: 'True'
##[debug]MatchOptions.NoCase: 'True'
##[debug]MatchOptions.NoComment: 'False'
##[debug]MatchOptions.NoExt: 'False'
##[debug]MatchOptions.NoGlobStar: 'False'
##[debug]MatchOptions.NoNegate: 'False'
##[debug]MatchOptions.NoNull: 'False'
##[debug]Pattern: '___output/**/*.pdb'
##[debug]FindPath: 'D:\a\1\s\___output'
##[debug]StatOnly: 'False'
##[debug]Path not found.
##[debug]Found 0 paths.
##[debug]Applying include pattern.
##[debug]AdjustedPattern: 'D:\a\1\s\___output/**/*.pdb'
##[debug]Leaving Find-VstsMatch.
##[debug]Leaving D:\a\_tasks\PublishSymbols_0675668a-7bba-4ccb-901d-5ad6554ca653\2.0.14\PublishSymbols.ps1.
##[debug]Caught exception from task script.
##[debug]Error record:
##[debug]Find-VstsMatch : Exception calling "Filter" with "3" argument(s): "Value cannot be null.
##[debug]Parameter name: source"
##[debug]At D:\a\_tasks\PublishSymbols_0675668a-7bba-4ccb-901d-5ad6554ca653\2.0.14\PublishSymbols.ps1:117 char:22
##[debug]+ ... matches = @(Find-VstsMatch -DefaultRoot $SymbolsFolder -Pattern $Sear ...
##[debug]+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
##[debug]    + CategoryInfo          : NotSpecified: (:) [Write-Error], WriteErrorException
##[debug]    + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Find-VstsMatch
##[debug] 
##[debug]Script stack trace:
##[debug]at Find-Match, D:\a\_tasks\PublishSymbols_0675668a-7bba-4ccb-901d-5ad6554ca653\2.0.14\ps_modules\VstsTaskSdk\FindFunctions.ps1: line 221
##[debug]at <ScriptBlock>, D:\a\_tasks\PublishSymbols_0675668a-7bba-4ccb-901d-5ad6554ca653\2.0.14\PublishSymbols.ps1: line 117
##[debug]at <ScriptBlock>, <No file>: line 1
##[debug]at <ScriptBlock>, <No file>: line 22
##[debug]at <ScriptBlock>, <No file>: line 18
##[debug]at <ScriptBlock>, <No file>: line 1
##[debug]Exception:
##[debug]Microsoft.PowerShell.Commands.WriteErrorException: Exception calling "Filter" with "3" argument(s): "Value cannot be null.
##[debug]Parameter name: source"
##[error]Exception calling "Filter" with "3" argument(s): "Value cannot be null.
Parameter name: source"
##[debug]Processed: ##vso[task.logissue type=error]Exception calling "Filter" with "3" argument(s): "Value cannot be null.%0D%0AParameter name: source"
##[debug]Processed: ##vso[task.complete result=Failed]
##[section]Finishing: publish symbols

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Reactions: 8
  • Comments: 22 (5 by maintainers)

Commits related to this issue

Most upvoted comments

What about fixing this & leaving it indefinitely open until then?

This issue is stale because it has been open for 180 days with no activity. Remove the stale label or comment on the issue otherwise this will be closed in 5 days

This is still worth fixing.

I saw this problem today too, but I figured out the problem. This works:

- task: PublishSymbols@2
  inputs:
    SymbolsFolder: $(Build.SourcesDirectory)/bin
    SearchPattern: '**/*.pdb'
    IndexSources: false
    SymbolServerType: TeamServices
  displayName: Publish symbols to symbol server

But this fails with the error in the issue description:

- task: PublishSymbols@2
  inputs:
    SymbolsFolder: bin
    SearchPattern: '**/*.pdb'
    IndexSources: false
    SymbolServerType: TeamServices
  displayName: Publish symbols to symbol server

Notice the SymbolsFolder went from being an absolute path to a relative path.

So I believe this is the bug: the Task should support relative paths (assuming the base directory to be the root of the repo). Most tasks do, but this particular task and input doesn’t.