loomio / loomio-deploy

Install Loomio on your own server
147 stars 60 forks source link

Creating/accessing groups throws an "undefined method" error #109

Open Rudedog9d opened 1 day ago

Rudedog9d commented 1 day ago

When I try to access the dashboard or create a group, an internal server error is thrown. The logs show undefined method 'allow_subgroups'.

What can I do to debug this further?

Accessing Dashboard:

I, [2024-10-17T22:10:10.276237 #14]  INFO -- : [0144a7b1-5c3d-4157-82ff-b661b32a7307] method=GET path=/api/v1/profile/groups format=json controller=API::V1::ProfileController action=groups status=500 allocations=50510 duration=174.06 view=0.00 db=125.61
F, [2024-10-17T22:10:10.280236 #14] FATAL -- : [0144a7b1-5c3d-4157-82ff-b661b32a7307]   
[0144a7b1-5c3d-4157-82ff-b661b32a7307] NoMethodError (undefined method `allow_subgroups' for #<Subscription id: 5, expires_at: nil, chargify_subscription_id: nil, plan: "free", payment_method: "none", owner_id: nil, max_threads: nil, max_members: nil, max_orgs: nil, state: "active", members_count: nil, created_at: "2024-10-17 22:07:00.939061000 +0000", updated_at: "2024-10-17 22:07:00.939061000 +0000", info: nil, canceled_at: nil, activated_at: nil, renews_at: nil, renewed_at: nil>):
[0144a7b1-5c3d-4157-82ff-b661b32a7307]   
[0144a7b1-5c3d-4157-82ff-b661b32a7307] app/serializers/group_serializer.rb:73:in `subscription'
[0144a7b1-5c3d-4157-82ff-b661b32a7307] (eval):52:in `_fast_attributes'
[0144a7b1-5c3d-4157-82ff-b661b32a7307] app/controllers/api/v1/snorlax_base.rb:84:in `respond_with_collection'
[0144a7b1-5c3d-4157-82ff-b661b32a7307] app/controllers/api/v1/profile_controller.rb:21:in `groups'
[0144a7b1-5c3d-4157-82ff-b661b32a7307] app/helpers/locales_helper.rb:8:in `use_preferred_locale'
I, [2024-10-17T22:10:10.283552 #14]  INFO -- : source=rack-timeout id=0144a7b1-5c3d-4157-82ff-b661b32a7307 timeout=15000ms service=185ms state=completed
I, [2024-10-17T22:10:10.299887 #14]  INFO -- : [139d3be1-d693-426c-b38e-f9980e58e733] method=GET path=/api/v1/discussions/dashboard format=json controller=API::V1::DiscussionsController action=dashboard status=500 allocations=49276 duration=173.61 view=0.00 db=121.51
F, [2024-10-17T22:10:10.301030 #14] FATAL -- : [139d3be1-d693-426c-b38e-f9980e58e733]   
[139d3be1-d693-426c-b38e-f9980e58e733] NoMethodError (undefined method `allow_subgroups' for #<Subscription id: 2, expires_at: nil, chargify_subscription_id: nil, plan: "free", payment_method: "none", owner_id: nil, max_threads: nil, max_members: nil, max_orgs: nil, state: "active", members_count: nil, created_at: "2024-09-26 20:58:39.188058000 +0000", updated_at: "2024-09-26 20:58:39.188058000 +0000", info: nil, canceled_at: nil, activated_at: nil, renews_at: nil, renewed_at: nil>):
[139d3be1-d693-426c-b38e-f9980e58e733]   
[139d3be1-d693-426c-b38e-f9980e58e733] app/serializers/group_serializer.rb:73:in `subscription'
[139d3be1-d693-426c-b38e-f9980e58e733] (eval):52:in `_fast_attributes'
[139d3be1-d693-426c-b38e-f9980e58e733] app/controllers/api/v1/snorlax_base.rb:84:in `respond_with_collection'
[139d3be1-d693-426c-b38e-f9980e58e733] app/controllers/api/v1/discussions_controller.rb:49:in `dashboard'
[139d3be1-d693-426c-b38e-f9980e58e733] app/helpers/locales_helper.rb:8:in `use_preferred_locale'
I, [2024-10-17T22:10:10.301327 #14]  INFO -- : source=rack-timeout id=139d3be1-d693-426c-b38e-f9980e58e733 timeout=15000ms service=180ms state=completed
I, [2024-10-17T22:10:10.468751 #14]  INFO -- : source=rack-timeout id=2c6788ea-8e7f-4f69-becc-adb55314e5b8 timeout=15000ms state=ready
X-Accel-Mapping header missing
I, [2024-10-17T22:10:10.492598 #14]  INFO -- : [2c6788ea-8e7f-4f69-becc-adb55314e5b8] method=GET path=/api/v1/polls format=json controller=API::V1::PollsController action=index status=200 allocations=3732 duration=21.54 view=0.27 db=7.11
I, [2024-10-17T22:10:10.493840 #14]  INFO -- : source=rack-timeout id=2c6788ea-8e7f-4f69-becc-adb55314e5b8 timeout=15000ms service=25ms state=completed

Creating group:

I, [2024-10-17T22:07:00.980755 #14]  INFO -- : [ed4efd13-41bb-490e-8f09-086dc57a88ab] [ActiveJob] Enqueued ActiveStorage::AnalyzeJob (Job ID: 3408589a-d987-45f7-acfc-72dec0929df9) to Sidekiq(active_storage_analysis) with arguments: #<GlobalID:0x00007f8728094320 @uri=#<URI::GID gid://loomio/ActiveStorage::Blob/10>>
I, [2024-10-17T22:07:01.115329 #14]  INFO -- : [ed4efd13-41bb-490e-8f09-086dc57a88ab] method=POST path=/api/v1/groups format=json controller=API::V1::GroupsController action=create status=500 allocations=38530 duration=205.16 view=0.00 db=43.89
F, [2024-10-17T22:07:01.116698 #14] FATAL -- : [ed4efd13-41bb-490e-8f09-086dc57a88ab]   
[ed4efd13-41bb-490e-8f09-086dc57a88ab] NoMethodError (undefined method `allow_subgroups' for #<Subscription id: 5, expires_at: nil, chargify_subscription_id: nil, plan: "free", payment_method: "none", owner_id: nil, max_threads: nil, max_members: nil, max_orgs: nil, state: "active", members_count: nil, created_at: "2024-10-17 22:07:00.939061000 +0000", updated_at: "2024-10-17 22:07:00.939061000 +0000", info: nil, canceled_at: nil, activated_at: nil, renews_at: nil, renewed_at: nil>):
[ed4efd13-41bb-490e-8f09-086dc57a88ab]   
[ed4efd13-41bb-490e-8f09-086dc57a88ab] app/serializers/group_serializer.rb:73:in `subscription'
[ed4efd13-41bb-490e-8f09-086dc57a88ab] (eval):52:in `_fast_attributes'
[ed4efd13-41bb-490e-8f09-086dc57a88ab] app/controllers/api/v1/snorlax_base.rb:84:in `respond_with_collection'
[ed4efd13-41bb-490e-8f09-086dc57a88ab] app/controllers/api/v1/snorlax_base.rb:73:in `respond_with_resource'
[ed4efd13-41bb-490e-8f09-086dc57a88ab] app/controllers/api/v1/snorlax_base.rb:243:in `create_response'
[ed4efd13-41bb-490e-8f09-086dc57a88ab] app/controllers/api/v1/snorlax_base.rb:22:in `create'
[ed4efd13-41bb-490e-8f09-086dc57a88ab] app/helpers/locales_helper.rb:8:in `use_preferred_locale'
I, [2024-10-17T22:07:01.117038 #14]  INFO -- : source=rack-timeout id=ed4efd13-41bb-490e-8f09-086dc57a88ab timeout=15000ms service=212ms state=completed
robguthrie commented 23 hours ago

looks like you need to run migrations and restart the server. ./scripts/update.sh should do it