-
Since yesterday, our builds have been failing on our devops builder (Self hosted build server) I think it's a caching issue of some kind. (tried running dotnet nuget locals all --clear) We've made a simple yaml file `##### INIT ######## pool: #####################################
while the output related to pac auth gives `Microsoft PowerPlatform CLI Error: The input does not contain any JSON tokens. Expected the input to start with a valid JSON token, when isFinalBlock is true. Path: $ | LineNumber: 0 | BytePositionInLine: 0.
He gets "No profiles were found on this computer. Please run 'pac auth create' to create one." (no JSON error) Here's the full output `Generating script. Name : pac.exe Lerroy Jenkins Error: The input does not contain any JSON tokens. Expected the input to start with a valid JSON token, when isFinalBlock is true. Path: $ | LineNumber: 0 | BytePositionInLine: 0. ##[error]PowerShell exited with code '1'. Edit. I setup a scheduled task running as Network service (like the agents) and it just runs a cmd which has after it's run, i get the same error as the build agent. Maybe a permission error? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Ok, I finally figured it out. I setup the same scheduled task on a win10 workstation and it worked fine. Ended up seeing an interest in entry in the security event log on the server Process Command Line: "C:\Program Files\dotnet\dotnet.exe" pacTelemetryUpload.dll "C:\Windows\ServiceProfiles\NetworkService\AppData\Local\Microsoft\PowerAppsCli\telemetry-cache\pac" Went looking in the directory. authprofiles_v2.json I renamed both those files (with zz in the front). Scheduled task and pipelines started working again. When i look in the directory now, both those files are back and bigger than 0kb. Maybe the error message returned can mention where the json file is located? (instead of a generic json empty message) |
Beta Was this translation helpful? Give feedback.
-
Further to alareau's answer, we found that clearing the contents of the "$env:LocalAppData\Microsoft\PowerAppsCli" folder resolved the issue for us. PowerShell:
|
Beta Was this translation helpful? Give feedback.
Ok, I finally figured it out.
I setup the same scheduled task on a win10 workstation and it worked fine.
So I kept investigating
Ended up seeing an interest in entry in the security event log on the server
Process Command Line: "C:\Program Files\dotnet\dotnet.exe" pacTelemetryUpload.dll "C:\Windows\ServiceProfiles\NetworkService\AppData\Local\Microsoft\PowerAppsCli\telemetry-cache\pac"
Went looking in the directory.
There were 2 extra files not present on my win10 machine (since i never really did any PowerApps work on that workstation)
authprofiles_v2.json
tokenache_spn_msalv3.dat
both files were 0kb
I renamed both those files (with zz in the front). Scheduled task and pipelines started …