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.

Malformed JSON in the extras field: SyntaxError: Unexpected end of JSON input

See original GitHub issue

While adding a new database connection (tried for Postgres and Redshift both), clicking on ‘Test Connection’ gives Malformed JSON in the extras field: SyntaxError: Unexpected end of JSON input error. The Extra field has

{
    "metadata_params": {},
    "engine_params": {},
    "metadata_cache_timeout": {},
    "schemas_allowed_for_csv_upload": []
}

And the Secure Extra field is empty. I also tried removing the JSON in the Extra field altogether but I still get this error.

The connection strings, I’ve tried are: redshift+psycopg2://user:pass@host/dbname for Redshift and postgresql://user:pass@host:5432/dbname for Postgres

Expected results

The connection should be tested successfully.

Actual results

Clicking on ‘Test Connection’ gives Malformed JSON in the extras field: SyntaxError: Unexpected end of JSON input error.

Screenshots

Screenshot 2019-11-20 at 15 19 36

How to reproduce the bug

  1. Go to Sources > Databases
  2. Click on ‘Add a new record’ (Plus button)
  3. Keeping all the field as it is, just add the database name and database URI
  4. Click on ‘Test Connection’ to see the error.

Environment

(please complete the following information):

  • superset version: "0.999.0dev",
  • python version: Python 3.6.7
  • node.js version: v13.1.0
  • npm version: 6.12.1

Checklist

Make sure these boxes are checked before submitting your issue - thank you!

  • I have checked the superset logs for python stacktraces and included it here as text if there are any.
  • I have reproduced the issue with at least the latest released version of superset.
  • I have checked the issue tracker for the same issue and I haven’t found one similar.

Additional context

I have copied the default JSON in the extras field and checked its validity, and it is a valid JSON.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
dpgasparcommented, Nov 20, 2019

Hi @gamebusterz,

Thank you for taking the time to report this, I’m able to reproduce

Investigating cause and possible fix

1reaction
issue-label-bot[bot]commented, Nov 20, 2019

Issue-Label Bot is automatically applying the label #bug to this issue, with a confidence of 0.89. Please mark this comment with 👍 or 👎 to give our bot feedback!

Links: app homepage, dashboard and code for this bot.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Malformed JSON in the extras field: SyntaxError: Unexpected ...
Clicking on 'Test Connection' gives Malformed JSON in the extras field: SyntaxError: Unexpected end of JSON input error.
Read more >
Uncaught SyntaxError: Unexpected end of JSON input at ...
I tried everything and nothing worked out. Finally, I saw that I created the required file named products.json in which I gave a...
Read more >
Unexpected end of JSON input Error in JavaScript | bobbyhadz
The "Unexpected end of JSON input" error occurs when trying to parse invalid JSON using the `JSON.parse` or `$.parseJSON` methods.
Read more >
Uncaught SyntaxError: Unexpected end of JSON input
A common error encountered by JavaScript programmers is the Uncaught SyntaxError: Unexpected end of JSON input. This is usually observed when the coder...
Read more >
“Unexpected end of JSON input” – possible fixes - LinuxPip
“Unexpected end of JSON input” root cause is a malformed string passed into the JSON.parse() method. In most cases, it is due to...
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