Hello,

I am using Web2py on the Heroku servers with the gunicorn server (also 
tried rocket) and using the helloFacebook example made by Michele Comitini 
( https://code.google.com/r/michelecomitini-facebookaccess/ ).
I have updated with the latest facebookforpython facebook.py file, and 
doing local_import instead of the global.

Short version: At random times, when doing the login the redirects  fails 
with 
<type 'exceptions.SyntaxError'> No fields to update

If I drop all the databases and restart the server, then it works again 
(but of course I have no data!!!)
Long version:

First I had a problem when login, with Oauth2, instead of making a 
redirection to the actual server, it redirected to my web IP address, 
weird! 
I solved changing:
----
gluon/contrib/login_methods/oauth20_account.py

 105       r = current.request
 106       #http_host = r.env.http_x_forwarded_for #THIS was making a 
problem getting my laptop address instead of my server address ... WHY??
 107       http_host = r.env.http_host
-----
I've checked the book (The core chapter), manuals and the ref and I don't 
get why we would use:
r.env.http_x_forwarded_for
instead of
r.env.http_host

Any help here?

Well, coming back to the main issue:
The problem is, everything works great sometimes, database is working, 
updates, login, etc. This is from the actual production server AND with the 
local (foreman from heroku) server, both facebook apps running correctly.
Server is either gunicorn (but I don't know how to configure the admin 
password to be available in a file correctly) or either with rocket (which 
I use for testing and being able to see the admin and the tickets). With 
both I'm having the same issue.

facebookforpython (facebook.py file) is updated to the last version, web2py 
version is the latest stable.

and the virtualenv requirements.txt file now contains:
------------------------------------
argparse==1.2.1
distribute==0.6.24
gunicorn==0.17.2
psycopg2==2.4.6
requests==1.1.0
wsgiref==0.1.2
------------------------------------

For the database I am using postgres from heroku and for the configuration 
in the db.py file, is with:
--
from gluon.contrib.heroku import 
get_db                                         
db = get_db() 
--
At a certain point (when the server gets restarted, what happens every push 
or once a day in heroku and every source change in the local) when I try do 
the login, it fails and gives me the stated error. 
Here: ( http://pastebin.com/y8bseuAN ) all the info about the Error. Note 
the trace is taken from the local server, but the info is the same when 
running on the production server.

Questions:
Why is the system trying to update the database when logging in with an 
Oauth system?
Why is the system working correctly with a clean database, but a certain 
point (even if I do not modify at all myself the DB) it breaks?
Any hints on how to solve this issue?

Best,

Leo


-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to