Nth-iteration-labs/streamingbandit-ui

Clicking on "Experiments" in empty installation gives "internal server error"

MKaptein opened this issue · 5 comments

When logging in to a fresh new back-end instance clicking on "experiments" give a "internal server error": basically this call:

http://localhost:8080/exp?_end=10&_order=DESC&_sort=id&_start=0

apparently fails. Perhaps its back-end?

Can you paste the relevant server's stack trace? Either from the StreamingBandit server log, or from the browser's developers log? If I empty "my" server's experiments list, it seems fine:

image

The pictures somehow seem to have gotten lost in translation :)
This nevertheless sounds suspiciously like yet another CORS related problem.
If so, we might do something along these lines in the "set_default_headers" function in basehandler.py:

        if not origin: 
            origin = "http://request.has.no.origin.com" 
        self.set_header("Access-Control-Allow-Origin", origin)

But the StreamingBandit server log entry for this call would help pinpoint the issue. Or enable the "Web Developer" tools, and take a look at the response body the server sends at the time of this error - it should contain a JSON trace log. When all goes well, it looks like this:

image

This has been fixed server side, see: Nth-iteration-labs/streamingbandit#55 (comment)