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

Misleading Error Message when AccessToken is expired #2

Open
reecebradley opened this issue May 31, 2019 · 0 comments
Open

Misleading Error Message when AccessToken is expired #2

reecebradley opened this issue May 31, 2019 · 0 comments

Comments

@reecebradley
Copy link

The task reported an error message (I put [redacted] where appropriate):

Entering MD2WP.CLI.exe.
MDWWPClient::ctor
  BaseUrl = [redacted]
  UserName = [redacted]
  Password = ********
  Account URL = [redacted]
  Project = [redacted]
  RepoName = Portal
  Branch = master
  AccessToken = ********
  MetadataFilename = [redacted]\_md2wp.json
  EmbedExternalImages = False
  PublishAsCommitter = True
  ProcessSubfolders = True
  UseFolderNameAsCategory = False
  UseFolderNameAsTag = False
  PublishNewPostsAsDraft = False
  TrackPostIdInFilename = True
  AddEditLink = True
  EditLinkText = Edit this Page
  editLinkStyle = background-color: #2E5481; color: #FFFFFF; padding: 5px 10px; text-decoration: none; border-radius: 5px; font-size: 8pt;
Loading metadata file...
Retrieving file contents for '[redacted]\_md2wp.json'
ERROR: Unexpected character encountered while parsing value: <. Path '', line 0, position 0.
##[error]System.Management.Automation.RemoteException
##[debug]Processed: ##vso[task.logissue type=error;]System.Management.Automation.RemoteException
##[error]System.Management.Automation.RemoteException: Unhandled Exception: 
##[debug]Processed: ##vso[task.logissue type=error;]System.Management.Automation.RemoteException: Unhandled Exception: 
##[error]System.Management.Automation.RemoteException: Newtonsoft.Json.JsonReaderException: Unexpected character encountered while parsing value: <. Path '', line 0, position 0.
##[debug]Processed: ##vso[task.logissue type=error;]System.Management.Automation.RemoteException: Newtonsoft.Json.JsonReaderException: Unexpected character encountered while parsing value: <. Path '', line 0, position 0.
   at Newtonsoft.Json.JsonTextReader.ParseValue()
   at Newtonsoft.Json.JsonTextReader.Read()
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.ReadForType(JsonReader reader, JsonContract contract, Boolean hasConverter)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent)
   at Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType)
   at Newtonsoft.Json.JsonConvert.DeserializeObject(String value, Type type, JsonSerializerSettings settings)
   at Newtonsoft.Json.JsonConvert.DeserializeObject[T](String value, JsonSerializerSettings settings)
   at Newtonsoft.Json.JsonConvert.DeserializeObject[T](String value)
   at MoonspaceLabs.Shared.BusinessLogic.MD2WPClient.LoadMetadata() in D:\src\MD2WP\MD2WP.Shared\BusinessLogic\MD2WPClient.cs:line 247
   at MoonspaceLabs.Shared.BusinessLogic.MD2WPClient.PublishMarkdownFiles() in D:\src\MD2WP\MD2WP.Shared\BusinessLogic\MD2WPClient.cs:line 339
   at MoonspaceLabs.Shared.CLI.Program.Main(String[] args) in D:\src\MD2WP\MD2WP.CLI\Program.cs:line 81
##[error]System.Management.Automation.RemoteException: 
##[debug]Processed: ##vso[task.logissue type=error;]System.Management.Automation.RemoteException: 

##[error]PowerShell script completed with 4 errors.
##[section]Finishing: Markdown to WordPress - Announcements

This isn't helpful in diagnosing what the problem. We eventually found out it was the "VSTS Access Token"
image

Should be renamed probably to "Azure DevOps Access Token"

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

1 participant