onaio / gisida

JavaScript library that converts MapSpec layers to beautiful, interactive maps using Mapbox GL
http://gisida.onalabs.org/
Apache License 2.0
11 stars 3 forks source link

Public superset endpoints return 500 if user is logged into discover #460

Open kelvin-muchiri opened 4 years ago

kelvin-muchiri commented 4 years ago

Steps to reproduce:

  1. Login into discover
  2. Visit a gisida site that accesses public discover endpoints such as https://zimbabwe.onalabs.org/
  3. Open a category and load a layer e.g Communication->MICS Data->Province->% of women and men age 15-49 years who are exposed to any type of media (newspaper,radio or TV) at least once a week. The spinner does not stop
  4. Opening developer tools shows a 500 error response was returned by the endpoint. Screenshot from 2020-04-28 18-40-59
  5. In a new tab, open https://discover.ona.io/ and logout.
  6. Reload the tab that had loaded https://zimbabwe.onalabs.org/. Click on the layers again, this time they should load
kelvin-muchiri commented 4 years ago

@ukanga @cKellyDesign @kahummer @ciremusyoka I also raised this issue on slack in the canopy channel, https://onaio.slack.com/archives/C8ZNYCRFV/p1588083110016700.

cKellyDesign commented 4 years ago

@kelvin-muchiri from the Gisida side of things we need to handle the error / erroneous responses.

Any idea what is causing the 500 error in Superset?

kelvin-muchiri commented 4 years ago

Any idea what is causing the 500 error in Superset?

@cKellyDesign Liaising with the canopy team on this

kelvin-muchiri commented 4 years ago

from the Gisida side of things we need to handle the error / erroneous responses.

Created an issue

kelvin-muchiri commented 4 years ago

@ukanga @cKellyDesign The endpoints need to be added to be assigned to the Default Public Role in superset. This was done for the endpoints under category Child Protection and now they are loading even if a user is logged into discover.

cKellyDesign commented 4 years ago

@kelvin-muchiri @ukanga strange that Superset is returning a 500 instead of a 403 if it comes down to a permissions issue. On our end it looks like we're trying to parse a response from this error, which we need to handle better.