Forest 🌳🌳🌳 Records Index error: undefined method `[]' for nil:NilClass

Feature(s) impacted

Unable to view AppleLogs collection

Observed behavior

When opening my collection I see this message

The request to your server either failed or returned invalid data.

Please check your console logs to get more information.

This only happens sometimes, for example I can view a singular record. So it appears to only happen with certain affected records. I am able to view the objects in my rails console with no issue, so there don’t appear to be any discrepancies.

I’ve checked the logs in my development environment
and it’s this line, “model” is nil

def force_utf8_attributes_encoding(model)
  # NOTICE: Declare all strings are encoded in utf-8
  if model['attributes']
    model['attributes'].each do |name, value|
      if value.respond_to?(:force_encoding)
        begin
          model['attributes'][name] = value.force_encoding('utf-8')
        rescue
          # NOTICE: Enums are frozen Strings
        end
      end
    end
  end

Expected behavior

Failure Logs

Context

  • Agent technology: (nodejs, php, rails, python) Rails
  • Agent (forest package) name & version: … forest_liana (8.0.8)
  • Database type: … PostgreSQL

It’s a weird issue :thinking_face:.
Could you please share :pray: :

  • an example of a record that doesn’t work in order to reproduce the problem.
  • the http request that generates the issue
  • the console rails stack

Hi,

The collection that doesn’t work is called AppleLog
When I visualize the collection it doesn’t work:
https://app.forestadmin.com/{...}/Production/Development%20Team/data/AppleLog/index

Here are the console logs

Started GET "/forest/AppleLog?timezone=Europe%2FLondon&fields%5BAppleLog%5D=timestamp%2Cevent_type%2Cerror_type%2Cerror_response_code%2Cif_modified_since_header%2Cpass%2Cupdated_at%2Cweb_service_url&fields%5Bpass%5D=uuid&page%5Bnumber%5D=1&page%5Bsize%5D=17&sort=-id" for 212.161.5.175 at 2024-08-27 16:02:34 +0000
2024-08-27T16:02:34.892432+00:00 app[web.2]: I, [2024-08-27T16:02:34.892375 #40]  INFO -- : [857db4f5-4270-4622-b6ac-c391ccf1cd9d] Processing by ForestLiana::UserSpace::AppleLogController#index as JSON
2024-08-27T16:02:34.892478+00:00 app[web.2]: I, [2024-08-27T16:02:34.892446 #40]  INFO -- : [857db4f5-4270-4622-b6ac-c391ccf1cd9d]   Parameters: {"timezone"=>"Europe/London", "fields"=>{"AppleLog"=>"timestamp,event_type,error_type,error_response_code,if_modified_since_header,pass,updated_at,web_service_url", "pass"=>"uuid"}, "page"=>{"number"=>"1", "size"=>"17"}, "sort"=>"-id", "collection"=>"AppleLog"}
2024-08-27T16:02:35.074375+00:00 app[web.2]: [2024-08-27 16:02:35] Forest 🌳🌳🌳  Records Index error: undefined method `[]' for nil:NilClass
2024-08-27T16:02:35.074377+00:00 app[web.2]: /app/vendor/bundle/ruby/3.2.0/gems/forest_liana-8.0.8/app/controllers/forest_liana/application_controller.rb:132:in `force_utf8_attributes_encoding'
2024-08-27T16:02:35.074378+00:00 app[web.2]: /app/vendor/bundle/ruby/3.2.0/gems/forest_liana-8.0.8/app/controllers/forest_liana/application_controller.rb:117:in `block in force_utf8_encoding'
2024-08-27T16:02:35.074379+00:00 app[web.2]: /app/vendor/bundle/ruby/3.2.0/gems/forest_liana-8.0.8/app/controllers/forest_liana/application_controller.rb:117:in `each'
2024-08-27T16:02:35.074380+00:00 app[web.2]: /app/vendor/bundle/ruby/3.2.0/gems/forest_liana-8.0.8/app/controllers/forest_liana/application_controller.rb:117:in `force_utf8_encoding'
2024-08-27T16:02:35.074380+00:00 app[web.2]: /app/vendor/bundle/ruby/3.2.0/gems/forest_liana-8.0.8/app/controllers/forest_liana/application_controller.rb:58:in `serialize_models'
2024-08-27T16:02:35.074381+00:00 app[web.2]: /app/vendor/bundle/ruby/3.2.0/gems/forest_liana-8.0.8/app/controllers/forest_liana/resources_controller.rb:219:in `render_jsonapi'
2024-08-27T16:02:35.074381+00:00 app[web.2]: /app/vendor/bundle/ruby/3.2.0/gems/forest_liana-8.0.8/app/controllers/forest_liana/resources_controller.rb:24:in `block (2 levels) in index'
2024-08-27T16:02:35.074381+00:00 app[web.2]: /app/vendor/bundle/ruby/3.2.0/gems/actionpack-7.0.4.3/lib/action_controller/metal/mime_responds.rb:214:in `respond_to'
2024-08-27T16:02:35.074382+00:00 app[web.2]: /app/vendor/bundle/ruby/3.2.0/gems/forest_liana-8.0.8/app/controllers/forest_liana/resources_controller.rb:23:in `index'
2024-08-27T16:02:35.074382+00:00 app[web.2]: /app/vendor/bundle/ruby/3.2.0/gems/actionpack-7.0.4.3/lib/action_controller/metal/basic_implicit_render.rb:6:in `send_action'
2024-08-27T16:02:35.074382+00:00 app[web.2]: /app/vendor/bundle/ruby/3.2.0/gems/actionpack-7.0.4.3/lib/abstract_controller/base.rb:215:in `process_action'
2024-08-27T16:02:35.074383+00:00 app[web.2]: /app/vendor/bundle/ruby/3.2.0/gems/actionpack-7.0.4.3/lib/action_controller/metal/rendering.rb:53:in `process_action'
2024-08-27T16:02:35.074383+00:00 app[web.2]: /app/vendor/bundle/ruby/3.2.0/gems/actionpack-7.0.4.3/lib/abstract_controller/callbacks.rb:234:in `block in process_action'
2024-08-27T16:02:35.074383+00:00 app[web.2]: /app/vendor/bundle/ruby/3.2.0/gems/activesupport-7.0.4.3/lib/active_support/callbacks.rb:118:in `block in run_callbacks'
2024-08-27T16:02:35.074383+00:00 app[web.2]: /app/vendor/bundle/ruby/3.2.0/gems/actiontext-7.0.4.3/lib/action_text/rendering.rb:20:in `with_renderer'
2024-08-27T16:02:35.074383+00:00 app[web.2]: /app/vendor/bundle/ruby/3.2.0/gems/actiontext-7.0.4.3/lib/action_text/engine.rb:69:in `block (4 levels) in <class:Engine>'
2024-08-27T16:02:35.074383+00:00 app[web.2]: /app/vendor/bundle/ruby/3.2.0/gems/activesupport-7.0.4.3/lib/active_support/callbacks.rb:127:in `instance_exec'
2024-08-27T16:02:35.074384+00:00 app[web.2]: /app/vendor/bundle/ruby/3.2.0/gems/activesupport-7.0.4.3/lib/active_support/callbacks.rb:127:in `block in run_callbacks'
2024-08-27T16:02:35.074384+00:00 app[web.2]: /app/vendor/bundle/ruby/3.2.0/gems/activesupport-7.0.4.3/lib/active_support/callbacks.rb:138:in `run_callbacks'
2024-08-27T16:02:35.074384+00:00 app[web.2]: /app/vendor/bundle/ruby/3.2.0/gems/actionpack-7.0.4.3/lib/abstract_controller/callbacks.rb:233:in `process_action'
2024-08-27T16:02:35.074384+00:00 app[web.2]: /app/vendor/bundle/ruby/3.2.0/gems/actionpack-7.0.4.3/lib/action_controller/metal/rescue.rb:22:in `process_action'
2024-08-27T16:02:35.074384+00:00 app[web.2]: /app/vendor/bundle/ruby/3.2.0/gems/actionpack-7.0.4.3/lib/action_controller/metal/instrumentation.rb:67:in `block in process_action'
2024-08-27T16:02:35.074385+00:00 app[web.2]: /app/vendor/bundle/ruby/3.2.0/gems/appsignal-3.11.0/lib/appsignal/hooks/active_support_notifications.rb:19:in `block in instrument'
2024-08-27T16:02:35.074385+00:00 app[web.2]: /app/vendor/bundle/ruby/3.2.0/gems/activesupport-7.0.4.3/lib/active_support/notifications/instrumenter.rb:24:in `instrument'
2024-08-27T16:02:35.074385+00:00 app[web.2]: /app/vendor/bundle/ruby/3.2.0/gems/appsignal-3.11.0/lib/appsignal/hooks/active_support_notifications.rb:18:in `instrument'
2024-08-27T16:02:35.074385+00:00 app[web.2]: /app/vendor/bundle/ruby/3.2.0/gems/actionpack-7.0.4.3/lib/action_controller/metal/instrumentation.rb:66:in `process_action'
2024-08-27T16:02:35.074385+00:00 app[web.2]: /app/vendor/bundle/ruby/3.2.0/gems/actionpack-7.0.4.3/lib/action_controller/metal/params_wrapper.rb:259:in `process_action'
2024-08-27T16:02:35.074385+00:00 app[web.2]: /app/vendor/bundle/ruby/3.2.0/gems/activerecord-7.0.4.3/lib/active_record/railties/controller_runtime.rb:27:in `process_action'
2024-08-27T16:02:35.074386+00:00 app[web.2]: /app/vendor/bundle/ruby/3.2.0/gems/actionpack-7.0.4.3/lib/abstract_controller/base.rb:151:in `process'
2024-08-27T16:02:35.074386+00:00 app[web.2]: /app/vendor/bundle/ruby/3.2.0/gems/actionview-7.0.4.3/lib/action_view/rendering.rb:39:in `process'
2024-08-27T16:02:35.074386+00:00 app[web.2]: /app/vendor/bundle/ruby/3.2.0/gems/actionpack-7.0.4.3/lib/action_controller/metal.rb:188:in `dispatch'
2024-08-27T16:02:35.074386+00:00 app[web.2]: /app/vendor/bundle/ruby/3.2.0/gems/actionpack-7.0.4.3/lib/action_controller/metal.rb:235:in `block in action'
2024-08-27T16:02:35.074390+00:00 app[web.2]: /app/vendor/bundle/ruby/3.2.0/gems/forest_liana-8.0.8/app/controllers/forest_liana/router.rb:40:in `call'
2024-08-27T16:02:35.074390+00:00 app[web.2]: /app/vendor/bundle/ruby/3.2.0/gems/actionpack-7.0.4.3/lib/action_dispatch/routing/mapper.rb:19:in `block in <class:Constraints>'
2024-08-27T16:02:35.074391+00:00 app[web.2]: /app/vendor/bundle/ruby/3.2.0/gems/actionpack-7.0.4.3/lib/action_dispatch/routing/mapper.rb:48:in `serve'
2024-08-27T16:02:35.074391+00:00 app[web.2]: /app/vendor/bundle/ruby/3.2.0/gems/actionpack-7.0.4.3/lib/action_dispatch/journey/router.rb:50:in `block in serve'
2024-08-27T16:02:35.074391+00:00 app[web.2]: /app/vendor/bundle/ruby/3.2.0/gems/actionpack-7.0.4.3/lib/action_dispatch/journey/router.rb:32:in `each'
2024-08-27T16:02:35.074391+00:00 app[web.2]: /app/vendor/bundle/ruby/3.2.0/gems/actionpack-7.0.4.3/lib/action_dispatch/journey/router.rb:32:in `serve'
2024-08-27T16:02:35.074391+00:00 app[web.2]: /app/vendor/bundle/ruby/3.2.0/gems/actionpack-7.0.4.3/lib/action_dispatch/routing/route_set.rb:852:in `call'
2024-08-27T16:02:35.074393+00:00 app[web.2]: /app/vendor/bundle/ruby/3.2.0/gems/rack-cors-2.0.1/lib/rack/cors.rb:102:in `call'
2024-08-27T16:02:35.074393+00:00 app[web.2]: /app/vendor/bundle/ruby/3.2.0/gems/railties-7.0.4.3/lib/rails/engine.rb:530:in `call'
2024-08-27T16:02:35.074393+00:00 app[web.2]: /app/vendor/bundle/ruby/3.2.0/gems/railties-7.0.4.3/lib/rails/railtie.rb:226:in `public_send'
2024-08-27T16:02:35.074393+00:00 app[web.2]: /app/vendor/bundle/ruby/3.2.0/gems/railties-7.0.4.3/lib/rails/railtie.rb:226:in `method_missing'
2024-08-27T16:02:35.074393+00:00 app[web.2]: /app/vendor/bundle/ruby/3.2.0/gems/actionpack-7.0.4.3/lib/action_dispatch/routing/mapper.rb:19:in `block in <class:Constraints>'
2024-08-27T16:02:35.074394+00:00 app[web.2]: /app/vendor/bundle/ruby/3.2.0/gems/actionpack-7.0.4.3/lib/action_dispatch/routing/mapper.rb:48:in `serve'
2024-08-27T16:02:35.074394+00:00 app[web.2]: /app/vendor/bundle/ruby/3.2.0/gems/actionpack-7.0.4.3/lib/action_dispatch/journey/router.rb:50:in `block in serve'
2024-08-27T16:02:35.074394+00:00 app[web.2]: /app/vendor/bundle/ruby/3.2.0/gems/actionpack-7.0.4.3/lib/action_dispatch/journey/router.rb:32:in `each'
2024-08-27T16:02:35.074394+00:00 app[web.2]: /app/vendor/bundle/ruby/3.2.0/gems/actionpack-7.0.4.3/lib/action_dispatch/journey/router.rb:32:in `serve'
2024-08-27T16:02:35.074394+00:00 app[web.2]: /app/vendor/bundle/ruby/3.2.0/gems/actionpack-7.0.4.3/lib/action_dispatch/routing/route_set.rb:852:in `call'
2024-08-27T16:02:35.074394+00:00 app[web.2]: /app/vendor/bundle/ruby/3.2.0/gems/coverband-6.1.2/lib/coverband/integrations/background_middleware.rb:10:in `call'
2024-08-27T16:02:35.074394+00:00 app[web.2]: /app/vendor/bundle/ruby/3.2.0/gems/warden-jwt_auth-0.8.0/lib/warden/jwt_auth/middleware/token_dispatcher.rb:20:in `call'
2024-08-27T16:02:35.074395+00:00 app[web.2]: /app/vendor/bundle/ruby/3.2.0/gems/warden-jwt_auth-0.8.0/lib/warden/jwt_auth/middleware/revocation_manager.rb:21:in `call'
2024-08-27T16:02:35.074395+00:00 app[web.2]: /app/vendor/bundle/ruby/3.2.0/gems/rack-2.2.9/lib/rack/builder.rb:244:in `call'
2024-08-27T16:02:35.074395+00:00 app[web.2]: /app/vendor/bundle/ruby/3.2.0/gems/warden-jwt_auth-0.8.0/lib/warden/jwt_auth/middleware.rb:22:in `call'
2024-08-27T16:02:35.074395+00:00 app[web.2]: /app/vendor/bundle/ruby/3.2.0/gems/rack-2.2.9/lib/rack/session/abstract/id.rb:266:in `context'
2024-08-27T16:02:35.074395+00:00 app[web.2]: /app/vendor/bundle/ruby/3.2.0/gems/rack-2.2.9/lib/rack/session/abstract/id.rb:260:in `call'
2024-08-27T16:02:35.074395+00:00 app[web.2]: /app/vendor/bundle/ruby/3.2.0/gems/actionpack-7.0.4.3/lib/action_dispatch/middleware/cookies.rb:704:in `call'
2024-08-27T16:02:35.074396+00:00 app[web.2]: /app/vendor/bundle/ruby/3.2.0/gems/warden-1.2.9/lib/warden/manager.rb:36:in `block in call'
2024-08-27T16:02:35.074396+00:00 app[web.2]: /app/vendor/bundle/ruby/3.2.0/gems/warden-1.2.9/lib/warden/manager.rb:34:in `catch'
2024-08-27T16:02:35.074396+00:00 app[web.2]: /app/vendor/bundle/ruby/3.2.0/gems/warden-1.2.9/lib/warden/manager.rb:34:in `call'
2024-08-27T16:02:35.074397+00:00 app[web.2]: /app/vendor/bundle/ruby/3.2.0/gems/rack-2.2.9/lib/rack/etag.rb:27:in `call'
2024-08-27T16:02:35.074397+00:00 app[web.2]: /app/vendor/bundle/ruby/3.2.0/gems/rack-2.2.9/lib/rack/conditional_get.rb:27:in `call'
2024-08-27T16:02:35.074397+00:00 app[web.2]: /app/vendor/bundle/ruby/3.2.0/gems/rack-2.2.9/lib/rack/head.rb:12:in `call'
2024-08-27T16:02:35.074397+00:00 app[web.2]: /app/vendor/bundle/ruby/3.2.0/gems/actionpack-7.0.4.3/lib/action_dispatch/middleware/callbacks.rb:27:in `block in call'
2024-08-27T16:02:35.074398+00:00 app[web.2]: /app/vendor/bundle/ruby/3.2.0/gems/activesupport-7.0.4.3/lib/active_support/callbacks.rb:99:in `run_callbacks'
2024-08-27T16:02:35.074398+00:00 app[web.2]: /app/vendor/bundle/ruby/3.2.0/gems/actionpack-7.0.4.3/lib/action_dispatch/middleware/callbacks.rb:26:in `call'
2024-08-27T16:02:35.074398+00:00 app[web.2]: /app/vendor/bundle/ruby/3.2.0/gems/appsignal-3.11.0/lib/appsignal/rack/abstract_middleware.rb:92:in `call_app'
2024-08-27T16:02:35.074398+00:00 app[web.2]: /app/vendor/bundle/ruby/3.2.0/gems/appsignal-3.11.0/lib/appsignal/rack/abstract_middleware.rb:87:in `instrument_app_call'
2024-08-27T16:02:35.074398+00:00 app[web.2]: /app/vendor/bundle/ruby/3.2.0/gems/appsignal-3.11.0/lib/appsignal/rack/abstract_middleware.rb:110:in `instrument_app_call_with_exception_handling'
2024-08-27T16:02:35.074398+00:00 app[web.2]: /app/vendor/bundle/ruby/3.2.0/gems/appsignal-3.11.0/lib/appsignal/rack/abstract_middleware.rb:52:in `call'
2024-08-27T16:02:35.074402+00:00 app[web.2]: /app/vendor/bundle/ruby/3.2.0/gems/actionpack-7.0.4.3/lib/action_dispatch/middleware/debug_exceptions.rb:28:in `call'
2024-08-27T16:02:35.074402+00:00 app[web.2]: /app/vendor/bundle/ruby/3.2.0/gems/actionpack-7.0.4.3/lib/action_dispatch/middleware/show_exceptions.rb:26:in `call'
2024-08-27T16:02:35.074402+00:00 app[web.2]: /app/vendor/bundle/ruby/3.2.0/gems/railties-7.0.4.3/lib/rails/rack/logger.rb:40:in `call_app'
2024-08-27T16:02:35.074402+00:00 app[web.2]: /app/vendor/bundle/ruby/3.2.0/gems/railties-7.0.4.3/lib/rails/rack/logger.rb:25:in `block in call'
2024-08-27T16:02:35.074402+00:00 app[web.2]: /app/vendor/bundle/ruby/3.2.0/gems/activesupport-7.0.4.3/lib/active_support/tagged_logging.rb:99:in `block in tagged'
2024-08-27T16:02:35.074402+00:00 app[web.2]: /app/vendor/bundle/ruby/3.2.0/gems/activesupport-7.0.4.3/lib/active_support/tagged_logging.rb:37:in `tagged'
2024-08-27T16:02:35.074402+00:00 app[web.2]: /app/vendor/bundle/ruby/3.2.0/gems/activesupport-7.0.4.3/lib/active_support/tagged_logging.rb:99:in `tagged'
2024-08-27T16:02:35.074403+00:00 app[web.2]: /app/vendor/bundle/ruby/3.2.0/gems/railties-7.0.4.3/lib/rails/rack/logger.rb:25:in `call'
2024-08-27T16:02:35.074403+00:00 app[web.2]: /app/vendor/bundle/ruby/3.2.0/gems/actionpack-7.0.4.3/lib/action_dispatch/middleware/remote_ip.rb:93:in `call'
2024-08-27T16:02:35.074403+00:00 app[web.2]: /app/vendor/bundle/ruby/3.2.0/gems/request_store-1.5.1/lib/request_store/middleware.rb:19:in `call'
2024-08-27T16:02:35.074403+00:00 app[web.2]: /app/vendor/bundle/ruby/3.2.0/gems/rack-timeout-0.7.0/lib/rack/timeout/core.rb:154:in `block in call'
2024-08-27T16:02:35.074404+00:00 app[web.2]: /app/vendor/bundle/ruby/3.2.0/gems/rack-timeout-0.7.0/lib/rack/timeout/support/timeout.rb:19:in `timeout'
2024-08-27T16:02:35.074404+00:00 app[web.2]: /app/vendor/bundle/ruby/3.2.0/gems/rack-timeout-0.7.0/lib/rack/timeout/core.rb:153:in `call'
2024-08-27T16:02:35.074404+00:00 app[web.2]: /app/vendor/bundle/ruby/3.2.0/gems/actionpack-7.0.4.3/lib/action_dispatch/middleware/request_id.rb:26:in `call'
2024-08-27T16:02:35.074404+00:00 app[web.2]: /app/vendor/bundle/ruby/3.2.0/gems/rack-2.2.9/lib/rack/runtime.rb:22:in `call'
2024-08-27T16:02:35.074404+00:00 app[web.2]: /app/vendor/bundle/ruby/3.2.0/gems/judoscale-ruby-1.7.0/lib/judoscale/request_middleware.rb:41:in `call'
2024-08-27T16:02:35.074405+00:00 app[web.2]: /app/vendor/bundle/ruby/3.2.0/gems/actionpack-7.0.4.3/lib/action_dispatch/middleware/executor.rb:14:in `call'
2024-08-27T16:02:35.074405+00:00 app[web.2]: /app/vendor/bundle/ruby/3.2.0/gems/actionpack-7.0.4.3/lib/action_dispatch/middleware/static.rb:23:in `call'
2024-08-27T16:02:35.074405+00:00 app[web.2]: /app/vendor/bundle/ruby/3.2.0/gems/rack-2.2.9/lib/rack/sendfile.rb:110:in `call'
2024-08-27T16:02:35.074405+00:00 app[web.2]: /app/vendor/bundle/ruby/3.2.0/gems/actionpack-7.0.4.3/lib/action_dispatch/middleware/ssl.rb:77:in `call'
2024-08-27T16:02:35.074405+00:00 app[web.2]: /app/vendor/bundle/ruby/3.2.0/gems/actionpack-7.0.4.3/lib/action_dispatch/middleware/host_authorization.rb:131:in `call'
2024-08-27T16:02:35.074406+00:00 app[web.2]: /app/vendor/bundle/ruby/3.2.0/gems/rack-2.2.9/lib/rack/events.rb:112:in `call'
2024-08-27T16:02:35.074406+00:00 app[web.2]: /app/vendor/bundle/ruby/3.2.0/gems/rack-cors-2.0.1/lib/rack/cors.rb:102:in `call'
2024-08-27T16:02:35.074406+00:00 app[web.2]: /app/vendor/bundle/ruby/3.2.0/gems/railties-7.0.4.3/lib/rails/engine.rb:530:in `call'
2024-08-27T16:02:35.074406+00:00 app[web.2]: /app/vendor/bundle/ruby/3.2.0/gems/puma-5.6.7/lib/puma/configuration.rb:252:in `call'
2024-08-27T16:02:35.074406+00:00 app[web.2]: /app/vendor/bundle/ruby/3.2.0/gems/puma-5.6.7/lib/puma/request.rb:77:in `block in handle_request'
2024-08-27T16:02:35.074407+00:00 app[web.2]: /app/vendor/bundle/ruby/3.2.0/gems/puma-5.6.7/lib/puma/thread_pool.rb:340:in `with_force_shutdown'
2024-08-27T16:02:35.074407+00:00 app[web.2]: /app/vendor/bundle/ruby/3.2.0/gems/puma-5.6.7/lib/puma/request.rb:76:in `handle_request'
2024-08-27T16:02:35.074407+00:00 app[web.2]: /app/vendor/bundle/ruby/3.2.0/gems/puma-5.6.7/lib/puma/server.rb:443:in `process_client'
2024-08-27T16:02:35.074407+00:00 app[web.2]: /app/vendor/bundle/ruby/3.2.0/gems/puma-5.6.7/lib/puma/thread_pool.rb:147:in `block in spawn_thread'
2024-08-27T16:02:35.074726+00:00 app[web.2]: I, [2024-08-27T16:02:35.074683 #40]  INFO -- : [857db4f5-4270-4622-b6ac-c391ccf1cd9d] Completed 500 Internal Server Error in 182ms (ActiveRecord: 12.6ms | Allocations: 25097)
2024-08-27T16:02:35.075603+00:00 app[web.2]: I, [2024-08-27T16:02:35.075510 #40]  INFO -- : source=rack-timeout id=857db4f5-4270-4622-b6ac-c391ccf1cd9d wait=4ms timeout=25000ms service=188ms state=completed
2024-08-27T16:02:35.084135+00:00 app[web.2]: I, [2024-08-27T16:02:35.084068 #40]  INFO -- : source=rack-timeout id=6ee093ab-cb93-45b8-96a0-cca6f3d6700e wait=2ms timeout=25000ms state=ready
2024-08-27T16:02:35.084735+00:00 app[web.2]: I, [2024-08-27T16:02:35.084677 #40]  INFO -- : [6ee093ab-cb93-45b8-96a0-cca6f3d6700e] Started GET "/forest/AppleLog/count?fields%5BAppleLog%5D=timestamp%2Cevent_type%2Cerror_type%2Cerror_response_code%2Cif_modified_since_header%2Cpass%2Cupdated_at%2Cweb_service_url&fields%5Bpass%5D=uuid&timezone=Europe%2FLondon" for 212.161.5.175 at 2024-08-27 16:02:35 +0000
2024-08-27T16:02:35.085872+00:00 app[web.2]: I, [2024-08-27T16:02:35.085831 #40]  INFO -- : [6ee093ab-cb93-45b8-96a0-cca6f3d6700e] Processing by ForestLiana::UserSpace::AppleLogController#count as JSON
2024-08-27T16:02:35.085905+00:00 app[web.2]: I, [2024-08-27T16:02:35.085880 #40]  INFO -- : [6ee093ab-cb93-45b8-96a0-cca6f3d6700e]   Parameters: {"fields"=>{"AppleLog"=>"timestamp,event_type,error_type,error_response_code,if_modified_since_header,pass,updated_at,web_service_url", "pass"=>"uuid"}, "timezone"=>"Europe/London", "collection"=>"AppleLog"}
2024-08-27T16:02:35.115751+00:00 app[web.2]: I, [2024-08-27T16:02:35.115673 #40]  INFO -- : [6ee093ab-cb93-45b8-96a0-cca6f3d6700e] Completed 200 OK in 30ms (Views: 0.3ms | ActiveRecord: 26.2ms | Allocations: 1352)
2024-08-27T16:02:35.116322+00:00 app[web.2]: I, [2024-08-27T16:02:35.116271 #40]  INFO -- : source=rack-timeout id=6ee093ab-cb93-45b8-96a0-cca6f3d6700e wait=2ms timeout=25000ms service=32ms state=completed

When viewing a singular resource, it works.
Example:
{…}/data/AppleLog/index/record/AppleLog/162591/details

It seems that the problem comes from a record. Perhaps an association issue.

Could you try displaying page 2, to see if the problem occurs.
...Production/Development%20Team/data/AppleLog/index?page=2

If you look at the details of each record on page 1, does it work?