You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2019/01/25 23:54:23 UTC
[GitHub] mrmcduff opened a new issue #6761: JSON.stringify is not safe for
circular objects
mrmcduff opened a new issue #6761: JSON.stringify is not safe for circular objects
URL: https://github.com/apache/incubator-superset/issues/6761
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
Make sure these boxes are checked before submitting your issue - thank you!
- [x] I have checked the superset logs for python stacktraces and included it here as text if there are any. (N/A)
- [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.
Using the latest Master and the provided sample data, I was getting a repeated crash at https://github.com/apache/incubator-superset/blob/master/superset/assets/src/explore/exploreUtils.js#L74
when creating a Time-series table immediately upon clicking "run query".
The crash in question is a circular-JSON error for `JSON.stringify`. Drilling down into the JSON in question, it absolutely is circular. Besides fixing this particular data that is being input, we should not use `JSON.stringify` on anything we aren't 100% sure of the shape of, since this error is relatively easy to create.
### Superset version
Master
### Expected results
Display Time Series
### Actual results
Crash
### Steps to reproduce
1. Deploy with Sample data.
2. Create new chart (suggested: use Birth Names)
3. For the time-series column options, choose "Spark Line"
<img width="572" alt="screen shot 2019-01-25 at 3 50 16 pm" src="https://user-images.githubusercontent.com/19434213/51778935-3adb4d00-20b9-11e9-9721-2018999d840d.png">
4. Run query. (Click button in top left)
5. Crash.
<img width="518" alt="screen shot 2019-01-25 at 3 51 01 pm" src="https://user-images.githubusercontent.com/19434213/51778942-40389780-20b9-11e9-849a-a07edfa6664b.png">
Stacktrace
```
Uncaught TypeError: Converting circular structure to JSON
at JSON.stringify (<anonymous>)
at getExploreLongUrl (exploreUtils.js?2c11:74)
at ProxyComponent.addHistory (ExploreViewContainer.jsx?2c1c:237)
at ProxyComponent.addHistory (react-hot-loader.development.js?c2cb:693)
at ProxyComponent.onQuery (ExploreViewContainer.jsx?2c1c:162)
at ProxyComponent.onQuery (react-hot-loader.development.js?c2cb:693)
at HTMLUnknownElement.callCallback (react-dom.development.js?61bb:149)
at Object.invokeGuardedCallbackDev (react-dom.development.js?61bb:199)
at invokeGuardedCallback (react-dom.development.js?61bb:256)
at invokeGuardedCallbackAndCatchFirstError (react-dom.development.js?61bb:270)
```
Upon digging in / debugging, the `formData` element being parsed at that line is absolutely a circular JSON argument.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org