voltrb / volt

A Ruby web framework where your Ruby runs on both server and client
MIT License
3.22k stars 196 forks source link

Password reset returning error and hashed password to the user. #338

Closed whithajess closed 5 years ago

whithajess commented 8 years ago

After hitting password reset on an email of an actual user test@test.com the error I get on the server is:

Unable to serialize #<User id: "78eb..44db", email: "test@test.com", hashed_password: "$2a$10$WJu/rxLw/f62Pq8oxp/W6eRS9U1IQf1/bfjOZgNGaWRu7SUOPjdFy", name: "test"> to EJSON
/home/ubuntu/.rvm/gems/ruby-2.2.2@volt_example_app/gems/volt-0.9.6/lib/volt/utils/ejson.rb:61:in `encode'
/home/ubuntu/.rvm/gems/ruby-2.2.2@volt_example_app/gems/volt-0.9.6/lib/volt/utils/ejson.rb:43:in `block in encode'
/home/ubuntu/.rvm/gems/ruby-2.2.2@volt_example_app/gems/volt-0.9.6/lib/volt/utils/ejson.rb:43:in `map'
/home/ubuntu/.rvm/gems/ruby-2.2.2@volt_example_app/gems/volt-0.9.6/lib/volt/utils/ejson.rb:43:in `encode'
/home/ubuntu/.rvm/gems/ruby-2.2.2@volt_example_app/gems/volt-0.9.6/lib/volt/utils/ejson.rb:10:in `stringify'
/home/ubuntu/.rvm/gems/ruby-2.2.2@volt_example_app/gems/volt-0.9.6/lib/volt/tasks/dispatcher.rb:149:in `block in dispatch_in_thread'
/home/ubuntu/.rvm/gems/ruby-2.2.2@volt_example_app/gems/opal-0.8.1/stdlib/promise.rb:202:in `call'
/home/ubuntu/.rvm/gems/ruby-2.2.2@volt_example_app/gems/opal-0.8.1/stdlib/promise.rb:202:in `resolve'
/home/ubuntu/.rvm/gems/ruby-2.2.2@volt_example_app/gems/opal-0.8.1/stdlib/promise.rb:179:in `>>'
/home/ubuntu/.rvm/gems/ruby-2.2.2@volt_example_app/gems/opal-0.8.1/stdlib/promise.rb:162:in `^'
/home/ubuntu/.rvm/gems/ruby-2.2.2@volt_example_app/gems/opal-0.8.1/stdlib/promise.rb:197:in `resolve'
/home/ubuntu/.rvm/gems/ruby-2.2.2@volt_example_app/gems/opal-0.8.1/stdlib/promise.rb:179:in `>>'
/home/ubuntu/.rvm/gems/ruby-2.2.2@volt_example_app/gems/opal-0.8.1/stdlib/promise.rb:162:in `^'
/home/ubuntu/.rvm/gems/ruby-2.2.2@volt_example_app/gems/opal-0.8.1/stdlib/promise.rb:272:in `then'
/home/ubuntu/.rvm/gems/ruby-2.2.2@volt_example_app/gems/volt-0.9.6/lib/volt/tasks/dispatcher.rb:148:in `dispatch_in_thread'
/home/ubuntu/.rvm/gems/ruby-2.2.2@volt_example_app/gems/volt-0.9.6/lib/volt/tasks/dispatcher.rb:57:in `block in dispatch'
/home/ubuntu/.rvm/gems/ruby-2.2.2@volt_example_app/gems/concurrent-ruby-0.8.0/lib/concurrent/executor/ruby_thread_pool_worker.rb:62:in `call'
/home/ubuntu/.rvm/gems/ruby-2.2.2@volt_example_app/gems/concurrent-ruby-0.8.0/lib/concurrent/executor/ruby_thread_pool_worker.rb:62:in `block in run'
/home/ubuntu/.rvm/gems/ruby-2.2.2@volt_example_app/gems/concurrent-ruby-0.8.0/lib/concurrent/executor/ruby_thread_pool_worker.rb:53:in `loop'
/home/ubuntu/.rvm/gems/ruby-2.2.2@volt_example_app/gems/concurrent-ruby-0.8.0/lib/concurrent/executor/ruby_thread_pool_worker.rb:53:in `run'
/home/ubuntu/.rvm/gems/ruby-2.2.2@volt_example_app/gems/concurrent-ruby-0.8.0/lib/concurrent/executor/ruby_thread_pool_executor.rb:255:in `block in create_worker_thread'

The response returned to the user is:

Volt::EJSON::NonEjsonType: Unable to serialize #<User id: "78eb..44db", email: "test@test.com", hashed_password: "$2a$10$WJu/rxLw/f62Pq8oxp/W6eRS9U1IQf1/bfjOZgNGaWRu7SUOPjdFy", name: "test"> to EJSON

Created a new app using the generator from volt 0.9.6 to test no changes to it.

This is with no mailer setup.

myknbani commented 8 years ago

Same error happens to me. Can't do a password reset for a fresh volt app.