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

FromStrings" with "2" argument(s) #117

Open
soerenpc opened this issue May 31, 2024 · 12 comments
Open

FromStrings" with "2" argument(s) #117

soerenpc opened this issue May 31, 2024 · 12 comments

Comments

@soerenpc
Copy link

Hi
I get this _
##[error]Exception calling "FromStrings" with "2" argument(s): "The string must have at least one character.

when running: "TFVC - Check-in changes"

any ideas?

@jessehouwing
Copy link
Owner

No, you're the first in 8 years to report this ;).

There's one place where this method is being called, and my guess would be that the ItemSpec isn't a valid one:

https://github.com/search?q=repo%3Ajessehouwing%2Fazure-pipelines-tfvc-tasks%20FromStrings&type=code

The ItemSpec is the stored in the Files to check in field.

@jessehouwing
Copy link
Owner

Can you share diagnostic logs? If you don't want to attach them here, send them to [email protected]. I may be able to spend some time on this next week.

@soerenpc
Copy link
Author

soerenpc commented May 31, 2024 via email

@soerenpc
Copy link
Author

soerenpc commented May 31, 2024 via email

@jessehouwing
Copy link
Owner

Can you turn on diagnostics and run again?

@soerenpc
Copy link
Author

soerenpc commented May 31, 2024 via email

@jessehouwing
Copy link
Owner

Looks like there is an underlying problem:

 : Exception calling "FromStrings" with "2" argument(s): "Illegal characters in path."

Can you try removing the ; separating the 2 itemspecs, the newline should be enough. Make sure there is no other whitespace.

Try entering all slashes in the windows direction: \ instead of /.

Try calling tf vc status /format:detailed to see if there are any files with reserved characters in their name.

@soerenpc
Copy link
Author

Still get:
##[error]Exception calling "FromStrings" with "2" argument(s): "Illegal characters in path."

$/Rdc365/Trunk/Main/Metadata/SmartFoundation/Smart Foundation/AxLabelFile/LabelResources/nb-NO/BCT.nb-NO.label.txt;C1478
User : Rdc365 Build Service (fsbdevelopment)
Date : Friday, May 31, 2024 4:18:33 PM
Lock : none
Change : edit
Workspace : ws_14_14
Local item : [fv-az398-875] D:\a\14\s\LabelResources\nb-NO\BCT.nb-NO.label.txt
File type : utf-8

$/Rdc365/Trunk/Main/Metadata/SmartFoundation/Smart Foundation/AxLabelFile/LabelResources/nb-NO/IML.nb-NO.label.txt;C1478
User : Rdc365 Build Service (fsbdevelopment)
Date : Friday, May 31, 2024 4:18:33 PM
Lock : none
Change : edit
Workspace : ws_14_14
Local item : [fv-az398-875] D:\a\14\s\LabelResources\nb-NO\IML.nb-NO.label.txt
File type : utf-8

$/Rdc365/Trunk/Main/Metadata/SmartFoundation/Smart Foundation/AxLabelFile/LabelResources/nb-NO/SmartFoundation.nb-NO.label.txt;C1470
User : Rdc365 Build Service (fsbdevelopment)
Date : Friday, May 31, 2024 4:18:33 PM
Lock : none
Change : edit
Workspace : ws_14_14
Local item : [fv-az398-875] D:\a\14\s\LabelResources\nb-NO\SmartFoundation.nb-NO.label.txt
File type : utf-8

@jessehouwing
Copy link
Owner

Looks like you're building on your own agent. Is that agent persistent?

If so, you can edit the PS1 file for the task in the agent's _tasks folder. The chicken task should be cached there, can you add a couple of write-host lines to print the values of the parameters passed to the method that's failing?

return @([Microsoft.TeamFoundation.VersionControl.Client.ItemSpec]::FromStrings($Paths, $RecursionType))

I currently can't repro this locally.

@soerenpc
Copy link
Author

soerenpc commented Jun 1, 2024

It is DevOps pipeline not local.

@soerenpc
Copy link
Author

soerenpc commented Jun 1, 2024

I succeeded in creating a task for each folder:
image

@jessehouwing
Copy link
Owner

Interesting....

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

No branches or pull requests

2 participants