RuntimeError: can't modify frozen object


(Michael Gutteridge) #1

I’ve got a broken Discourse install. It’s installed from Docker and is current.

I’ve attempted to rename the server using the procedure described here and have somehow managed to b0rk it. The server appears to start properly, but accessing it yeilds this error in production.log:

    Started GET "/" for 140.107.75.238 at 2014-03-11 14:36:37 +0000
Processing by ListController#latest as HTML
RuntimeError: can't modify frozen object: SELECT COUNT(*) AS count_all, notification_type AS notification_type FROM "notifications"  WHERE "notifications"."user_id" = $1 AND (id > 7 and read = false) GROUP BY notification_type
Completed 500 Internal Server Error in 220ms

RuntimeError (can't modify frozen object):
  app/models/user.rb:221:in `unread_notifications_by_type'
  app/models/user.rb:235:in `unread_notifications'
  app/controllers/application_controller.rb:230:in `preload_current_user_data'
  app/controllers/application_controller.rb:145:in `preload_json'
  lib/middleware/anonymous_cache.rb:104:in `call'
  config/initializers/quiet_logger.rb:10:in `call_with_quiet_assets'
  config/initializers/silence_logger.rb:19:in `call'
  lib/middleware/unicorn_oobgc.rb:95:in `process_client'

Is there any advice as to how I should proceed?

Thanks much…


(Neil Lalonde) #2

We’re seeing this on try.discourse.org right now for admin logged in users (and maybe others?). Looking into it now.


(Michael Gutteridge) #3

Just to add data, I appear to be logged in as an admin user. When I do a new private session, I’m able to view the site successfully.

Thanks for looking at it!

M


(Neil Lalonde) #4

I reverted this commit:

https://github.com/discourse/discourse/commit/cff7d124195eecb1f4345ee0a125c560719a0933

All it did was upgrade the sass gem, but that somehow caused this.

@atombaby Please update your instance and report back here.


(Michael Gutteridge) #5

@neil Updated- seems to be working great. Thanks for the fix.


(Jeff Atwood) #6

(Sam Saffron) #7

(Sam Saffron) #8

This is a bug with rack-mini-profiler … somehow triggered by updating sass.

Going to try to repro locally and fix.


(Jeff Atwood) #9