openlibrary icon indicating copy to clipboard operation
openlibrary copied to clipboard

Cannot create new user on local dev after vagrant up, with reCAPTCHA keys

Open randomecho opened this issue 8 years ago • 3 comments

Cannot seem to create a new user on a local dev instance.

Steps:

  1. Clone and run vagrant up
  2. Follow instructions on wiki
  3. Get reCAPTCHA keys
  4. Edit conf/openlibrary.yml for plugin_recaptcha values
  5. Create user via http://localhost:8080/account/create (do not see reCAPTCHA plugin form)
  6. Get the following error output HTML:

Python | /openlibrary/openlibrary/plugins/recaptcha/recaptcha.py in validate, line 34
-- | --
POST http://localhost:8080/account/create

Traceback (innermost first)

    /openlibrary/openlibrary/plugins/recaptcha/recaptcha.py in validate
                return r.json().get('success', '') ...
    ▶ Local vars
    /openlibrary/openlibrary/utils/form.py in validates
                    valid = i.validate(v) and valid ...
    ▶ Local vars
    /openlibrary/openlibrary/plugins/upstream/forms.py in validates
                return Form.validates(self, source) ...
    ▶ Local vars
    /openlibrary/openlibrary/plugins/upstream/account.py in POST
                if not f.validates(i): ...
    ▶ Local vars
    /openlibrary/infogami/utils/app.py in delegate
                return getattr(cls(), method)(*args) ...
    ▶ Local vars
    /openlibrary/infogami/utils/app.py in <lambda>
            HEAD = GET = POST = PUT = DELETE = lambda self: delegate() ...
    ▶ Local vars
    /usr/local/lib/python2.7/dist-packages/web/application.py in handle_class
                    return tocall(*args) ...
    ▶ Local vars
    /usr/local/lib/python2.7/dist-packages/web/application.py in _delegate
                    return handle_class(cls) ...
    ▶ Local vars
    /usr/local/lib/python2.7/dist-packages/web/application.py in handle
                return self._delegate(fn, self.fvars, args) ...
    ▶ Local vars
    /usr/local/lib/python2.7/dist-packages/web/application.py in process
                            return self.handle() ...
    ▶ Local vars 

Additionally, attempting to login with the just created user logs in as openlibrary user.

Specs: Python 2.7.6, VirtualBox 5.2, Vagrant 2.1.1, Linux Mint 17.3

randomecho avatar May 09 '18 00:05 randomecho

@randomecho, for the dev environment, logging in is mocked and tied to the OL user. What is the use case you're trying to achieve?

mekarpeles avatar May 24 '18 23:05 mekarpeles

Was trying to replicate #613 and see if the error still persists on editing profile of a newly created user.

randomecho avatar May 25 '18 16:05 randomecho

Closing as we use Docker over Vagrant now. @mekarpeles feel free to reopen if you disagree

xayhewalo avatar Oct 30 '19 00:10 xayhewalo