ph-slack icon indicating copy to clipboard operation
ph-slack copied to clipboard

Getting ERR-INVALID-SESSION error after some time

Open yunmanger1 opened this issue 10 years ago • 3 comments

Looks like session expires. If I redeploy the app, it works again. How can we handle this?

Got story #389 on #PHID-TASK-qv6aa7ag3bulebb6gbyy: yun_man_ger edited the description of T57: asdasd.
Exception on /handle [POST]
Traceback (most recent call last):
  File "/app/.heroku/python/lib/python2.7/site-packages/flask/app.py", line 1817, in wsgi_app
    response = self.full_dispatch_request()
  File "/app/.heroku/python/lib/python2.7/site-packages/flask/app.py", line 1477, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/app/.heroku/python/lib/python2.7/site-packages/flask/app.py", line 1381, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "/app/.heroku/python/lib/python2.7/site-packages/flask/app.py", line 1475, in full_dispatch_request
    rv = self.dispatch_request()
  File "/app/.heroku/python/lib/python2.7/site-packages/flask/app.py", line 1461, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "ph_slack/web.py", line 64, in handle
    for s in ph_obj.subscribers
  File "/app/ph_slack/phab.py", line 99, in subscribers
    obj for obj in self.cc_objs if isinstance(obj, Project)
  File "/app/ph_slack/phab.py", line 116, in cc_objs
    self.sync()
  File "/app/ph_slack/phab.py", line 27, in sync
    datadict = self.query_data_by_phids(self.phabricator, self.phid)
  File "/app/ph_slack/phab.py", line 131, in query_data_by_phids
    r = phabricator.client.maniphest.query(phids=phids)
APIError: ERR-INVALID-SESSION: Session key is invalid.

yunmanger1 avatar Jun 30 '15 05:06 yunmanger1

Was the PHABRICATOR_CERT changed before the error occured?

psjay avatar Jul 01 '15 18:07 psjay

No. PHABRICATOR_CERT is the same value. Restarting the app, makes it work again.

yunmanger1 avatar Jul 02 '15 05:07 yunmanger1

Does the Phabricator instance itself restart occasionally?

psjay avatar Jul 05 '15 08:07 psjay