rmosolgo / graphql-ruby

Ruby implementation of GraphQL
http://graphql-ruby.org
MIT License
5.38k stars 1.39k forks source link

Graphql - Multiple definitions for with orphan types #3230

Closed alecslupu closed 3 years ago

alecslupu commented 3 years ago

Describe the bug I am trying to migrate the graphql schema of an opensource project to the Class API, however, after i have migrated all the classes to the new structure, i have started to have error like "Multiple definitions for TranslatedField. Previously found Decidim::Core::TranslatedFieldType (Class), then found Decidim::Core::TranslatedFieldType (Class) at ParticipatoryProcess.subtitle", which i have managed to track down to the orphan_types definition

Versions

graphql version: 1.11.6 rails (or other framework): 5.2.4.4 graphiql-rails (1.4.11) graphlient (0.4.0) graphql-client (0.16.0)

GraphQL schema

Include relevant types and fields (in Ruby is best, in GraphQL IDL is ok). Are you using interpreter? Any custom instrumentation, etc?

module Decidim
  module ParticipatoryProcesses
    # This type represents a ParticipatoryProcess.
    class ParticipatoryProcessType < Decidim::Api::Types::BaseObject
      implements Decidim::Core::ParticipatorySpaceInterface
      implements Decidim::Core::ParticipatorySpaceResourceableInterface
      implements Decidim::Core::ScopableInterface
      implements Decidim::Core::AttachableInterface
      description "A participatory process"

      field :id, ID, "The internal ID for this participatory process", null: false
      field :slug, String, null: false
      field :hashtag, String, "The hashtag for this participatory process", null: true
      field :created_at, Decidim::Core::DateTimeType, "The time this page was created", null: false
      field :updated_at, Decidim::Core::DateTimeType, "The time this page was updated", null: false
      field :published_at, Decidim::Core::DateTimeType, "The time this page was published", null: false
      field :subtitle, Decidim::Core::TranslatedFieldType, "The subtitle of this participatory process.", null: true
      field :description, Decidim::Core::TranslatedFieldType, "The description of this participatory process.", null: true
  # …
end

module Decidim
  module Core
    # This type represents a translated field in multiple languages.
    class TranslatedFieldType < Decidim::Api::Types::BaseObject
      graphql_name  "TranslatedField"
      description "A translated field"

      field :locales, [String, null: true], description: "Lists all the locales in which this translation is available", null: true

      def locales
        object.keys
      end

      field :translations, [LocalizedStringType, null: true], null: false do
        description "All the localized strings for this translation."

        argument :locales, [String], description: "A list of locales to scope the translations to.", required: false

        def resolve_field(obj, args, _ctx)
          translations = obj.stringify_keys
          translations = translations.slice(*args["locales"]) if args["locales"]

          translations.map { |locale, text| OpenStruct.new(locale: locale, text: text) }
        end
      end

      field :translation, String, description: "Returns a single translation given a locale.", null: true do
        argument :locale, String, "A locale to search for", required: true

        def resolve_field(obj, args, _ctx)
          translations = obj.stringify_keys
          translations[args["locale"]]
        end
      end
    end
  end
end

module Decidim
  module Api
    class Schema < GraphQL::Schema
      mutation(MutationType)
      query(QueryType)

      default_max_page_size 50
      max_depth 15
      max_complexity 300

      Rails.logger.info("Orphans")
      # changing trhis error, will change the error as well (it remains the same field, on different orphan)
      # [Decidim::ParticipatoryProcesses::ParticipatoryProcessType, Decidim::Assemblies::AssemblyType, Decidim::Conferences::ConferenceType, Decidim::Consultations::ConsultationType, Decidim::Initiatives::InitiativeType, Decidim::Pages::PagesType, Decidim::Meetings::MeetingsType, Decidim::Proposals::ProposalsType, Decidim::Budgets::BudgetsType, Decidim::Surveys::SurveysType, Decidim::Accountability::AccountabilityType, Decidim::Debates::DebatesType, Decidim::Sortitions::SortitionsType, Decidim::Blogs::BlogsType, Decidim::Elections::ElectionsType, Decidim::Core::UserType, Decidim::Core::UserGroupType]
      Rails.logger.info("Orphans")
      orphan_types(Api.orphan_types)

      # Opt in to the new runtime (default in future graphql-ruby versions)
      use GraphQL::Execution::Interpreter
      use GraphQL::Analysis::AST

      # Add built-in connections for pagination
      use GraphQL::Pagination::Connections
    end
  end
end

GraphQL query

Example GraphQL query and response (if query execution is involved) - The query involved is a IntrospectionQuery

Parameters: {"query"=>"query IntrospectionQuery {\n  __schema {\n    queryType {\n      name\n    }\n    mutationType {\n      name\n    }\n    subscriptionType {\n      name\n    }\n    types {\n      ...FullType\n    }\n    directives {\n      name\n      description\n      args {\n        ...InputValue\n      }\n      locations\n    }\n  }\n}\n\nfragment FullType on __Type {\n  kind\n  name\n  description\n  fields(includeDeprecated: true) {\n    name\n    description\n    args {\n      ...InputValue\n    }\n    type {\n      ...TypeRef\n    }\n    isDeprecated\n    deprecationReason\n  }\n  inputFields {\n    ...InputValue\n  }\n  interfaces {\n    ...TypeRef\n  }\n  enumValues(includeDeprecated: true) {\n    name\n    description\n    isDeprecated\n    deprecationReason\n  }\n  possibleTypes {\n    ...TypeRef\n  }\n}\n\nfragment InputValue on __InputValue {\n  name\n  description\n  type {\n    ...TypeRef\n  }\n  defaultValue\n}\n\nfragment TypeRef on __Type {\n  kind\n  name\n  ofType {\n    kind\n    name\n    ofType {\n      kind\n      name\n      ofType {\n        kind\n        name\n      }\n    }\n  }\n}\n\n"}

Steps to reproduce Try to define 3 objects. object 1 place it as field in query, object 2 place it as orphan. Object 3 place it as field of those 2 previous objects. I am using Namespaces, so maybe a namespace issue is involved.

Expected behavior

I would have expected the query not to raise any errors, as the previous version api did not raised an error.

Actual behavior

The Grapohql is trying to redefine the type.

Place full backtrace here (if a Ruby exception is involved):

Click to view exception backtrace ``` backend-app | Multiple definitions for `TranslatedField`. Previously found Decidim::Core::TranslatedFieldType (Class), then found Decidim::Core::TranslatedFieldType (Class) at ParticipatoryProcess.subtitle backend-app | /bundle_cache/ruby/2.7.0/gems/graphql-1.11.6/lib/graphql/schema.rb:1874:in `add_type' backend-app | /bundle_cache/ruby/2.7.0/gems/graphql-1.11.6/lib/graphql/schema.rb:1896:in `block in add_type' backend-app | /bundle_cache/ruby/2.7.0/gems/graphql-1.11.6/lib/graphql/schema.rb:1892:in `each' backend-app | /bundle_cache/ruby/2.7.0/gems/graphql-1.11.6/lib/graphql/schema.rb:1892:in `add_type' backend-app | /bundle_cache/ruby/2.7.0/gems/graphql-1.11.6/lib/graphql/schema.rb:1765:in `block in add_type_and_traverse' backend-app | /bundle_cache/ruby/2.7.0/gems/graphql-1.11.6/lib/graphql/schema.rb:1765:in `each' backend-app | /bundle_cache/ruby/2.7.0/gems/graphql-1.11.6/lib/graphql/schema.rb:1765:in `add_type_and_traverse' backend-app | /bundle_cache/ruby/2.7.0/gems/graphql-1.11.6/lib/graphql/schema.rb:1375:in `orphan_types' backend-app | /code/decidim/decidim-api/app/types/decidim/api/schema.rb:16:in `' backend-app | /code/decidim/decidim-api/app/types/decidim/api/schema.rb:5:in `' backend-app | /code/decidim/decidim-api/app/types/decidim/api/schema.rb:4:in `' backend-app | /code/decidim/decidim-api/app/types/decidim/api/schema.rb:3:in `
' backend-app | /bundle_cache/ruby/2.7.0/gems/bootsnap-1.4.7/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:55:in `load' backend-app | /bundle_cache/ruby/2.7.0/gems/bootsnap-1.4.7/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:55:in `load' backend-app | /bundle_cache/ruby/2.7.0/gems/activesupport-5.2.4.4/lib/active_support/dependencies.rb:476:in `block in load_file' backend-app | /bundle_cache/ruby/2.7.0/gems/activesupport-5.2.4.4/lib/active_support/dependencies.rb:661:in `new_constants_in' backend-app | /bundle_cache/ruby/2.7.0/gems/activesupport-5.2.4.4/lib/active_support/dependencies.rb:475:in `load_file' backend-app | /bundle_cache/ruby/2.7.0/gems/activesupport-5.2.4.4/lib/active_support/dependencies.rb:373:in `block in require_or_load' backend-app | /bundle_cache/ruby/2.7.0/gems/activesupport-5.2.4.4/lib/active_support/dependencies.rb:37:in `block in load_interlock' backend-app | /bundle_cache/ruby/2.7.0/gems/activesupport-5.2.4.4/lib/active_support/dependencies/interlock.rb:14:in `block in loading' backend-app | /bundle_cache/ruby/2.7.0/gems/activesupport-5.2.4.4/lib/active_support/concurrency/share_lock.rb:151:in `exclusive' backend-app | /bundle_cache/ruby/2.7.0/gems/activesupport-5.2.4.4/lib/active_support/dependencies/interlock.rb:13:in `loading' backend-app | /bundle_cache/ruby/2.7.0/gems/activesupport-5.2.4.4/lib/active_support/dependencies.rb:37:in `load_interlock' backend-app | /bundle_cache/ruby/2.7.0/gems/activesupport-5.2.4.4/lib/active_support/dependencies.rb:356:in `require_or_load' backend-app | /bundle_cache/ruby/2.7.0/gems/bootsnap-1.4.7/lib/bootsnap/load_path_cache/core_ext/active_support.rb:49:in `block in require_or_load' backend-app | /bundle_cache/ruby/2.7.0/gems/bootsnap-1.4.7/lib/bootsnap/load_path_cache/core_ext/active_support.rb:17:in `allow_bootsnap_retry' backend-app | /bundle_cache/ruby/2.7.0/gems/bootsnap-1.4.7/lib/bootsnap/load_path_cache/core_ext/active_support.rb:48:in `require_or_load' backend-app | /bundle_cache/ruby/2.7.0/gems/activesupport-5.2.4.4/lib/active_support/dependencies.rb:510:in `load_missing_constant' backend-app | /bundle_cache/ruby/2.7.0/gems/bootsnap-1.4.7/lib/bootsnap/load_path_cache/core_ext/active_support.rb:61:in `block in load_missing_constant' backend-app | /bundle_cache/ruby/2.7.0/gems/bootsnap-1.4.7/lib/bootsnap/load_path_cache/core_ext/active_support.rb:17:in `allow_bootsnap_retry' backend-app | /bundle_cache/ruby/2.7.0/gems/bootsnap-1.4.7/lib/bootsnap/load_path_cache/core_ext/active_support.rb:60:in `load_missing_constant' backend-app | /bundle_cache/ruby/2.7.0/gems/activesupport-5.2.4.4/lib/active_support/dependencies.rb:195:in `const_missing' backend-app | /bundle_cache/ruby/2.7.0/gems/activesupport-5.2.4.4/lib/active_support/dependencies.rb:542:in `load_missing_constant' backend-app | /bundle_cache/ruby/2.7.0/gems/bootsnap-1.4.7/lib/bootsnap/load_path_cache/core_ext/active_support.rb:61:in `block in load_missing_constant' backend-app | /bundle_cache/ruby/2.7.0/gems/bootsnap-1.4.7/lib/bootsnap/load_path_cache/core_ext/active_support.rb:17:in `allow_bootsnap_retry' backend-app | /bundle_cache/ruby/2.7.0/gems/bootsnap-1.4.7/lib/bootsnap/load_path_cache/core_ext/active_support.rb:60:in `load_missing_constant' backend-app | /bundle_cache/ruby/2.7.0/gems/activesupport-5.2.4.4/lib/active_support/dependencies.rb:195:in `const_missing' backend-app | /code/decidim/decidim-api/app/controllers/decidim/api/queries_controller.rb:17:in `create' backend-app | /bundle_cache/ruby/2.7.0/gems/actionpack-5.2.4.4/lib/action_controller/metal/basic_implicit_render.rb:6:in `send_action' backend-app | /bundle_cache/ruby/2.7.0/gems/actionpack-5.2.4.4/lib/abstract_controller/base.rb:194:in `process_action' backend-app | /bundle_cache/ruby/2.7.0/gems/actionpack-5.2.4.4/lib/action_controller/metal/rendering.rb:30:in `process_action' backend-app | /bundle_cache/ruby/2.7.0/gems/actionpack-5.2.4.4/lib/abstract_controller/callbacks.rb:42:in `block in process_action' backend-app | /bundle_cache/ruby/2.7.0/gems/activesupport-5.2.4.4/lib/active_support/callbacks.rb:109:in `block in run_callbacks' backend-app | /bundle_cache/ruby/2.7.0/gems/activesupport-5.2.4.4/lib/active_support/core_ext/time/zones.rb:66:in `use_zone' backend-app | /code/decidim/decidim-core/app/controllers/concerns/decidim/use_organization_time_zone.rb:21:in `use_organization_time_zone' backend-app | /bundle_cache/ruby/2.7.0/gems/activesupport-5.2.4.4/lib/active_support/callbacks.rb:118:in `block in run_callbacks' backend-app | /bundle_cache/ruby/2.7.0/gems/sentry-raven-3.1.1/lib/raven/integrations/rails/controller_transaction.rb:7:in `block in included' backend-app | /bundle_cache/ruby/2.7.0/gems/activesupport-5.2.4.4/lib/active_support/callbacks.rb:118:in `instance_exec' backend-app | /bundle_cache/ruby/2.7.0/gems/activesupport-5.2.4.4/lib/active_support/callbacks.rb:118:in `block in run_callbacks' backend-app | /bundle_cache/ruby/2.7.0/gems/activesupport-5.2.4.4/lib/active_support/callbacks.rb:136:in `run_callbacks' backend-app | /bundle_cache/ruby/2.7.0/gems/actionpack-5.2.4.4/lib/abstract_controller/callbacks.rb:41:in `process_action' backend-app | /bundle_cache/ruby/2.7.0/gems/actionpack-5.2.4.4/lib/action_controller/metal/rescue.rb:22:in `process_action' backend-app | /bundle_cache/ruby/2.7.0/gems/actionpack-5.2.4.4/lib/action_controller/metal/instrumentation.rb:34:in `block in process_action' backend-app | /bundle_cache/ruby/2.7.0/gems/activesupport-5.2.4.4/lib/active_support/notifications.rb:168:in `block in instrument' backend-app | /bundle_cache/ruby/2.7.0/gems/activesupport-5.2.4.4/lib/active_support/notifications/instrumenter.rb:23:in `instrument' backend-app | /bundle_cache/ruby/2.7.0/gems/activesupport-5.2.4.4/lib/active_support/notifications.rb:168:in `instrument' backend-app | /bundle_cache/ruby/2.7.0/gems/actionpack-5.2.4.4/lib/action_controller/metal/instrumentation.rb:32:in `process_action' backend-app | /bundle_cache/ruby/2.7.0/gems/actionpack-5.2.4.4/lib/action_controller/metal/params_wrapper.rb:256:in `process_action' backend-app | /bundle_cache/ruby/2.7.0/gems/activerecord-5.2.4.4/lib/active_record/railties/controller_runtime.rb:24:in `process_action' backend-app | /bundle_cache/ruby/2.7.0/gems/actionpack-5.2.4.4/lib/abstract_controller/base.rb:134:in `process' backend-app | /bundle_cache/ruby/2.7.0/gems/actionview-5.2.4.4/lib/action_view/rendering.rb:32:in `process' backend-app | /bundle_cache/ruby/2.7.0/gems/actionpack-5.2.4.4/lib/action_controller/metal.rb:191:in `dispatch' backend-app | /bundle_cache/ruby/2.7.0/gems/actionpack-5.2.4.4/lib/action_controller/metal.rb:252:in `dispatch' backend-app | /bundle_cache/ruby/2.7.0/gems/actionpack-5.2.4.4/lib/action_dispatch/routing/route_set.rb:52:in `dispatch' backend-app | /bundle_cache/ruby/2.7.0/gems/actionpack-5.2.4.4/lib/action_dispatch/routing/route_set.rb:34:in `serve' backend-app | /bundle_cache/ruby/2.7.0/gems/actionpack-5.2.4.4/lib/action_dispatch/journey/router.rb:52:in `block in serve' backend-app | /bundle_cache/ruby/2.7.0/gems/actionpack-5.2.4.4/lib/action_dispatch/journey/router.rb:35:in `each' backend-app | /bundle_cache/ruby/2.7.0/gems/actionpack-5.2.4.4/lib/action_dispatch/journey/router.rb:35:in `serve' backend-app | /bundle_cache/ruby/2.7.0/gems/actionpack-5.2.4.4/lib/action_dispatch/routing/route_set.rb:840:in `call' backend-app | /bundle_cache/ruby/2.7.0/gems/railties-5.2.4.4/lib/rails/engine.rb:524:in `call' backend-app | /bundle_cache/ruby/2.7.0/gems/railties-5.2.4.4/lib/rails/railtie.rb:190:in `public_send' backend-app | /bundle_cache/ruby/2.7.0/gems/railties-5.2.4.4/lib/rails/railtie.rb:190:in `method_missing' backend-app | /bundle_cache/ruby/2.7.0/gems/actionpack-5.2.4.4/lib/action_dispatch/routing/mapper.rb:19:in `block in ' backend-app | /bundle_cache/ruby/2.7.0/gems/actionpack-5.2.4.4/lib/action_dispatch/routing/mapper.rb:48:in `serve' backend-app | /bundle_cache/ruby/2.7.0/gems/actionpack-5.2.4.4/lib/action_dispatch/journey/router.rb:52:in `block in serve' backend-app | /bundle_cache/ruby/2.7.0/gems/actionpack-5.2.4.4/lib/action_dispatch/journey/router.rb:35:in `each' backend-app | /bundle_cache/ruby/2.7.0/gems/actionpack-5.2.4.4/lib/action_dispatch/journey/router.rb:35:in `serve' backend-app | /bundle_cache/ruby/2.7.0/gems/actionpack-5.2.4.4/lib/action_dispatch/routing/route_set.rb:840:in `call' backend-app | /bundle_cache/ruby/2.7.0/gems/railties-5.2.4.4/lib/rails/engine.rb:524:in `call' backend-app | /bundle_cache/ruby/2.7.0/gems/railties-5.2.4.4/lib/rails/railtie.rb:190:in `public_send' backend-app | /bundle_cache/ruby/2.7.0/gems/railties-5.2.4.4/lib/rails/railtie.rb:190:in `method_missing' backend-app | /bundle_cache/ruby/2.7.0/gems/actionpack-5.2.4.4/lib/action_dispatch/routing/mapper.rb:19:in `block in ' backend-app | /bundle_cache/ruby/2.7.0/gems/actionpack-5.2.4.4/lib/action_dispatch/routing/mapper.rb:48:in `serve' backend-app | /bundle_cache/ruby/2.7.0/gems/actionpack-5.2.4.4/lib/action_dispatch/journey/router.rb:52:in `block in serve' backend-app | /bundle_cache/ruby/2.7.0/gems/actionpack-5.2.4.4/lib/action_dispatch/journey/router.rb:35:in `each' backend-app | /bundle_cache/ruby/2.7.0/gems/actionpack-5.2.4.4/lib/action_dispatch/journey/router.rb:35:in `serve' backend-app | /bundle_cache/ruby/2.7.0/gems/actionpack-5.2.4.4/lib/action_dispatch/routing/route_set.rb:840:in `call' backend-app | /bundle_cache/ruby/2.7.0/gems/newrelic_rpm-6.13.0/lib/new_relic/agent/instrumentation/middleware_tracing.rb:101:in `call' backend-app | /bundle_cache/ruby/2.7.0/gems/batch-loader-1.5.0/lib/batch_loader/middleware.rb:11:in `call' backend-app | /bundle_cache/ruby/2.7.0/gems/newrelic_rpm-6.13.0/lib/new_relic/agent/instrumentation/middleware_tracing.rb:101:in `call' backend-app | /bundle_cache/ruby/2.7.0/gems/omniauth-1.9.1/lib/omniauth/strategy.rb:192:in `call!' backend-app | /bundle_cache/ruby/2.7.0/gems/omniauth-1.9.1/lib/omniauth/strategy.rb:169:in `call' backend-app | /bundle_cache/ruby/2.7.0/gems/newrelic_rpm-6.13.0/lib/new_relic/agent/instrumentation/middleware_tracing.rb:101:in `call' backend-app | /bundle_cache/ruby/2.7.0/gems/omniauth-1.9.1/lib/omniauth/builder.rb:45:in `call' backend-app | /bundle_cache/ruby/2.7.0/gems/newrelic_rpm-6.13.0/lib/new_relic/agent/instrumentation/middleware_tracing.rb:101:in `call' backend-app | /bundle_cache/ruby/2.7.0/gems/omniauth-1.9.1/lib/omniauth/strategy.rb:192:in `call!' backend-app | /bundle_cache/ruby/2.7.0/gems/omniauth-1.9.1/lib/omniauth/strategy.rb:169:in `call' backend-app | /bundle_cache/ruby/2.7.0/gems/newrelic_rpm-6.13.0/lib/new_relic/agent/instrumentation/middleware_tracing.rb:101:in `call' backend-app | /bundle_cache/ruby/2.7.0/gems/omniauth-1.9.1/lib/omniauth/builder.rb:45:in `call' backend-app | /bundle_cache/ruby/2.7.0/gems/newrelic_rpm-6.13.0/lib/new_relic/agent/instrumentation/middleware_tracing.rb:101:in `call' backend-app | /bundle_cache/ruby/2.7.0/gems/newrelic_rpm-6.13.0/lib/new_relic/rack/agent_hooks.rb:30:in `traced_call' backend-app | /bundle_cache/ruby/2.7.0/gems/newrelic_rpm-6.13.0/lib/new_relic/agent/instrumentation/middleware_tracing.rb:101:in `call' backend-app | /bundle_cache/ruby/2.7.0/gems/newrelic_rpm-6.13.0/lib/new_relic/rack/browser_monitoring.rb:33:in `traced_call' backend-app | /bundle_cache/ruby/2.7.0/gems/newrelic_rpm-6.13.0/lib/new_relic/agent/instrumentation/middleware_tracing.rb:101:in `call' backend-app | /bundle_cache/ruby/2.7.0/gems/warden-1.2.9/lib/warden/manager.rb:36:in `block in call' backend-app | /bundle_cache/ruby/2.7.0/gems/warden-1.2.9/lib/warden/manager.rb:34:in `catch' backend-app | /bundle_cache/ruby/2.7.0/gems/warden-1.2.9/lib/warden/manager.rb:34:in `call' backend-app | /bundle_cache/ruby/2.7.0/gems/newrelic_rpm-6.13.0/lib/new_relic/agent/instrumentation/middleware_tracing.rb:101:in `call' backend-app | /code/decidim/decidim-core/app/middleware/decidim/strip_x_forwarded_host.rb:11:in `call' backend-app | /bundle_cache/ruby/2.7.0/gems/newrelic_rpm-6.13.0/lib/new_relic/agent/instrumentation/middleware_tracing.rb:101:in `call' backend-app | /code/decidim/decidim-core/app/middleware/decidim/current_organization.rb:21:in `call' backend-app | /bundle_cache/ruby/2.7.0/gems/newrelic_rpm-6.13.0/lib/new_relic/agent/instrumentation/middleware_tracing.rb:101:in `call' backend-app | /bundle_cache/ruby/2.7.0/gems/rack-2.2.3/lib/rack/tempfile_reaper.rb:15:in `call' backend-app | /bundle_cache/ruby/2.7.0/gems/newrelic_rpm-6.13.0/lib/new_relic/agent/instrumentation/middleware_tracing.rb:101:in `call' backend-app | /bundle_cache/ruby/2.7.0/gems/rack-2.2.3/lib/rack/etag.rb:27:in `call' backend-app | /bundle_cache/ruby/2.7.0/gems/newrelic_rpm-6.13.0/lib/new_relic/agent/instrumentation/middleware_tracing.rb:101:in `call' backend-app | /bundle_cache/ruby/2.7.0/gems/rack-2.2.3/lib/rack/conditional_get.rb:40:in `call' backend-app | /bundle_cache/ruby/2.7.0/gems/newrelic_rpm-6.13.0/lib/new_relic/agent/instrumentation/middleware_tracing.rb:101:in `call' backend-app | /bundle_cache/ruby/2.7.0/gems/rack-2.2.3/lib/rack/head.rb:12:in `call' backend-app | /bundle_cache/ruby/2.7.0/gems/newrelic_rpm-6.13.0/lib/new_relic/agent/instrumentation/middleware_tracing.rb:101:in `call' backend-app | /bundle_cache/ruby/2.7.0/gems/actionpack-5.2.4.4/lib/action_dispatch/http/content_security_policy.rb:18:in `call' backend-app | /bundle_cache/ruby/2.7.0/gems/newrelic_rpm-6.13.0/lib/new_relic/agent/instrumentation/middleware_tracing.rb:101:in `call' backend-app | /bundle_cache/ruby/2.7.0/gems/rack-2.2.3/lib/rack/session/abstract/id.rb:266:in `context' backend-app | /bundle_cache/ruby/2.7.0/gems/rack-2.2.3/lib/rack/session/abstract/id.rb:260:in `call' backend-app | /bundle_cache/ruby/2.7.0/gems/newrelic_rpm-6.13.0/lib/new_relic/agent/instrumentation/middleware_tracing.rb:101:in `call' backend-app | /bundle_cache/ruby/2.7.0/gems/actionpack-5.2.4.4/lib/action_dispatch/middleware/cookies.rb:670:in `call' backend-app | /bundle_cache/ruby/2.7.0/gems/newrelic_rpm-6.13.0/lib/new_relic/agent/instrumentation/middleware_tracing.rb:101:in `call' backend-app | /bundle_cache/ruby/2.7.0/gems/activerecord-5.2.4.4/lib/active_record/migration.rb:559:in `call' backend-app | /bundle_cache/ruby/2.7.0/gems/newrelic_rpm-6.13.0/lib/new_relic/agent/instrumentation/middleware_tracing.rb:101:in `call' backend-app | /bundle_cache/ruby/2.7.0/gems/actionpack-5.2.4.4/lib/action_dispatch/middleware/callbacks.rb:28:in `block in call' backend-app | /bundle_cache/ruby/2.7.0/gems/activesupport-5.2.4.4/lib/active_support/callbacks.rb:98:in `run_callbacks' backend-app | /bundle_cache/ruby/2.7.0/gems/actionpack-5.2.4.4/lib/action_dispatch/middleware/callbacks.rb:26:in `call' backend-app | /bundle_cache/ruby/2.7.0/gems/newrelic_rpm-6.13.0/lib/new_relic/agent/instrumentation/middleware_tracing.rb:101:in `call' backend-app | /bundle_cache/ruby/2.7.0/gems/actionpack-5.2.4.4/lib/action_dispatch/middleware/executor.rb:14:in `call' backend-app | /bundle_cache/ruby/2.7.0/gems/newrelic_rpm-6.13.0/lib/new_relic/agent/instrumentation/middleware_tracing.rb:101:in `call' backend-app | /bundle_cache/ruby/2.7.0/gems/actionpack-5.2.4.4/lib/action_dispatch/middleware/debug_exceptions.rb:61:in `call' backend-app | /bundle_cache/ruby/2.7.0/gems/newrelic_rpm-6.13.0/lib/new_relic/agent/instrumentation/middleware_tracing.rb:101:in `call' backend-app | /bundle_cache/ruby/2.7.0/gems/web-console-3.7.0/lib/web_console/middleware.rb:135:in `call_app' backend-app | /bundle_cache/ruby/2.7.0/gems/web-console-3.7.0/lib/web_console/middleware.rb:30:in `block in call' backend-app | /bundle_cache/ruby/2.7.0/gems/web-console-3.7.0/lib/web_console/middleware.rb:20:in `catch' backend-app | /bundle_cache/ruby/2.7.0/gems/web-console-3.7.0/lib/web_console/middleware.rb:20:in `call' backend-app | /bundle_cache/ruby/2.7.0/gems/newrelic_rpm-6.13.0/lib/new_relic/agent/instrumentation/middleware_tracing.rb:101:in `call' backend-app | /bundle_cache/ruby/2.7.0/gems/actionpack-5.2.4.4/lib/action_dispatch/middleware/show_exceptions.rb:33:in `call' backend-app | /bundle_cache/ruby/2.7.0/gems/newrelic_rpm-6.13.0/lib/new_relic/agent/instrumentation/middleware_tracing.rb:101:in `call' backend-app | /bundle_cache/ruby/2.7.0/gems/railties-5.2.4.4/lib/rails/rack/logger.rb:38:in `call_app' backend-app | /bundle_cache/ruby/2.7.0/gems/railties-5.2.4.4/lib/rails/rack/logger.rb:26:in `block in call' backend-app | /bundle_cache/ruby/2.7.0/gems/activesupport-5.2.4.4/lib/active_support/tagged_logging.rb:71:in `block in tagged' backend-app | /bundle_cache/ruby/2.7.0/gems/activesupport-5.2.4.4/lib/active_support/tagged_logging.rb:28:in `tagged' backend-app | /bundle_cache/ruby/2.7.0/gems/activesupport-5.2.4.4/lib/active_support/tagged_logging.rb:71:in `tagged' backend-app | /bundle_cache/ruby/2.7.0/gems/railties-5.2.4.4/lib/rails/rack/logger.rb:26:in `call' backend-app | /bundle_cache/ruby/2.7.0/gems/newrelic_rpm-6.13.0/lib/new_relic/agent/instrumentation/middleware_tracing.rb:101:in `call' backend-app | /bundle_cache/ruby/2.7.0/gems/sprockets-rails-3.2.2/lib/sprockets/rails/quiet_assets.rb:13:in `call' backend-app | /bundle_cache/ruby/2.7.0/gems/newrelic_rpm-6.13.0/lib/new_relic/agent/instrumentation/middleware_tracing.rb:101:in `call' backend-app | /bundle_cache/ruby/2.7.0/gems/actionpack-5.2.4.4/lib/action_dispatch/middleware/remote_ip.rb:81:in `call' backend-app | /bundle_cache/ruby/2.7.0/gems/newrelic_rpm-6.13.0/lib/new_relic/agent/instrumentation/middleware_tracing.rb:101:in `call' backend-app | /bundle_cache/ruby/2.7.0/gems/request_store-1.5.0/lib/request_store/middleware.rb:19:in `call' backend-app | /bundle_cache/ruby/2.7.0/gems/newrelic_rpm-6.13.0/lib/new_relic/agent/instrumentation/middleware_tracing.rb:101:in `call' backend-app | /bundle_cache/ruby/2.7.0/gems/actionpack-5.2.4.4/lib/action_dispatch/middleware/request_id.rb:27:in `call' backend-app | /bundle_cache/ruby/2.7.0/gems/newrelic_rpm-6.13.0/lib/new_relic/agent/instrumentation/middleware_tracing.rb:101:in `call' backend-app | /bundle_cache/ruby/2.7.0/gems/rack-2.2.3/lib/rack/method_override.rb:24:in `call' backend-app | /bundle_cache/ruby/2.7.0/gems/newrelic_rpm-6.13.0/lib/new_relic/agent/instrumentation/middleware_tracing.rb:101:in `call' backend-app | /bundle_cache/ruby/2.7.0/gems/actionpack-5.2.4.4/lib/action_dispatch/middleware/executor.rb:14:in `call' backend-app | /bundle_cache/ruby/2.7.0/gems/newrelic_rpm-6.13.0/lib/new_relic/agent/instrumentation/middleware_tracing.rb:101:in `call' backend-app | /bundle_cache/ruby/2.7.0/gems/actionpack-5.2.4.4/lib/action_dispatch/middleware/static.rb:127:in `call' backend-app | /bundle_cache/ruby/2.7.0/gems/newrelic_rpm-6.13.0/lib/new_relic/agent/instrumentation/middleware_tracing.rb:101:in `call' backend-app | /bundle_cache/ruby/2.7.0/gems/rack-2.2.3/lib/rack/sendfile.rb:110:in `call' backend-app | /bundle_cache/ruby/2.7.0/gems/newrelic_rpm-6.13.0/lib/new_relic/agent/instrumentation/middleware_tracing.rb:101:in `call' backend-app | /bundle_cache/ruby/2.7.0/gems/sentry-raven-3.1.1/lib/raven/integrations/rack.rb:51:in `call' backend-app | /bundle_cache/ruby/2.7.0/gems/newrelic_rpm-6.13.0/lib/new_relic/agent/instrumentation/middleware_tracing.rb:101:in `call' backend-app | /bundle_cache/ruby/2.7.0/gems/secure_headers-6.3.1/lib/secure_headers/middleware.rb:11:in `call' backend-app | /bundle_cache/ruby/2.7.0/gems/newrelic_rpm-6.13.0/lib/new_relic/agent/instrumentation/middleware_tracing.rb:101:in `call' backend-app | /bundle_cache/ruby/2.7.0/gems/rack-cors-1.1.1/lib/rack/cors.rb:100:in `call' backend-app | /bundle_cache/ruby/2.7.0/gems/newrelic_rpm-6.13.0/lib/new_relic/agent/instrumentation/middleware_tracing.rb:101:in `call' backend-app | /bundle_cache/ruby/2.7.0/gems/railties-5.2.4.4/lib/rails/engine.rb:524:in `call' backend-app | /bundle_cache/ruby/2.7.0/gems/newrelic_rpm-6.13.0/lib/new_relic/agent/instrumentation/middleware_tracing.rb:101:in `call' backend-app | /bundle_cache/ruby/2.7.0/gems/puma-4.3.6/lib/puma/configuration.rb:228:in `call' backend-app | /bundle_cache/ruby/2.7.0/gems/puma-4.3.6/lib/puma/server.rb:713:in `handle_request' backend-app | /bundle_cache/ruby/2.7.0/gems/puma-4.3.6/lib/puma/server.rb:472:in `process_client' backend-app | /bundle_cache/ruby/2.7.0/gems/puma-4.3.6/lib/puma/server.rb:328:in `block in run' backend-app | /bundle_cache/ruby/2.7.0/gems/puma-4.3.6/lib/puma/thread_pool.rb:134:in `block in spawn_thread' backend-app | Completed 500 Internal Server Error in 68ms (Views: 2.3ms | ActiveRecord: 0.0ms) backend-app | ```

Additional context The project and the bug is open source, and the entire repository can be downloaded from : https://github.com/tremend-cofe/decidim . The Pull request highlighting the changes is: https://github.com/tremend-cofe/decidim/pull/55/files

I already tried to change the namespace to something like Decidim::*::Types, but i have not seen any changes regarding this bug state.

I have also dug up in the code, and patched the schema.rb to dump some informantion:

backend-app        | ++++++++++++++++++++++++++++++
backend-app        | prev_type => [Decidim::Core::TranslatedFieldType, Decidim::Api::Types::BaseObject, GraphQL::Schema::Object, GraphQL::Schema::Member, GraphQL::Schema::Member::GraphQLTypeNames, ActiveSupport::ToJsonWithActiveSupportEncoder, Object, PP::ObjectMixin, Nori::CoreExt::Object, JSON::Ext::Generator::GeneratorMethods::Object, ActiveSupport::Tryable, ActiveSupport::Dependencies::Loadable, Kernel, BasicObject]
backend-app        | prev_type(object_id) =>  136720
backend-app        |  type => [Decidim::Core::TranslatedFieldType, Decidim::Api::Types::BaseObject, GraphQL::Schema::Object, GraphQL::Schema::Member, GraphQL::Schema::Member::GraphQLTypeNames, ActiveSupport::ToJsonWithActiveSupportEncoder, Object, PP::ObjectMixin, Nori::CoreExt::Object, JSON::Ext::Generator::GeneratorMethods::Object, ActiveSupport::Tryable, ActiveSupport::Dependencies::Loadable, Kernel, BasicObject]
backend-app        | type(object_id) =>  136740
backend-app        | ++++++++++++++++++++++++++++++
rmosolgo commented 3 years ago

Hey, thanks for the detailed writeup and sorry to hear about the trouble.

That bit of debugging you shared is really helpful. It looks like there are two classes with the same ancestors, but different .object_ids, right?

Everything in the code you shared looked good to me, so I started looking into the Api.orphan_types method. One hint I found was this:

https://github.com/decidim/decidim/blob/1d4da6bd89eb27aa5fff89d9ee6dcd97f6031fed/decidim-api/lib/decidim/api.rb#L19-L22

See how Api.add_orphan_types stores @orphan_types? I wonder if there's a problem with how Rails is reloading that. Do you encounter this error when running tests, or only when running the development server? (If this error happens in the development server, but not the test suite, then it's likely an autoloading issue.)

Another way you could debug is to add some code to Decidim::Core::TranslatedFieldType:

p [self, self.object_id]
puts caller 

That would tell us a few things:

Could you share the output of that when you replicate the issue?

alecslupu commented 3 years ago

Hello !

The issue is caused in the development environment. while i am trying to visit the "/api" endpoint to see how is the schema updated.

That bit of debugging you shared is really helpful. It looks like there are two classes with the same ancestors, but different .object_ids, right? I have checked the code before sending the issue request, and there is only one class defined with the name TranslatedFieldType and only one definition of a graphql graphql name TranslatedField (I have even changed the name to test it )

See how Api.add_orphan_types stores @orphan_types? Yes, swicthing to class variable, doesn't changes the behaviour

Do you encounter this error when running tests, or only when running the development server? The issue is caused in the development environment.

I have patched the TranslatedFieldType class, and now is looking like:


module Decidim
  module Core
    # This type represents a translated field in multiple languages.
    class TranslatedFieldType < Decidim::Api::Types::BaseObject

      Rails.logger.info [self, self.object_id]
      Rails.logger.info caller.join("\n")
      Rails.logger.info "\n"*20

      graphql_name  "TranslatedField"
    # ....

Is the file being loaded by ruby/rails more than once? (Do we get that output twice, or only once? Same object_id or different?) I have also patched the Graphql Schema.rb (line 1874) file and added


if (prev_type = own_types[type.graphql_name])
if prev_type != type
Rails.logger.info "========================"
Rails.logger.info prev_type.object_id
Rails.logger.info type.object_id
Rails.logger.info "========================"
raise DuplicateTypeNamesError.new(
type_name: type.graphql_name,
first_definition: prev_type,
second_definition: type,
path: path,
)
else
The output is :

backend-app | ======================== backend-app | 108600 backend-app | 136440 backend-app | ========================

Notice that the previous_type object_id is greater than the type id, therefore, i suspect there is a visibility issue within Graphql. I could not find the place where is this happening.

The backtrace is, so the class is defined only once: 

backend-app | [Decidim::Core::TranslatedFieldType, 136420] backend-app | /code/decidim/decidim-core/app/types/decidim/core/translated_field_type.rb:6:in <module:Core>' backend-app | /code/decidim/decidim-core/app/types/decidim/core/translated_field_type.rb:4:in' backend-app | /code/decidim/decidim-core/app/types/decidim/core/translated_field_type.rb:3:in <main>' backend-app | /bundle_cache/ruby/2.7.0/gems/bootsnap-1.4.7/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:55:inload' backend-app | /bundle_cache/ruby/2.7.0/gems/bootsnap-1.4.7/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:55:in load' backend-app | /bundle_cache/ruby/2.7.0/gems/activesupport-5.2.4.4/lib/active_support/dependencies.rb:476:inblock in load_file' backend-app | /bundle_cache/ruby/2.7.0/gems/activesupport-5.2.4.4/lib/active_support/dependencies.rb:661:in new_constants_in' backend-app | /bundle_cache/ruby/2.7.0/gems/activesupport-5.2.4.4/lib/active_support/dependencies.rb:475:inload_file' backend-app | /bundle_cache/ruby/2.7.0/gems/activesupport-5.2.4.4/lib/active_support/dependencies.rb:373:in block in require_or_load' backend-app | /bundle_cache/ruby/2.7.0/gems/activesupport-5.2.4.4/lib/active_support/dependencies.rb:37:inblock in load_interlock' backend-app | /bundle_cache/ruby/2.7.0/gems/activesupport-5.2.4.4/lib/active_support/dependencies/interlock.rb:14:in block in loading' backend-app | /bundle_cache/ruby/2.7.0/gems/activesupport-5.2.4.4/lib/active_support/concurrency/share_lock.rb:151:inexclusive' backend-app | /bundle_cache/ruby/2.7.0/gems/activesupport-5.2.4.4/lib/active_support/dependencies/interlock.rb:13:in loading' backend-app | /bundle_cache/ruby/2.7.0/gems/activesupport-5.2.4.4/lib/active_support/dependencies.rb:37:inload_interlock' backend-app | /bundle_cache/ruby/2.7.0/gems/activesupport-5.2.4.4/lib/active_support/dependencies.rb:356:in require_or_load' backend-app | /bundle_cache/ruby/2.7.0/gems/bootsnap-1.4.7/lib/bootsnap/load_path_cache/core_ext/active_support.rb:49:inblock in require_or_load' backend-app | /bundle_cache/ruby/2.7.0/gems/bootsnap-1.4.7/lib/bootsnap/load_path_cache/core_ext/active_support.rb:17:in allow_bootsnap_retry' backend-app | /bundle_cache/ruby/2.7.0/gems/bootsnap-1.4.7/lib/bootsnap/load_path_cache/core_ext/active_support.rb:48:inrequire_or_load' backend-app | /bundle_cache/ruby/2.7.0/gems/activesupport-5.2.4.4/lib/active_support/dependencies.rb:510:in load_missing_constant' backend-app | /bundle_cache/ruby/2.7.0/gems/bootsnap-1.4.7/lib/bootsnap/load_path_cache/core_ext/active_support.rb:61:inblock in load_missing_constant' backend-app | /bundle_cache/ruby/2.7.0/gems/bootsnap-1.4.7/lib/bootsnap/load_path_cache/core_ext/active_support.rb:17:in allow_bootsnap_retry' backend-app | /bundle_cache/ruby/2.7.0/gems/bootsnap-1.4.7/lib/bootsnap/load_path_cache/core_ext/active_support.rb:60:inload_missing_constant' backend-app | /bundle_cache/ruby/2.7.0/gems/activesupport-5.2.4.4/lib/active_support/dependencies.rb:195:in const_missing' backend-app | /code/decidim/decidim-participatory_processes/app/types/decidim/participatory_processes/participatory_process_type.rb:19:in' backend-app | /code/decidim/decidim-participatory_processes/app/types/decidim/participatory_processes/participatory_process_type.rb:6:in <module:ParticipatoryProcesses>' backend-app | /code/decidim/decidim-participatory_processes/app/types/decidim/participatory_processes/participatory_process_type.rb:4:in' backend-app | /code/decidim/decidim-participatory_processes/app/types/decidim/participatory_processes/participatory_process_type.rb:3:in <main>' backend-app | /bundle_cache/ruby/2.7.0/gems/bootsnap-1.4.7/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:55:inload' backend-app | /bundle_cache/ruby/2.7.0/gems/bootsnap-1.4.7/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:55:in load' backend-app | /bundle_cache/ruby/2.7.0/gems/activesupport-5.2.4.4/lib/active_support/dependencies.rb:476:inblock in load_file' backend-app | /bundle_cache/ruby/2.7.0/gems/activesupport-5.2.4.4/lib/active_support/dependencies.rb:661:in new_constants_in' backend-app | /bundle_cache/ruby/2.7.0/gems/activesupport-5.2.4.4/lib/active_support/dependencies.rb:475:inload_file' backend-app | /bundle_cache/ruby/2.7.0/gems/activesupport-5.2.4.4/lib/active_support/dependencies.rb:373:in block in require_or_load' backend-app | /bundle_cache/ruby/2.7.0/gems/activesupport-5.2.4.4/lib/active_support/dependencies.rb:37:inblock in load_interlock' backend-app | /bundle_cache/ruby/2.7.0/gems/activesupport-5.2.4.4/lib/active_support/dependencies/interlock.rb:14:in block in loading' backend-app | /bundle_cache/ruby/2.7.0/gems/activesupport-5.2.4.4/lib/active_support/concurrency/share_lock.rb:151:inexclusive' backend-app | /bundle_cache/ruby/2.7.0/gems/activesupport-5.2.4.4/lib/active_support/dependencies/interlock.rb:13:in loading' backend-app | /bundle_cache/ruby/2.7.0/gems/activesupport-5.2.4.4/lib/active_support/dependencies.rb:37:inload_interlock' backend-app | /bundle_cache/ruby/2.7.0/gems/activesupport-5.2.4.4/lib/active_support/dependencies.rb:356:in require_or_load' backend-app | /bundle_cache/ruby/2.7.0/gems/bootsnap-1.4.7/lib/bootsnap/load_path_cache/core_ext/active_support.rb:49:inblock in require_or_load' backend-app | /bundle_cache/ruby/2.7.0/gems/bootsnap-1.4.7/lib/bootsnap/load_path_cache/core_ext/active_support.rb:17:in allow_bootsnap_retry' backend-app | /bundle_cache/ruby/2.7.0/gems/bootsnap-1.4.7/lib/bootsnap/load_path_cache/core_ext/active_support.rb:48:inrequire_or_load' backend-app | /bundle_cache/ruby/2.7.0/gems/activesupport-5.2.4.4/lib/active_support/dependencies.rb:510:in load_missing_constant' backend-app | /bundle_cache/ruby/2.7.0/gems/bootsnap-1.4.7/lib/bootsnap/load_path_cache/core_ext/active_support.rb:61:inblock in load_missing_constant' backend-app | /bundle_cache/ruby/2.7.0/gems/bootsnap-1.4.7/lib/bootsnap/load_path_cache/core_ext/active_support.rb:17:in allow_bootsnap_retry' backend-app | /bundle_cache/ruby/2.7.0/gems/bootsnap-1.4.7/lib/bootsnap/load_path_cache/core_ext/active_support.rb:60:inload_missing_constant' backend-app | /bundle_cache/ruby/2.7.0/gems/activesupport-5.2.4.4/lib/active_support/dependencies.rb:195:in const_missing' backend-app | /bundle_cache/ruby/2.7.0/gems/activesupport-5.2.4.4/lib/active_support/inflector/methods.rb:285:inconst_get' backend-app | /bundle_cache/ruby/2.7.0/gems/activesupport-5.2.4.4/lib/active_support/inflector/methods.rb:285:in block in constantize' backend-app | /bundle_cache/ruby/2.7.0/gems/activesupport-5.2.4.4/lib/active_support/inflector/methods.rb:281:ineach' backend-app | /bundle_cache/ruby/2.7.0/gems/activesupport-5.2.4.4/lib/active_support/inflector/methods.rb:281:in inject' backend-app | /bundle_cache/ruby/2.7.0/gems/activesupport-5.2.4.4/lib/active_support/inflector/methods.rb:281:inconstantize' backend-app | /bundle_cache/ruby/2.7.0/gems/activesupport-5.2.4.4/lib/active_support/core_ext/string/inflections.rb:68:in constantize' backend-app | /code/decidim/decidim-api/lib/decidim/api.rb:14:inmap' backend-app | /code/decidim/decidim-api/lib/decidim/api.rb:14:in orphan_types' backend-app | /code/decidim/decidim-api/app/types/decidim/api/schema.rb:14:in' backend-app | /code/decidim/decidim-api/app/types/decidim/api/schema.rb:5:in <module:Api>' backend-app | /code/decidim/decidim-api/app/types/decidim/api/schema.rb:4:in' backend-app | /code/decidim/decidim-api/app/types/decidim/api/schema.rb:3:in <main>' backend-app | /bundle_cache/ruby/2.7.0/gems/bootsnap-1.4.7/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:55:inload' backend-app | /bundle_cache/ruby/2.7.0/gems/bootsnap-1.4.7/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:55:in load' backend-app | /bundle_cache/ruby/2.7.0/gems/activesupport-5.2.4.4/lib/active_support/dependencies.rb:476:inblock in load_file' backend-app | /bundle_cache/ruby/2.7.0/gems/activesupport-5.2.4.4/lib/active_support/dependencies.rb:661:in new_constants_in' backend-app | /bundle_cache/ruby/2.7.0/gems/activesupport-5.2.4.4/lib/active_support/dependencies.rb:475:inload_file' backend-app | /bundle_cache/ruby/2.7.0/gems/activesupport-5.2.4.4/lib/active_support/dependencies.rb:373:in block in require_or_load' backend-app | /bundle_cache/ruby/2.7.0/gems/activesupport-5.2.4.4/lib/active_support/dependencies.rb:37:inblock in load_interlock' backend-app | /bundle_cache/ruby/2.7.0/gems/activesupport-5.2.4.4/lib/active_support/dependencies/interlock.rb:14:in block in loading' backend-app | /bundle_cache/ruby/2.7.0/gems/activesupport-5.2.4.4/lib/active_support/concurrency/share_lock.rb:151:inexclusive' backend-app | /bundle_cache/ruby/2.7.0/gems/activesupport-5.2.4.4/lib/active_support/dependencies/interlock.rb:13:in loading' backend-app | /bundle_cache/ruby/2.7.0/gems/activesupport-5.2.4.4/lib/active_support/dependencies.rb:37:inload_interlock' backend-app | /bundle_cache/ruby/2.7.0/gems/activesupport-5.2.4.4/lib/active_support/dependencies.rb:356:in require_or_load' backend-app | /bundle_cache/ruby/2.7.0/gems/bootsnap-1.4.7/lib/bootsnap/load_path_cache/core_ext/active_support.rb:49:inblock in require_or_load' backend-app | /bundle_cache/ruby/2.7.0/gems/bootsnap-1.4.7/lib/bootsnap/load_path_cache/core_ext/active_support.rb:17:in allow_bootsnap_retry' backend-app | /bundle_cache/ruby/2.7.0/gems/bootsnap-1.4.7/lib/bootsnap/load_path_cache/core_ext/active_support.rb:48:inrequire_or_load' backend-app | /bundle_cache/ruby/2.7.0/gems/activesupport-5.2.4.4/lib/active_support/dependencies.rb:510:in load_missing_constant' backend-app | /bundle_cache/ruby/2.7.0/gems/bootsnap-1.4.7/lib/bootsnap/load_path_cache/core_ext/active_support.rb:61:inblock in load_missing_constant' backend-app | /bundle_cache/ruby/2.7.0/gems/bootsnap-1.4.7/lib/bootsnap/load_path_cache/core_ext/active_support.rb:17:in allow_bootsnap_retry' backend-app | /bundle_cache/ruby/2.7.0/gems/bootsnap-1.4.7/lib/bootsnap/load_path_cache/core_ext/active_support.rb:60:inload_missing_constant' backend-app | /bundle_cache/ruby/2.7.0/gems/activesupport-5.2.4.4/lib/active_support/dependencies.rb:195:in const_missing' backend-app | /bundle_cache/ruby/2.7.0/gems/activesupport-5.2.4.4/lib/active_support/dependencies.rb:542:inload_missing_constant' backend-app | /bundle_cache/ruby/2.7.0/gems/bootsnap-1.4.7/lib/bootsnap/load_path_cache/core_ext/active_support.rb:61:in block in load_missing_constant' backend-app | /bundle_cache/ruby/2.7.0/gems/bootsnap-1.4.7/lib/bootsnap/load_path_cache/core_ext/active_support.rb:17:inallow_bootsnap_retry' backend-app | /bundle_cache/ruby/2.7.0/gems/bootsnap-1.4.7/lib/bootsnap/load_path_cache/core_ext/active_support.rb:60:in load_missing_constant' backend-app | /bundle_cache/ruby/2.7.0/gems/activesupport-5.2.4.4/lib/active_support/dependencies.rb:195:inconst_missing' backend-app | /code/decidim/decidim-api/app/controllers/decidim/api/queries_controller.rb:17:in create' backend-app | /bundle_cache/ruby/2.7.0/gems/actionpack-5.2.4.4/lib/action_controller/metal/basic_implicit_render.rb:6:insend_action' backend-app | /bundle_cache/ruby/2.7.0/gems/actionpack-5.2.4.4/lib/abstract_controller/base.rb:194:in process_action' backend-app | /bundle_cache/ruby/2.7.0/gems/actionpack-5.2.4.4/lib/action_controller/metal/rendering.rb:30:inprocess_action' backend-app | /bundle_cache/ruby/2.7.0/gems/actionpack-5.2.4.4/lib/abstract_controller/callbacks.rb:42:in block in process_action' backend-app | /bundle_cache/ruby/2.7.0/gems/activesupport-5.2.4.4/lib/active_support/callbacks.rb:109:inblock in run_callbacks' backend-app | /bundle_cache/ruby/2.7.0/gems/activesupport-5.2.4.4/lib/active_support/core_ext/time/zones.rb:66:in use_zone' backend-app | /code/decidim/decidim-core/app/controllers/concerns/decidim/use_organization_time_zone.rb:21:inuse_organization_time_zone' backend-app | /bundle_cache/ruby/2.7.0/gems/activesupport-5.2.4.4/lib/active_support/callbacks.rb:118:in block in run_callbacks' backend-app | /bundle_cache/ruby/2.7.0/gems/sentry-raven-3.1.1/lib/raven/integrations/rails/controller_transaction.rb:7:inblock in included' backend-app | /bundle_cache/ruby/2.7.0/gems/activesupport-5.2.4.4/lib/active_support/callbacks.rb:118:in instance_exec' backend-app | /bundle_cache/ruby/2.7.0/gems/activesupport-5.2.4.4/lib/active_support/callbacks.rb:118:inblock in run_callbacks' backend-app | /bundle_cache/ruby/2.7.0/gems/activesupport-5.2.4.4/lib/active_support/callbacks.rb:136:in run_callbacks' backend-app | /bundle_cache/ruby/2.7.0/gems/actionpack-5.2.4.4/lib/abstract_controller/callbacks.rb:41:inprocess_action' backend-app | /bundle_cache/ruby/2.7.0/gems/actionpack-5.2.4.4/lib/action_controller/metal/rescue.rb:22:in process_action' backend-app | /bundle_cache/ruby/2.7.0/gems/actionpack-5.2.4.4/lib/action_controller/metal/instrumentation.rb:34:inblock in process_action' backend-app | /bundle_cache/ruby/2.7.0/gems/activesupport-5.2.4.4/lib/active_support/notifications.rb:168:in block in instrument' backend-app | /bundle_cache/ruby/2.7.0/gems/activesupport-5.2.4.4/lib/active_support/notifications/instrumenter.rb:23:ininstrument' backend-app | /bundle_cache/ruby/2.7.0/gems/activesupport-5.2.4.4/lib/active_support/notifications.rb:168:in instrument' backend-app | /bundle_cache/ruby/2.7.0/gems/actionpack-5.2.4.4/lib/action_controller/metal/instrumentation.rb:32:inprocess_action' backend-app | /bundle_cache/ruby/2.7.0/gems/actionpack-5.2.4.4/lib/action_controller/metal/params_wrapper.rb:256:in process_action' backend-app | /bundle_cache/ruby/2.7.0/gems/activerecord-5.2.4.4/lib/active_record/railties/controller_runtime.rb:24:inprocess_action' backend-app | /bundle_cache/ruby/2.7.0/gems/actionpack-5.2.4.4/lib/abstract_controller/base.rb:134:in process' backend-app | /bundle_cache/ruby/2.7.0/gems/actionview-5.2.4.4/lib/action_view/rendering.rb:32:inprocess' backend-app | /bundle_cache/ruby/2.7.0/gems/actionpack-5.2.4.4/lib/action_controller/metal.rb:191:in dispatch' backend-app | /bundle_cache/ruby/2.7.0/gems/actionpack-5.2.4.4/lib/action_controller/metal.rb:252:indispatch' backend-app | /bundle_cache/ruby/2.7.0/gems/actionpack-5.2.4.4/lib/action_dispatch/routing/route_set.rb:52:in dispatch' backend-app | /bundle_cache/ruby/2.7.0/gems/actionpack-5.2.4.4/lib/action_dispatch/routing/route_set.rb:34:inserve' backend-app | /bundle_cache/ruby/2.7.0/gems/actionpack-5.2.4.4/lib/action_dispatch/journey/router.rb:52:in block in serve' backend-app | /bundle_cache/ruby/2.7.0/gems/actionpack-5.2.4.4/lib/action_dispatch/journey/router.rb:35:ineach' backend-app | /bundle_cache/ruby/2.7.0/gems/actionpack-5.2.4.4/lib/action_dispatch/journey/router.rb:35:in serve' backend-app | /bundle_cache/ruby/2.7.0/gems/actionpack-5.2.4.4/lib/action_dispatch/routing/route_set.rb:840:incall' backend-app | /bundle_cache/ruby/2.7.0/gems/railties-5.2.4.4/lib/rails/engine.rb:524:in call' backend-app | /bundle_cache/ruby/2.7.0/gems/railties-5.2.4.4/lib/rails/railtie.rb:190:inpublic_send' backend-app | /bundle_cache/ruby/2.7.0/gems/railties-5.2.4.4/lib/rails/railtie.rb:190:in method_missing' backend-app | /bundle_cache/ruby/2.7.0/gems/actionpack-5.2.4.4/lib/action_dispatch/routing/mapper.rb:19:inblock in ' backend-app | /bundle_cache/ruby/2.7.0/gems/actionpack-5.2.4.4/lib/action_dispatch/routing/mapper.rb:48:in serve' backend-app | /bundle_cache/ruby/2.7.0/gems/actionpack-5.2.4.4/lib/action_dispatch/journey/router.rb:52:inblock in serve' backend-app | /bundle_cache/ruby/2.7.0/gems/actionpack-5.2.4.4/lib/action_dispatch/journey/router.rb:35:in each' backend-app | /bundle_cache/ruby/2.7.0/gems/actionpack-5.2.4.4/lib/action_dispatch/journey/router.rb:35:inserve' backend-app | /bundle_cache/ruby/2.7.0/gems/actionpack-5.2.4.4/lib/action_dispatch/routing/route_set.rb:840:in call' backend-app | /bundle_cache/ruby/2.7.0/gems/railties-5.2.4.4/lib/rails/engine.rb:524:incall' backend-app | /bundle_cache/ruby/2.7.0/gems/railties-5.2.4.4/lib/rails/railtie.rb:190:in public_send' backend-app | /bundle_cache/ruby/2.7.0/gems/railties-5.2.4.4/lib/rails/railtie.rb:190:inmethod_missing' backend-app | /bundle_cache/ruby/2.7.0/gems/actionpack-5.2.4.4/lib/action_dispatch/routing/mapper.rb:19:in block in <class:Constraints>' backend-app | /bundle_cache/ruby/2.7.0/gems/actionpack-5.2.4.4/lib/action_dispatch/routing/mapper.rb:48:inserve' backend-app | /bundle_cache/ruby/2.7.0/gems/actionpack-5.2.4.4/lib/action_dispatch/journey/router.rb:52:in block in serve' backend-app | /bundle_cache/ruby/2.7.0/gems/actionpack-5.2.4.4/lib/action_dispatch/journey/router.rb:35:ineach' backend-app | /bundle_cache/ruby/2.7.0/gems/actionpack-5.2.4.4/lib/action_dispatch/journey/router.rb:35:in serve' backend-app | /bundle_cache/ruby/2.7.0/gems/actionpack-5.2.4.4/lib/action_dispatch/routing/route_set.rb:840:incall' backend-app | /bundle_cache/ruby/2.7.0/gems/newrelic_rpm-6.13.0/lib/new_relic/agent/instrumentation/middleware_tracing.rb:101:in call' backend-app | /bundle_cache/ruby/2.7.0/gems/batch-loader-1.5.0/lib/batch_loader/middleware.rb:11:incall' backend-app | /bundle_cache/ruby/2.7.0/gems/newrelic_rpm-6.13.0/lib/new_relic/agent/instrumentation/middleware_tracing.rb:101:in call' backend-app | /bundle_cache/ruby/2.7.0/gems/omniauth-1.9.1/lib/omniauth/strategy.rb:192:incall!' backend-app | /bundle_cache/ruby/2.7.0/gems/omniauth-1.9.1/lib/omniauth/strategy.rb:169:in call' backend-app | /bundle_cache/ruby/2.7.0/gems/newrelic_rpm-6.13.0/lib/new_relic/agent/instrumentation/middleware_tracing.rb:101:incall' backend-app | /bundle_cache/ruby/2.7.0/gems/omniauth-1.9.1/lib/omniauth/builder.rb:45:in call' backend-app | /bundle_cache/ruby/2.7.0/gems/newrelic_rpm-6.13.0/lib/new_relic/agent/instrumentation/middleware_tracing.rb:101:incall' backend-app | /bundle_cache/ruby/2.7.0/gems/omniauth-1.9.1/lib/omniauth/strategy.rb:192:in call!' backend-app | /bundle_cache/ruby/2.7.0/gems/omniauth-1.9.1/lib/omniauth/strategy.rb:169:incall' backend-app | /bundle_cache/ruby/2.7.0/gems/newrelic_rpm-6.13.0/lib/new_relic/agent/instrumentation/middleware_tracing.rb:101:in call' backend-app | /bundle_cache/ruby/2.7.0/gems/omniauth-1.9.1/lib/omniauth/builder.rb:45:incall' backend-app | /bundle_cache/ruby/2.7.0/gems/newrelic_rpm-6.13.0/lib/new_relic/agent/instrumentation/middleware_tracing.rb:101:in call' backend-app | /bundle_cache/ruby/2.7.0/gems/newrelic_rpm-6.13.0/lib/new_relic/rack/agent_hooks.rb:30:intraced_call' backend-app | /bundle_cache/ruby/2.7.0/gems/newrelic_rpm-6.13.0/lib/new_relic/agent/instrumentation/middleware_tracing.rb:101:in call' backend-app | /bundle_cache/ruby/2.7.0/gems/newrelic_rpm-6.13.0/lib/new_relic/rack/browser_monitoring.rb:33:intraced_call' backend-app | /bundle_cache/ruby/2.7.0/gems/newrelic_rpm-6.13.0/lib/new_relic/agent/instrumentation/middleware_tracing.rb:101:in call' backend-app | /bundle_cache/ruby/2.7.0/gems/warden-1.2.9/lib/warden/manager.rb:36:inblock in call' backend-app | /bundle_cache/ruby/2.7.0/gems/warden-1.2.9/lib/warden/manager.rb:34:in catch' backend-app | /bundle_cache/ruby/2.7.0/gems/warden-1.2.9/lib/warden/manager.rb:34:incall' backend-app | /bundle_cache/ruby/2.7.0/gems/newrelic_rpm-6.13.0/lib/new_relic/agent/instrumentation/middleware_tracing.rb:101:in call' backend-app | /code/decidim/decidim-core/app/middleware/decidim/strip_x_forwarded_host.rb:11:incall' backend-app | /bundle_cache/ruby/2.7.0/gems/newrelic_rpm-6.13.0/lib/new_relic/agent/instrumentation/middleware_tracing.rb:101:in call' backend-app | /code/decidim/decidim-core/app/middleware/decidim/current_organization.rb:21:incall' backend-app | /bundle_cache/ruby/2.7.0/gems/newrelic_rpm-6.13.0/lib/new_relic/agent/instrumentation/middleware_tracing.rb:101:in call' backend-app | /bundle_cache/ruby/2.7.0/gems/rack-2.2.3/lib/rack/tempfile_reaper.rb:15:incall' backend-app | /bundle_cache/ruby/2.7.0/gems/newrelic_rpm-6.13.0/lib/new_relic/agent/instrumentation/middleware_tracing.rb:101:in call' backend-app | /bundle_cache/ruby/2.7.0/gems/rack-2.2.3/lib/rack/etag.rb:27:incall' backend-app | /bundle_cache/ruby/2.7.0/gems/newrelic_rpm-6.13.0/lib/new_relic/agent/instrumentation/middleware_tracing.rb:101:in call' backend-app | /bundle_cache/ruby/2.7.0/gems/rack-2.2.3/lib/rack/conditional_get.rb:40:incall' backend-app | /bundle_cache/ruby/2.7.0/gems/newrelic_rpm-6.13.0/lib/new_relic/agent/instrumentation/middleware_tracing.rb:101:in call' backend-app | /bundle_cache/ruby/2.7.0/gems/rack-2.2.3/lib/rack/head.rb:12:incall' backend-app | /bundle_cache/ruby/2.7.0/gems/newrelic_rpm-6.13.0/lib/new_relic/agent/instrumentation/middleware_tracing.rb:101:in call' backend-app | /bundle_cache/ruby/2.7.0/gems/actionpack-5.2.4.4/lib/action_dispatch/http/content_security_policy.rb:18:incall' backend-app | /bundle_cache/ruby/2.7.0/gems/newrelic_rpm-6.13.0/lib/new_relic/agent/instrumentation/middleware_tracing.rb:101:in call' backend-app | /bundle_cache/ruby/2.7.0/gems/rack-2.2.3/lib/rack/session/abstract/id.rb:266:incontext' backend-app | /bundle_cache/ruby/2.7.0/gems/rack-2.2.3/lib/rack/session/abstract/id.rb:260:in call' backend-app | /bundle_cache/ruby/2.7.0/gems/newrelic_rpm-6.13.0/lib/new_relic/agent/instrumentation/middleware_tracing.rb:101:incall' backend-app | /bundle_cache/ruby/2.7.0/gems/actionpack-5.2.4.4/lib/action_dispatch/middleware/cookies.rb:670:in call' backend-app | /bundle_cache/ruby/2.7.0/gems/newrelic_rpm-6.13.0/lib/new_relic/agent/instrumentation/middleware_tracing.rb:101:incall' backend-app | /bundle_cache/ruby/2.7.0/gems/activerecord-5.2.4.4/lib/active_record/migration.rb:559:in call' backend-app | /bundle_cache/ruby/2.7.0/gems/newrelic_rpm-6.13.0/lib/new_relic/agent/instrumentation/middleware_tracing.rb:101:incall' backend-app | /bundle_cache/ruby/2.7.0/gems/actionpack-5.2.4.4/lib/action_dispatch/middleware/callbacks.rb:28:in block in call' backend-app | /bundle_cache/ruby/2.7.0/gems/activesupport-5.2.4.4/lib/active_support/callbacks.rb:98:inrun_callbacks' backend-app | /bundle_cache/ruby/2.7.0/gems/actionpack-5.2.4.4/lib/action_dispatch/middleware/callbacks.rb:26:in call' backend-app | /bundle_cache/ruby/2.7.0/gems/newrelic_rpm-6.13.0/lib/new_relic/agent/instrumentation/middleware_tracing.rb:101:incall' backend-app | /bundle_cache/ruby/2.7.0/gems/actionpack-5.2.4.4/lib/action_dispatch/middleware/executor.rb:14:in call' backend-app | /bundle_cache/ruby/2.7.0/gems/newrelic_rpm-6.13.0/lib/new_relic/agent/instrumentation/middleware_tracing.rb:101:incall' backend-app | /bundle_cache/ruby/2.7.0/gems/actionpack-5.2.4.4/lib/action_dispatch/middleware/debug_exceptions.rb:61:in call' backend-app | /bundle_cache/ruby/2.7.0/gems/newrelic_rpm-6.13.0/lib/new_relic/agent/instrumentation/middleware_tracing.rb:101:incall' backend-app | /bundle_cache/ruby/2.7.0/gems/web-console-3.7.0/lib/web_console/middleware.rb:135:in call_app' backend-app | /bundle_cache/ruby/2.7.0/gems/web-console-3.7.0/lib/web_console/middleware.rb:30:inblock in call' backend-app | /bundle_cache/ruby/2.7.0/gems/web-console-3.7.0/lib/web_console/middleware.rb:20:in catch' backend-app | /bundle_cache/ruby/2.7.0/gems/web-console-3.7.0/lib/web_console/middleware.rb:20:incall' backend-app | /bundle_cache/ruby/2.7.0/gems/newrelic_rpm-6.13.0/lib/new_relic/agent/instrumentation/middleware_tracing.rb:101:in call' backend-app | /bundle_cache/ruby/2.7.0/gems/actionpack-5.2.4.4/lib/action_dispatch/middleware/show_exceptions.rb:33:incall' backend-app | /bundle_cache/ruby/2.7.0/gems/newrelic_rpm-6.13.0/lib/new_relic/agent/instrumentation/middleware_tracing.rb:101:in call' backend-app | /bundle_cache/ruby/2.7.0/gems/railties-5.2.4.4/lib/rails/rack/logger.rb:38:incall_app' backend-app | /bundle_cache/ruby/2.7.0/gems/railties-5.2.4.4/lib/rails/rack/logger.rb:26:in block in call' backend-app | /bundle_cache/ruby/2.7.0/gems/activesupport-5.2.4.4/lib/active_support/tagged_logging.rb:71:inblock in tagged' backend-app | /bundle_cache/ruby/2.7.0/gems/activesupport-5.2.4.4/lib/active_support/tagged_logging.rb:28:in tagged' backend-app | /bundle_cache/ruby/2.7.0/gems/activesupport-5.2.4.4/lib/active_support/tagged_logging.rb:71:intagged' backend-app | /bundle_cache/ruby/2.7.0/gems/railties-5.2.4.4/lib/rails/rack/logger.rb:26:in call' backend-app | /bundle_cache/ruby/2.7.0/gems/newrelic_rpm-6.13.0/lib/new_relic/agent/instrumentation/middleware_tracing.rb:101:incall' backend-app | /bundle_cache/ruby/2.7.0/gems/sprockets-rails-3.2.2/lib/sprockets/rails/quiet_assets.rb:13:in call' backend-app | /bundle_cache/ruby/2.7.0/gems/newrelic_rpm-6.13.0/lib/new_relic/agent/instrumentation/middleware_tracing.rb:101:incall' backend-app | /bundle_cache/ruby/2.7.0/gems/actionpack-5.2.4.4/lib/action_dispatch/middleware/remote_ip.rb:81:in call' backend-app | /bundle_cache/ruby/2.7.0/gems/newrelic_rpm-6.13.0/lib/new_relic/agent/instrumentation/middleware_tracing.rb:101:incall' backend-app | /bundle_cache/ruby/2.7.0/gems/request_store-1.5.0/lib/request_store/middleware.rb:19:in call' backend-app | /bundle_cache/ruby/2.7.0/gems/newrelic_rpm-6.13.0/lib/new_relic/agent/instrumentation/middleware_tracing.rb:101:incall' backend-app | /bundle_cache/ruby/2.7.0/gems/actionpack-5.2.4.4/lib/action_dispatch/middleware/request_id.rb:27:in call' backend-app | /bundle_cache/ruby/2.7.0/gems/newrelic_rpm-6.13.0/lib/new_relic/agent/instrumentation/middleware_tracing.rb:101:incall' backend-app | /bundle_cache/ruby/2.7.0/gems/rack-2.2.3/lib/rack/method_override.rb:24:in call' backend-app | /bundle_cache/ruby/2.7.0/gems/newrelic_rpm-6.13.0/lib/new_relic/agent/instrumentation/middleware_tracing.rb:101:incall' backend-app | /bundle_cache/ruby/2.7.0/gems/actionpack-5.2.4.4/lib/action_dispatch/middleware/executor.rb:14:in call' backend-app | /bundle_cache/ruby/2.7.0/gems/newrelic_rpm-6.13.0/lib/new_relic/agent/instrumentation/middleware_tracing.rb:101:incall' backend-app | /bundle_cache/ruby/2.7.0/gems/actionpack-5.2.4.4/lib/action_dispatch/middleware/static.rb:127:in call' backend-app | /bundle_cache/ruby/2.7.0/gems/newrelic_rpm-6.13.0/lib/new_relic/agent/instrumentation/middleware_tracing.rb:101:incall' backend-app | /bundle_cache/ruby/2.7.0/gems/rack-2.2.3/lib/rack/sendfile.rb:110:in call' backend-app | /bundle_cache/ruby/2.7.0/gems/newrelic_rpm-6.13.0/lib/new_relic/agent/instrumentation/middleware_tracing.rb:101:incall' backend-app | /bundle_cache/ruby/2.7.0/gems/sentry-raven-3.1.1/lib/raven/integrations/rack.rb:51:in call' backend-app | /bundle_cache/ruby/2.7.0/gems/newrelic_rpm-6.13.0/lib/new_relic/agent/instrumentation/middleware_tracing.rb:101:incall' backend-app | /bundle_cache/ruby/2.7.0/gems/secure_headers-6.3.1/lib/secure_headers/middleware.rb:11:in call' backend-app | /bundle_cache/ruby/2.7.0/gems/newrelic_rpm-6.13.0/lib/new_relic/agent/instrumentation/middleware_tracing.rb:101:incall' backend-app | /bundle_cache/ruby/2.7.0/gems/rack-cors-1.1.1/lib/rack/cors.rb:100:in call' backend-app | /bundle_cache/ruby/2.7.0/gems/newrelic_rpm-6.13.0/lib/new_relic/agent/instrumentation/middleware_tracing.rb:101:incall' backend-app | /bundle_cache/ruby/2.7.0/gems/railties-5.2.4.4/lib/rails/engine.rb:524:in call' backend-app | /bundle_cache/ruby/2.7.0/gems/newrelic_rpm-6.13.0/lib/new_relic/agent/instrumentation/middleware_tracing.rb:101:incall' backend-app | /bundle_cache/ruby/2.7.0/gems/puma-4.3.6/lib/puma/configuration.rb:228:in call' backend-app | /bundle_cache/ruby/2.7.0/gems/puma-4.3.6/lib/puma/server.rb:713:inhandle_request' backend-app | /bundle_cache/ruby/2.7.0/gems/puma-4.3.6/lib/puma/server.rb:472:in process_client' backend-app | /bundle_cache/ruby/2.7.0/gems/puma-4.3.6/lib/puma/server.rb:328:inblock in run' backend-app | /bundle_cache/ruby/2.7.0/gems/puma-4.3.6/lib/puma/thread_pool.rb:134:in `block in spawn_thread'



The load order of my initializers: 

- decidim.graphql_api
- decidim_comments.query_extensions
- decidim_comments.mutation_extensions
- decidim_participatory_processes.query_extensions
- decidim_assemblies.query_extensions
- decidim_initiatives.query_extensions
alecslupu commented 3 years ago

The issue is solved. The problem was indeed caused by the autoloader ... It seems that if you have Type A, Type C, includes Interface B , and the class (Type B) was not loaded before, then it will be evaluated twice, resulting in the error mentioned in the previous comments