maxmelnick opened a new issue #8628: Cannot add new database connection due to 
Malformed JSON in the extras field error
URL: https://github.com/apache/incubator-superset/issues/8628
 
 
   I get a _Malformed JSON in the extras field: SyntaxError: Unexpected end of 
JSON input_ error when I try to test the connection of a new database. 
   
   ### Expected results
   
   Successful connection test indicated by Javascript alert modal that says 
_Seems OK!_
   
   ### Actual results
   
   Javascript alert modal that says _Malformed JSON in the extras field: 
SyntaxError: Unexpected end of JSON input_.
   
   #### Screenshots
   
   Error I get when I test the connection (note: disregard `hi` at beginning of 
alert - I was experimenting with a fix):
   
   ![Screen Shot 2019-11-21 at 4 17 57 
PM](https://user-images.githubusercontent.com/4043751/69388499-00b9e800-0c97-11ea-8297-d5ad29d2e198.png)
   
   `Secure extra` field is blank:
   
   ![Screen Shot 2019-11-21 at 4 18 05 
PM](https://user-images.githubusercontent.com/4043751/69388500-00b9e800-0c97-11ea-9aad-6848a17b18c6.png)
   
   
   #### How to reproduce the bug
   
   ```
   git clone https://github.com/apache/incubator-superset/
   cd incubator-superset/contrib/docker
   docker-compose run --rm superset ./docker-init.sh
   docker-compose up
   ```
   
   Then...
   - open the UI
   - go to add a database
   - configure the database connection, making sure to keep the `Secure extra` 
field blank, and click "Test Connection"
   
   ### Environment
   
   Superset running in Docker (development mode)
   Superset cloned from master branch (commit: 
b7a508d5a7a690ef56180a1b2e7ec151c6572d52)
   
   ### Checklist
   
   - [ X] I have checked the superset logs for python stacktraces and included 
it here as text if there are any.
   - [X ] I have reproduced the issue with at least the latest released version 
of superset.
   - [ X] I have checked the issue tracker for the same issue and I haven't 
found one similar.
   
   ### Additional context
   
   I believe this bug was introduced in [this 
PR](https://github.com/apache/incubator-superset/commit/d70e0fc3593218cc562eeb68ef4311e41d08aeb0#diff-8d6d8d888724e94b5b4f2f3e46cb2fc7).
   
   Workaround: add empty object (`{}`) to `Secure extras` field to successfully 
test new database connection.
   
   ![Screen Shot 2019-11-21 at 4 18 12 
PM](https://user-images.githubusercontent.com/4043751/69388648-a2413980-0c97-11ea-81d7-7880baba22b5.png)
   ![Screen Shot 2019-11-21 at 4 18 19 
PM](https://user-images.githubusercontent.com/4043751/69388649-a2413980-0c97-11ea-9cea-8c1cb869fb82.png)
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to