Error While Trying to load, New and Admin accounts


(Bobby Williams) #1

So whenever I try and access a users account from the ‘Users’ Tab on the admin panel I get this error.
Error When trying to load, go back or retry

It only happens on non ‘Normal User’ Accounts. aka, Admin Accounts, Mod accounts and new accounts.

Though it should show there profile, there badges and allow me to change other settings.

Any suggestions could be helpful ^.^ I tried upgrading my RAM I have 16 GB now instead of 1 and it still happens.
@codinghorror Just saw that you frequent here and @sam


User admin panel broken due to timestamp out of range
User admin panel fails to load after making a change
(Sam Saffron) #2

Where is this happening? What version of Discourse are you on? Are you using Discourse Docker?


(Bobby Williams) #3

Yes, Discourse docker. In the admin panel, when i go to ‘Users’ Then try and access one of the users I get that error.


(Sam Saffron) #4

Thas is 1 out of 3 questions answered :slight_smile:


(Bobby Williams) #5

Docker, v1.3.0.beta9 +162 And

@sam Any ideas?


(Sam Saffron) #6

what error are you seeing in /logs


(Bobby Williams) #7

I’m new to discourse, where can I find that?


(Sam Saffron) #8

http://YOURSITENAME/logs


(Bobby Williams) #9
  PG::DatetimeFieldOverflow: ERROR:  date/time field value out of range: "3833067795-08-07 23:28:24.761142 BC"
   LINE 1: ..."user_histories"."action" = 15 AND (created_at >= '383306779...

  ActiveRecord::StatementInvalid (PG::DatetimeFieldOverflow: ERROR:  date/time field value out of range: "3833067795-08-07 23:28:24.761142 BC"
      LINE 1: ..."user_histories"."action" = 15 AND (created_at >= '383306779...

(Sam Saffron) #10

we are going to need more than that … full backtrace … full error … click on share and paste that screen here anonymized


(Jeff Atwood) #11

Was this data imported? Are there crazy dates in the import data?


(Bobby Williams) #12

Message

PG::DatetimeFieldOverflow: ERROR:  date/time field value out of range: "3833067795-08-07 23:28:24.761142 BC"
LINE 1: ..."user_histories"."action" = 15 AND (created_at >= '383306779...
                                                             ^
: SELECT  1 AS one FROM "user_histories"  WHERE "user_histories"."target_user_id" = 34 AND "user_histories"."action" = 15 AND (created_at >= '3833067795-08-07 23:28:24.761142 BC') AND "user_histories"."previous_value" = '2' AND "user_histories"."new_value" = '3' LIMIT 1

Share
Protect
Backtrace

/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/logster-0.8.1/lib/logster/logger.rb:52:in `add'
/usr/local/lib/ruby/2.0.0/logger.rb:454:in `error'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.10/lib/active_record/connection_adapters/abstract_adapter.rb:365:in `translate_exception_class'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.10/lib/active_record/connection_adapters/abstract_adapter.rb:380:in `rescue in log'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.10/lib/active_record/connection_adapters/abstract_adapter.rb:378:in `log'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.10/lib/active_record/connection_adapters/postgresql_adapter.rb:822:in `exec_no_cache'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.10/lib/active_record/connection_adapters/postgresql/database_statements.rb:137:in `exec_query'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.10/lib/active_record/connection_adapters/postgresql_adapter.rb:954:in `select'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.10/lib/active_record/connection_adapters/abstract/database_statements.rb:24:in `select_all'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.10/lib/active_record/connection_adapters/abstract/query_cache.rb:68:in `block in select_all'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.10/lib/active_record/connection_adapters/abstract/query_cache.rb:83:in `cache_sql'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.10/lib/active_record/connection_adapters/abstract/query_cache.rb:68:in `select_all'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.10/lib/active_record/connection_adapters/abstract/database_statements.rb:30:in `select_one'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.10/lib/active_record/connection_adapters/abstract/database_statements.rb:35:in `select_value'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.10/lib/active_record/relation/finder_methods.rb:298:in `exists?'
/var/www/discourse/app/models/user.rb:637:in `on_tl3_grace_period?'
/var/www/discourse/app/models/trust_level3_requirements.rb:68:in `on_grace_period'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/active_model_serializers-0.8.3/lib/active_model/serializer.rb:99:in `block in attribute'
(eval):7:in `_fast_attributes'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/active_model_serializers-0.8.3/lib/active_model/serializer.rb:455:in `attributes'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/active_model_serializers-0.8.3/lib/active_model/serializer.rb:479:in `_serializable_hash'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/active_model_serializers-0.8.3/lib/active_model/serializer.rb:361:in `serializable_hash'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/active_model_serializers-0.8.3/lib/active_model/serializer/associations.rb:200:in `serialize'
/var/www/discourse/lib/freedom_patches/ams_include_without_root.rb:55:in `include!'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/active_model_serializers-0.8.3/lib/active_model/serializer.rb:367:in `block in include_associations!'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/active_model_serializers-0.8.3/lib/active_model/serializer.rb:366:in `each_key'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/active_model_serializers-0.8.3/lib/active_model/serializer.rb:366:in `include_associations!'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/active_model_serializers-0.8.3/lib/active_model/serializer.rb:480:in `_serializable_hash'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/active_model_serializers-0.8.3/lib/active_model/serializer.rb:361:in `serializable_hash'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/active_model_serializers-0.8.3/lib/active_model/serializer.rb:349:in `as_json'
/var/www/discourse/app/controllers/application_controller.rb:222:in `serialize_data'
/var/www/discourse/app/controllers/application_controller.rb:231:in `render_serialized'
/var/www/discourse/app/controllers/admin/users_controller.rb:42:in `show'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/actionpack-4.1.10/lib/action_controller/metal/implicit_render.rb:4:in `send_action'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/actionpack-4.1.10/lib/abstract_controller/base.rb:189:in `process_action'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/actionpack-4.1.10/lib/action_controller/metal/rendering.rb:10:in `process_action'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/actionpack-4.1.10/lib/abstract_controller/callbacks.rb:20:in `block in process_action'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.10/lib/active_support/callbacks.rb:113:in `call'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.10/lib/active_support/callbacks.rb:113:in `call'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.10/lib/active_support/callbacks.rb:552:in `block (2 levels) in compile'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.10/lib/active_support/callbacks.rb:502:in `call'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.10/lib/active_support/callbacks.rb:502:in `call'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.10/lib/active_support/callbacks.rb:86:in `run_callbacks'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/actionpack-4.1.10/lib/abstract_controller/callbacks.rb:19:in `process_action'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/actionpack-4.1.10/lib/action_controller/metal/rescue.rb:29:in `process_action'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/actionpack-4.1.10/lib/action_controller/metal/instrumentation.rb:32:in `block in process_action'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.10/lib/active_support/notifications.rb:159:in `block in instrument'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.10/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.10/lib/active_support/notifications.rb:159:in `instrument'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/actionpack-4.1.10/lib/action_controller/metal/instrumentation.rb:30:in `process_action'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/actionpack-4.1.10/lib/action_controller/metal/params_wrapper.rb:250:in `process_action'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.10/lib/active_record/railties/controller_runtime.rb:18:in `process_action'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/actionpack-4.1.10/lib/abstract_controller/base.rb:136:in `process'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/actionview-4.1.10/lib/action_view/rendering.rb:30:in `process'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/rack-mini-profiler-0.9.3/lib/mini_profiler/profiling_methods.rb:106:in `block in profile_method'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/actionpack-4.1.10/lib/action_controller/metal.rb:196:in `dispatch'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/actionpack-4.1.10/lib/action_controller/metal/rack_delegation.rb:13:in `dispatch'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/actionpack-4.1.10/lib/action_controller/metal.rb:232:in `block in action'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/actionpack-4.1.10/lib/action_dispatch/routing/route_set.rb:82:in `call'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/actionpack-4.1.10/lib/action_dispatch/routing/route_set.rb:82:in `dispatch'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/actionpack-4.1.10/lib/action_dispatch/routing/route_set.rb:50:in `call'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/actionpack-4.1.10/lib/action_dispatch/routing/mapper.rb:45:in `call'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/actionpack-4.1.10/lib/action_dispatch/journey/router.rb:73:in `block in call'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/actionpack-4.1.10/lib/action_dispatch/journey/router.rb:59:in `each'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/actionpack-4.1.10/lib/action_dispatch/journey/router.rb:59:in `call'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/actionpack-4.1.10/lib/action_dispatch/routing/route_set.rb:692:in `call'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/rack-protection-1.5.3/lib/rack/protection/frame_options.rb:31:in `call'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/omniauth-1.2.2/lib/omniauth/strategy.rb:186:in `call!'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/omniauth-1.2.2/lib/omniauth/strategy.rb:164:in `call'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/omniauth-1.2.2/lib/omniauth/strategy.rb:186:in `call!'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/omniauth-1.2.2/lib/omniauth/strategy.rb:164:in `call'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/omniauth-1.2.2/lib/omniauth/strategy.rb:186:in `call!'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/omniauth-1.2.2/lib/omniauth/strategy.rb:164:in `call'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/omniauth-1.2.2/lib/omniauth/strategy.rb:186:in `call!'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/omniauth-1.2.2/lib/omniauth/strategy.rb:164:in `call'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/omniauth-1.2.2/lib/omniauth/strategy.rb:186:in `call!'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/omniauth-1.2.2/lib/omniauth/strategy.rb:164:in `call'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/omniauth-1.2.2/lib/omniauth/strategy.rb:186:in `call!'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/omniauth-1.2.2/lib/omniauth/strategy.rb:164:in `call'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/omniauth-1.2.2/lib/omniauth/builder.rb:59:in `call'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/rack-1.5.3/lib/rack/conditionalget.rb:25:in `call'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/rack-1.5.3/lib/rack/head.rb:11:in `call'
/var/www/discourse/lib/middleware/anonymous_cache.rb:123:in `call'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/actionpack-4.1.10/lib/action_dispatch/middleware/params_parser.rb:27:in `call'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/actionpack-4.1.10/lib/action_dispatch/middleware/flash.rb:254:in `call'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/message_bus-1.0.11/lib/message_bus/rack/middleware.rb:67:in `call'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/rack-1.5.3/lib/rack/session/abstract/id.rb:225:in `context'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/rack-1.5.3/lib/rack/session/abstract/id.rb:220:in `call'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/actionpack-4.1.10/lib/action_dispatch/middleware/cookies.rb:562:in `call'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.10/lib/active_record/query_cache.rb:36:in `call'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.10/lib/active_record/connection_adapters/abstract/connection_pool.rb:621:in `call'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/actionpack-4.1.10/lib/action_dispatch/middleware/callbacks.rb:29:in `block in call'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.10/lib/active_support/callbacks.rb:82:in `run_callbacks'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/actionpack-4.1.10/lib/action_dispatch/middleware/callbacks.rb:27:in `call'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/actionpack-4.1.10/lib/action_dispatch/middleware/remote_ip.rb:76:in `call'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/actionpack-4.1.10/lib/action_dispatch/middleware/debug_exceptions.rb:17:in `call'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/actionpack-4.1.10/lib/action_dispatch/middleware/show_exceptions.rb:30:in `call'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/logster-0.8.1/lib/logster/middleware/reporter.rb:31:in `call'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/railties-4.1.10/lib/rails/rack/logger.rb:38:in `call_app'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/railties-4.1.10/lib/rails/rack/logger.rb:22:in `call'
/var/www/discourse/config/initializers/quiet_logger.rb:10:in `call_with_quiet_assets'
/var/www/discourse/config/initializers/silence_logger.rb:26:in `call'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/actionpack-4.1.10/lib/action_dispatch/middleware/request_id.rb:21:in `call'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/rack-1.5.3/lib/rack/methodoverride.rb:21:in `call'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/rack-1.5.3/lib/rack/runtime.rb:17:in `call'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/rack-1.5.3/lib/rack/sendfile.rb:112:in `call'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/rack-mini-profiler-0.9.3/lib/mini_profiler/profiler.rb:276:in `call'
/var/www/discourse/lib/middleware/request_tracker.rb:70:in `call'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/railties-4.1.10/lib/rails/engine.rb:514:in `call'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/railties-4.1.10/lib/rails/application.rb:144:in `call'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/railties-4.1.10/lib/rails/railtie.rb:194:in `public_send'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/railties-4.1.10/lib/rails/railtie.rb:194:in `method_missing'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/rack-1.5.3/lib/rack/builder.rb:138:in `call'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/rack-1.5.3/lib/rack/urlmap.rb:65:in `block in call'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/rack-1.5.3/lib/rack/urlmap.rb:50:in `each'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/rack-1.5.3/lib/rack/urlmap.rb:50:in `call'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/unicorn-4.8.3/lib/unicorn/http_server.rb:576:in `process_client'
/var/www/discourse/lib/scheduler/defer.rb:85:in `process_client'
/var/www/discourse/lib/middleware/unicorn_oobgc.rb:95:in `process_client'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/unicorn-4.8.3/lib/unicorn/http_server.rb:670:in `worker_loop'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/unicorn-4.8.3/lib/unicorn/http_server.rb:525:in `spawn_missing_workers'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/unicorn-4.8.3/lib/unicorn/http_server.rb:140:in `start'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/unicorn-4.8.3/bin/unicorn:126:in `<top (required)>'
/var/www/discourse/vendor/bundle/ruby/2.0.0/bin/unicorn:23:in `load'
/var/www/discourse/vendor/bundle/ruby/2.0.0/bin/unicorn:23:in `<main>'

Share
Protect
Env

HTTP_HOST: discourse.MySiteWasHere.net
REQUEST_URI: /admin/users/2000jur26.json?_=1432162650704
REQUEST_METHOD: GET
HTTP_USER_AGENT: Mozilla/5.0 (Windows NT 6.1; rv:38.0) Gecko/20100101 Firefox/38.0
HTTP_ACCEPT: application/json, text/javascript, */*; q=0.01
HTTP_REFERER: http://discourse.MySiteWasHere.net/admin/users/list/active
HTTP_X_FORWARDED_FOR: (IP was here i removed it)
HTTP_X_REAL_IP: (IP was here i removed it)
username: DreamOnPvP

params:
  _: 1432162650704

(Sam Saffron) #13

Can you set SiteSetting tl3_promotion_min_duration to something non insane, perhaps 10000 days, something big but impractical for people to ever reach.

@techAPJ can we add some protection here.


(Bobby Williams) #14

How do I do that? I’m new, sorry if I sound clueless


(Sam Saffron) #15

Clearly you were able to change /admin/site_settings in the first place …


(Bobby Williams) #16

Sorry I misunderstood. That fixed it :slight_smile: Thanks a ton! Any clue why that happens?


(Sam Saffron) #17

Yes, someone plugged in 99999999999999999999999999999999 as the tl3_promotion_min_duration which caused stuff on the site to break.


(Sam Saffron) #18

(Jeff Atwood) #19

Well, no, they could not have done that – we enforce 32-bit integer limits. But there is some value below the maximum 32-bit integer that causes a problem here.


(Jeff Atwood) #20

@techapj can you add validation here so the value is not set higher than something like 20000? This is still causing support requests for us even with 32 bit integer protection.