Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Random read failures #59

Open
kangguru opened this issue Apr 24, 2024 · 1 comment
Open

Random read failures #59

kangguru opened this issue Apr 24, 2024 · 1 comment

Comments

@kangguru
Copy link

Hej there. So here's what is happening in our application:

We're sending out some mails via delayed_job and action_mailer like many other apps are likely doing, these mails contain urls to images stored with active_storage. Every now and then building the mail templates is failing with obscure errors happening in mini_mime. These are:

When we try those calls in a console ... everything works. When we stare at the problem ... it disappears :)

It kind of looks vaguely familiar to #37 but that might be misleading.

So, long speech :) Do you have any idea why this could be happening? Any thoughts and ideas are welcome.

Thanks!

@gee-forr
Copy link

Hey there, I just want to confirm I'm seeing the same issue on my side. I've locked mini_mime to 1.1.2 in the meantime, which works fine for now:

gem 'mini_mime', '= 1.1.2'

I'm on Ruby 3.0.6 (both ARM and x86 versions), running via Rails 6.1.7.8 (I know, I know, we're due to upgrade soon :) ).

I'm somewhat luckier than you @kangguru as my failures are repeatable during rspec runs. This is a sample of my test failure. Interesting bit is the last 4 lines

  5) NoImsiReportMailer#send_email when a user has not been specified notifies the exception handler of an error
     Failure/Error: ExceptionHelper.error e
       ExceptionHelper received :error with unexpected arguments
         expected: (NoMethodError)
              got: (#<EOFError: end of file reached>)
       Diff:
       @@ -1 +1 @@
       -[NoMethodError]
       +[#<EOFError: end of file reached>]
     # ./app/mailers/no_imsi_report_mailer.rb:10:in `rescue in send_email'
     # ./app/mailers/no_imsi_report_mailer.rb:2:in `send_email'
     # ./spec/mailers/no_imsi_report_mailer_spec.rb:53:in `block (4 levels) in <top (required)>'
     # ./spec/rails_helper.rb:71:in `block (3 levels) in <top (required)>'
     # /gems/ruby/3.0.0/gems/database_cleaner-core-2.0.1/lib/database_cleaner/strategy.rb:30:in `cleaning'
     # /gems/ruby/3.0.0/gems/database_cleaner-core-2.0.1/lib/database_cleaner/cleaners.rb:34:in `block (2 levels) in cleaning'
     # /gems/ruby/3.0.0/gems/database_cleaner-core-2.0.1/lib/database_cleaner/cleaners.rb:35:in `cleaning'
     # ./spec/rails_helper.rb:70:in `block (2 levels) in <top (required)>'
     # ------------------
     # --- Caused by: ---
     # EOFError:
     #   end of file reached
     #   /gems/ruby/3.0.0/gems/mini_mime-1.1.5/lib/mini_mime.rb:121:in `readline'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants