SDK 1.7.6 API server returning invalid JSON

175 views
Skip to first unread message

Adam Jimerson

unread,
Mar 20, 2013, 7:46:06 PM3/20/13
to google-ap...@googlegroups.com
Hello all,

I just upgraded my SDK to version 1.7.6 and I am running into an issue when trying to preform a check to see if a user is logged in or not.  Below is my function for directing the user to where they can sign in with a Google account.

func login(w http.ResponseWriter, r *http.Request) {
c := appengine.NewContext(r)
u := user.Current(c)
if u == nil {
url, err := user.LoginURL(c, "")
if err != nil {
http.Error(w, err.Error(), http.StatusInternalServerError)
return
}
w.Header().Set("Location", url)
w.WriteHeader(http.StatusFound)
}
        return
}

When this function is called the following error is displayed in the browser

dial tcp 127.0.0.1:41791: connection refused

the error in the dev server is not that much helpful ether

INFO     2013-03-20 23:25:21,242 server.py:528] "GET /login HTTP/1.1" 500 45

When I open the localhost:41791 in my browser I see that it returns JSON, but what it returns does not look valid

{app_id: dev~mark-keep, rtok: '0'}

When I run that through a JSON lint checker I get the following error

Parse error on line 1:
{    app_id: dev~mark-kee
-----^
Expecting 'STRING', '}' 

Nigel Tao

unread,
Mar 20, 2013, 10:40:36 PM3/20/13
to Adam Jimerson, google-ap...@googlegroups.com
On Thu, Mar 21, 2013 at 10:46 AM, Adam Jimerson <ven...@gmail.com> wrote:
> I just upgraded my SDK to version 1.7.6 and I am running into an issue when
> trying to preform a check to see if a user is logged in or not.

Can you say which combination of Windows/Mac/Linux and 32/64 bit you have?

David Symonds

unread,
Mar 21, 2013, 2:30:07 AM3/21/13
to Nigel Tao, Adam Jimerson, google-ap...@googlegroups.com
And if it's Linux, can you try grabbing the point release we just pushed?
https://code.google.com/p/googleappengine/downloads/list

Adam Jimerson

unread,
Mar 21, 2013, 6:35:14 AM3/21/13
to David Symonds, google-ap...@googlegroups.com

I am running on 64 bit Linux, I will try the new release later today and report back.

Adam Jimerson

unread,
Mar 21, 2013, 7:07:41 PM3/21/13
to google-ap...@googlegroups.com, David Symonds
I just grabbed the point release and tested my app, and it works thanks.
Reply all
Reply to author
Forward
0 new messages