Import fails for a large Garmin gpx-file
Version 0.25.9
Describe the bug An import of a gpx-file from a garmin device with the size of ca. 5.5Mb fails. The file can be displayed in other tools like Garmin Basecamp or several online viewers
To Reproduce Steps to reproduce the behavior:
- Go to 'My data -> Imports'
- Click on 'new import'
- Click on 'GPX'
- Chose the file
- Click on 'create import'
- See the Import with 0 imported points
- Get the notification below
Expected behavior Imported File with the according number of points
Logs
Import "large_garmin_file.gpx" failed: undefined method 'timestamp' for nil, stacktrace: /var/app/app/services/imports/create.rb:48:in 'Imports::Create#schedule_visit_suggesting' /var/app/app/services/imports/create.rb:15:in 'Imports::Create#call' /var/app/app/models/import.rb:18:in 'Import#process!' /var/app/app/jobs/import/process_job.rb:9:in 'Import::ProcessJob#perform' /var/app/vendor/bundle/ruby/3.4.0/gems/activejob-8.0.1/lib/active_job/execution.rb:68:in 'block in ActiveJob::Execution#_perform_job' /var/app/vendor/bundle/ruby/3.4.0/gems/activesupport-8.0.1/lib/active_support/callbacks.rb:120:in 'block in ActiveSupport::Callbacks#run_callbacks' /var/app/vendor/bundle/ruby/3.4.0/gems/i18n-1.14.7/lib/i18n.rb:353:in 'I18n::Base#with_locale' /var/app/vendor/bundle/ruby/3.4.0/gems/activejob-8.0.1/lib/active_job/translation.rb:9:in 'block (2 levels) in ' /var/app/vendor/bundle/ruby/3.4.0/gems/activesupport-8.0.1/lib/active_support/callbacks.rb:129:in 'BasicObject#instance_exec' /var/app/vendor/bundle/ruby/3.4.0/gems/activesupport-8.0.1/lib/active_support/callbacks.rb:129:in 'block in ActiveSupport::Callbacks#run_callbacks' /var/app/vendor/bundle/ruby/3.4.0/gems/activesupport-8.0.1/lib/active_support/core_ext/time/zones.rb:65:in 'Time.use_zone' /var/app/vendor/bundle/ruby/3.4.0/gems/activejob-8.0.1/lib/active_job/timezones.rb:9:in 'block (2 levels) in ' /var/app/vendor/bundle/ruby/3.4.0/gems/activesupport-8.0.1/lib/active_support/callbacks.rb:129:in 'BasicObject#instance_exec' /var/app/vendor/bundle/ruby/3.4.0/gems/activesupport-8.0.1/lib/active_support/callbacks.rb:129:in 'block in ActiveSupport::Callbacks#run_callbacks' /var/app/vendor/bundle/ruby/3.4.0/gems/activesupport-8.0.1/lib/active_support/callbacks.rb:140:in 'ActiveSupport::Callbacks#run_callbacks' /var/app/vendor/bundle/ruby/3.4.0/gems/activejob-8.0.1/lib/active_job/execution.rb:67:in 'ActiveJob::Execution#_perform_job' /var/app/vendor/bundle/ruby/3.4.0/gems/activejob-8.0.1/lib/active_job/instrumentation.rb:32:in 'ActiveJob::Instrumentation#_perform_job' /var/app/vendor/bundle/ruby/3.4.0/gems/activejob-8.0.1/lib/active_job/execution.rb:51:in 'ActiveJob::Execution#perform_now' /var/app/vendor/bundle/ruby/3.4.0/gems/activejob-8.0.1/lib/active_job/instrumentation.rb:26:in 'block in ActiveJob::Instrumentation#perform_now' /var/app/vendor/bundle/ruby/3.4.0/gems/activerecord-8.0.1/lib/active_record/railties/job_runtime.rb:13:in 'block in ActiveRecord::Railties::JobRuntime#instrument' /var/app/vendor/bundle/ruby/3.4.0/gems/activejob-8.0.1/lib/active_job/instrumentation.rb:40:in 'block in ActiveJob::Instrumentation#instrument' /var/app/vendor/bundle/ruby/3.4.0/gems/activesupport-8.0.1/lib/active_support/notifications.rb:210:in 'block in ActiveSupport::Notifications.instrument' /var/app/vendor/bundle/ruby/3.4.0/gems/activesupport-8.0.1/lib/active_support/notifications/instrumenter.rb:58:in 'ActiveSupport::Notifications::Instrumenter#instrument' /var/app/vendor/bundle/ruby/3.4.0/gems/activesupport-8.0.1/lib/active_support/notifications.rb:210:in 'ActiveSupport::Notifications.instrument' /var/app/vendor/bundle/ruby/3.4.0/gems/activejob-8.0.1/lib/active_job/instrumentation.rb:39:in 'ActiveJob::Instrumentation#instrument' /var/app/vendor/bundle/ruby/3.4.0/gems/activerecord-8.0.1/lib/active_record/railties/job_runtime.rb:11:in 'ActiveRecord::Railties::JobRuntime#instrument' /var/app/vendor/bundle/ruby/3.4.0/gems/activejob-8.0.1/lib/active_job/instrumentation.rb:26:in 'ActiveJob::Instrumentation#perform_now' /var/app/vendor/bundle/ruby/3.4.0/gems/activejob-8.0.1/lib/active_job/logging.rb:32:in 'block in ActiveJob::Logging#perform_now' /var/app/vendor/bundle/ruby/3.4.0/gems/activejob-8.0.1/lib/active_job/logging.rb:41:in 'ActiveJob::Logging#tag_logger' /var/app/vendor/bundle/ruby/3.4.0/gems/activejob-8.0.1/lib/active_job/logging.rb:32:in 'ActiveJob::Logging#perform_now' /var/app/vendor/bundle/ruby/3.4.0/gems/sentry-rails-5.23.0/lib/sentry/rails/active_job.rb:8:in 'Sentry::Rails::ActiveJobExtensions#perform_now' /var/app/vendor/bundle/ruby/3.4.0/gems/activejob-8.0.1/lib/active_job/execution.rb:29:in 'block in ActiveJob::Execution::ClassMethods#execute' /var/app/vendor/bundle/ruby/3.4.0/gems/activesupport-8.0.1/lib/active_support/callbacks.rb:120:in 'block in ActiveSupport::Callbacks#run_callbacks' /var/app/vendor/bundle/ruby/3.4.0/gems/activejob-8.0.1/lib/active_job/railtie.rb:95:in 'block (4 levels) in ' /var/app/vendor/bundle/ruby/3.4.0/gems/activesupport-8.0.1/lib/active_support/reloader.rb:77:in 'block in ActiveSupport::Reloader.wrap' /var/app/vendor/bundle/ruby/3.4.0/gems/activesupport-8.0.1/lib/active_support/execution_wrapper.rb:87:in 'ActiveSupport::ExecutionWrapper.wrap' /var/app/vendor/bundle/ruby/3.4.0/gems/activesupport-8.0.1/lib/active_support/reloader.rb:74:in 'ActiveSupport::Reloader.wrap' /var/app/vendor/bundle/ruby/3.4.0/gems/activejob-8.0.1/lib/active_job/railtie.rb:94:in 'block (3 levels) in ' /var/app/vendor/bundle/ruby/3.4.0/gems/activesupport-8.0.1/lib/active_support/callbacks.rb:129:in 'BasicObject#instance_exec' /var/app/vendor/bundle/ruby/3.4.0/gems/activesupport-8.0.1/lib/active_support/callbacks.rb:129:in 'block in ActiveSupport::Callbacks#run_callbacks' /var/app/vendor/bundle/ruby/3.4.0/gems/activesupport-8.0.1/lib/active_support/callbacks.rb:140:in 'ActiveSupport::Callbacks#run_callbacks' /var/app/vendor/bundle/ruby/3.4.0/gems/activejob-8.0.1/lib/active_job/execution.rb:27:in 'ActiveJob::Execution::ClassMethods#execute' /var/app/vendor/bundle/ruby/3.4.0/gems/sidekiq-7.3.9/lib/sidekiq/rails.rb:13:in 'Sidekiq::ActiveJob::Wrapper#perform' /var/app/vendor/bundle/ruby/3.4.0/gems/sidekiq-7.3.9/lib/sidekiq/processor.rb:220:in 'Sidekiq::Processor#execute_job' /var/app/vendor/bundle/ruby/3.4.0/gems/sidekiq-7.3.9/lib/sidekiq/processor.rb:185:in 'block (4 levels) in Sidekiq::Processor#process' /var/app/vendor/bundle/ruby/3.4.0/gems/sidekiq-7.3.9/lib/sidekiq/middleware/chain.rb:180:in 'Sidekiq::Middleware::Chain#traverse' /var/app/vendor/bundle/ruby/3.4.0/gems/sidekiq-7.3.9/lib/sidekiq/middleware/chain.rb:183:in 'block in Sidekiq::Middleware::Chain#traverse' /var/app/vendor/bundle/ruby/3.4.0/gems/sidekiq-7.3.9/lib/sidekiq/job/interrupt_handler.rb:9:in 'Sidekiq::Job::InterruptHandler#call' /var/app/vendor/bundle/ruby/3.4.0/gems/sidekiq-7.3.9/lib/sidekiq/middleware/chain.rb:182:in 'Sidekiq::Middleware::Chain#traverse' /var/app/vendor/bundle/ruby/3.4.0/gems/sidekiq-7.3.9/lib/sidekiq/middleware/chain.rb:183:in 'block in Sidekiq::Middleware::Chain#traverse' /var/app/vendor/bundle/ruby/3.4.0/gems/sidekiq-7.3.9/lib/sidekiq/metrics/tracking.rb:26:in 'Sidekiq::Metrics::ExecutionTracker#track' /var/app/vendor/bundle/ruby/3.4.0/gems/sidekiq-7.3.9/lib/sidekiq/metrics/tracking.rb:134:in 'Sidekiq::Metrics::Middleware#call' /var/app/vendor/bundle/ruby/3.4.0/gems/sidekiq-7.3.9/lib/sidekiq/middleware/chain.rb:182:in 'Sidekiq::Middleware::Chain#traverse' /var/app/vendor/bundle/ruby/3.4.0/gems/sidekiq-7.3.9/lib/sidekiq/middleware/chain.rb:173:in 'Sidekiq::Middleware::Chain#invoke' /var/app/vendor/bundle/ruby/3.4.0/gems/sidekiq-7.3.9/lib/sidekiq/processor.rb:184:in 'block (3 levels) in Sidekiq::Processor#process' /var/app/vendor/bundle/ruby/3.4.0/gems/sidekiq-7.3.9/lib/sidekiq/processor.rb:145:in 'block (6 levels) in Sidekiq::Processor#dispatch' /var/app/vendor/bundle/ruby/3.4.0/gems/sidekiq-7.3.9/lib/sidekiq/job_retry.rb:118:in 'Sidekiq::JobRetry#local' /var/app/vendor/bundle/ruby/3.4.0/gems/sidekiq-7.3.9/lib/sidekiq/processor.rb:144:in 'block (5 levels) in Sidekiq::Processor#dispatch' /var/app/vendor/bundle/ruby/3.4.0/gems/sidekiq-7.3.9/lib/sidekiq/rails.rb:27:in 'block in Sidekiq::Rails::Reloader#call' /var/app/vendor/bundle/ruby/3.4.0/gems/activesupport-8.0.1/lib/active_support/reloader.rb:77:in 'block in ActiveSupport::Reloader.wrap' /var/app/vendor/bundle/ruby/3.4.0/gems/activesupport-8.0.1/lib/active_support/execution_wrapper.rb:91:in 'ActiveSupport::ExecutionWrapper.wrap' /var/app/vendor/bundle/ruby/3.4.0/gems/activesupport-8.0.1/lib/active_support/reloader.rb:74:in 'ActiveSupport::Reloader.wrap' /var/app/vendor/bundle/ruby/3.4.0/gems/sidekiq-7.3.9/lib/sidekiq/rails.rb:26:in 'Sidekiq::Rails::Reloader#call' /var/app/vendor/bundle/ruby/3.4.0/gems/sidekiq-7.3.9/lib/sidekiq/processor.rb:139:in 'block (4 levels) in Sidekiq::Processor#dispatch' /var/app/vendor/bundle/ruby/3.4.0/gems/sidekiq-7.3.9/lib/sidekiq/processor.rb:281:in 'Sidekiq::Processor#stats' /var/app/vendor/bundle/ruby/3.4.0/gems/sidekiq-7.3.9/lib/sidekiq/processor.rb:134:in 'block (3 levels) in Sidekiq::Processor#dispatch' /var/app/vendor/bundle/ruby/3.4.0/gems/sidekiq-7.3.9/lib/sidekiq/job_logger.rb:15:in 'Sidekiq::JobLogger#call' /var/app/vendor/bundle/ruby/3.4.0/gems/sidekiq-7.3.9/lib/sidekiq/processor.rb:133:in 'block (2 levels) in Sidekiq::Processor#dispatch' /var/app/vendor/bundle/ruby/3.4.0/gems/sidekiq-7.3.9/lib/sidekiq/job_retry.rb:85:in 'Sidekiq::JobRetry#global' /var/app/vendor/bundle/ruby/3.4.0/gems/sidekiq-7.3.9/lib/sidekiq/processor.rb:132:in 'block in Sidekiq::Processor#dispatch' /var/app/vendor/bundle/ruby/3.4.0/gems/sidekiq-7.3.9/lib/sidekiq/job_logger.rb:40:in 'Sidekiq::JobLogger#prepare' /var/app/vendor/bundle/ruby/3.4.0/gems/sidekiq-7.3.9/lib/sidekiq/processor.rb:131:in 'Sidekiq::Processor#dispatch' /var/app/vendor/bundle/ruby/3.4.0/gems/sidekiq-7.3.9/lib/sidekiq/processor.rb:183:in 'block (2 levels) in Sidekiq::Processor#process' /var/app/vendor/bundle/ruby/3.4.0/gems/sidekiq-7.3.9/lib/sidekiq/processor.rb:182:in 'Thread.handle_interrupt' /var/app/vendor/bundle/ruby/3.4.0/gems/sidekiq-7.3.9/lib/sidekiq/processor.rb:182:in 'block in Sidekiq::Processor#process' /var/app/vendor/bundle/ruby/3.4.0/gems/sidekiq-7.3.9/lib/sidekiq/processor.rb:181:in 'Thread.handle_interrupt' /var/app/vendor/bundle/ruby/3.4.0/gems/sidekiq-7.3.9/lib/sidekiq/processor.rb:181:in 'Sidekiq::Processor#process' /var/app/vendor/bundle/ruby/3.4.0/gems/sidekiq-7.3.9/lib/sidekiq/processor.rb:86:in 'Sidekiq::Processor#process_one' /var/app/vendor/bundle/ruby/3.4.0/gems/sidekiq-7.3.9/lib/sidekiq/processor.rb:76:in 'Sidekiq::Processor#run' /var/app/vendor/bundle/ruby/3.4.0/gems/sidekiq-7.3.9/lib/sidekiq/component.rb:10:in 'Sidekiq::Component#watchdog' /var/app/vendor/bundle/ruby/3.4.0/gems/sidekiq-7.3.9/lib/sidekiq/component.rb:19:in 'block in Sidekiq::Component#safe_thread'
Additional context File can be provided
Maybe related to #1049 ?
Feel free to send your file to [email protected] so I could debug it. Thanks!
You should have received an eMail with the file. Thank you for your help
Maybe I have found the underlying problem: During tinkering I noticed that the points from the gpx-track in question were visible on the map when chosing the right time frame. So it might be that this track was once imported but later deleted. This would also mean, that the points of the track persisted and prevented a new import of the gpx-track... Might this be related to #1066 ?
In fact, if I start a completely new instance of Dawarich, the exact same file imports without a problem.