question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Content is not a valid JSON object

See original GitHub issue

Similar to #5, I created a service principal and got the result of

{
  "clientId": "<GUID>",
  "clientSecret": "<GUID>",
  "subscriptionId": "<GUID>",
  "tenantId": "<GUID>",
  "activeDirectoryEndpointUrl": "https://login.microsoftonline.com",
  "resourceManagerEndpointUrl": "https://management.azure.com/",
  "activeDirectoryGraphResourceId": "https://graph.windows.net/",
  "sqlManagementEndpointUrl": "https://management.core.windows.net:8443/",
  "galleryEndpointUrl": "https://gallery.azure.com/",
  "managementEndpointUrl": "https://management.core.windows.net/"
}

However, I got the following error when I login to Azure:

Content is not a valid JSON object

image

I omitted, just in case, unnecessary properties from the JSON object like:

{
  "clientId": "<GUID>",
  "clientSecret": "<GUID>",
  "subscriptionId": "<GUID>",
  "tenantId": "<GUID>"
}

And the result is still the same. What am I missing?

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
aksm-mscommented, Jul 14, 2020

@justinyoo Please update your workflow as follows:

  • name: Login to Azure uses: Azure/login@v1 env: CREDENTIALS: ${{ secrets.AZURE_CREDENTIALS }} with: creds: ${{ env.CREDENTIALS }}

Reference - https://docs.github.com/en/actions/reference/context-and-expression-syntax-for-github-actions#env-context

1reaction
justinyoocommented, Dec 10, 2019

I found why I got the error. Here’s my action:

- name: Login to Azure
  uses: Azure/login@v1
  env:
    CREDENTIALS: ${{ secrets.AZURE_CREDENTIALS }}
  with:
    creds: $CREDENTIALS

I intentionally used the environment variable at the step level. However, it didn’t pass to the parameter. Can we use the environment variable to capture secrets from the repo?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Nuget Package Manager: "...is not a valid JSON object"
The content at '[url]' is not a valid JSON object. Unexpected character encountered while parsing value: <. Path '', line 0, position 0....
Read more >
The given data was not valid JSON. | Apple Developer Forums
I am working with an API and I'm trying to pass data to a detail view but when making the call to the...
Read more >
How to Fix “The Response Is Not a Valid JSON ... - iThemes
This guide explains how the Gutenberg editor works with REST API and how to fix "The response is not a valid JSON response"...
Read more >
6 Fixes for "the response is not a valid JSON response" Error in
1. Reset the permalinks · 2. Disable the Block editor and switch back to Classic editor · 3. Mixed content error due to...
Read more >
Runtime Error: File content is not valid JSON - Robot
Hi All, Currently I am facing a problem when trying to run a robot under version 2019.4.4. The robot itself was programmed with...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found