sj26 / mailcatcher

Catches mail and serves it through a dream.
http://mailcatcher.me
MIT License
6.23k stars 571 forks source link

Install fails in GIT Action since yesterday #528

Closed stell closed 1 year ago

stell commented 1 year ago

Operating system tested with Ubuntu latest and 20.04

Also tried sudo gem install --pre mailcatcher

Any idea?

Run sudo gem install mailcatcher --no-update-sources --no-document
  sudo gem install mailcatcher --no-update-sources --no-document
  mailcatcher
  shell: /usr/bin/bash -e {0}
  env:
    COMPOSER_PROCESS_TIMEOUT: 0
    COMPOSER_NO_INTERACTION: 1
    COMPOSER_NO_AUDIT: 1
Building native extensions. This could take a while...
Successfully installed eventmachine-1.0.9.1
Successfully installed net-protocol-0.2.0
Successfully installed net-imap-0.3.1
Successfully installed mail-2.8.0
Successfully installed rack-1.6.13
Successfully installed rack-protection-1.5.5
Successfully installed tilt-2.0.11
Successfully installed sinatra-1.4.8
Successfully installed sqlite3-1.5.4-x86_64-linux
Successfully installed daemons-1.4.1
Building native extensions. This could take a while...
Successfully installed thin-1.5.1
Successfully installed skinny-0.2.4
Successfully installed mailcatcher-0.8.2
13 gems installed
/usr/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:168:in `require': cannot load such file -- mail/indifferent_hash (LoadError)
    from /usr/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:168:in `rescue in require'
    from /usr/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:156:in `require'
    from /var/lib/gems/2.7.0/gems/mail-2.8.0/lib/mail.rb:14:in `<module:Mail>'
    from /var/lib/gems/2.7.0/gems/mail-2.8.0/lib/mail.rb:3:in `<top (required)>'
    from /usr/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:92:in `require'
    from /usr/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:92:in `require'
    from /var/lib/gems/2.7.0/gems/mailcatcher-0.8.2/lib/mail_catcher/mail.rb:5:in `<top (required)>'
    from /usr/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:92:in `require'
    from /usr/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:92:in `require'
    from /var/lib/gems/2.7.0/gems/mailcatcher-0.8.2/lib/mail_catcher/smtp.rb:5:in `<top (required)>'
    from /usr/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:92:in `require'
    from /usr/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:92:in `require'
    from /var/lib/gems/2.7.0/gems/mailcatcher-0.8.2/lib/mail_catcher.rb:183:in `block (2 levels) in run!'
    from /var/lib/gems/2.7.0/gems/mailcatcher-0.8.2/lib/mail_catcher.rb:233:in `rescue_port'
    from /var/lib/gems/2.7.0/gems/mailcatcher-0.8.2/lib/mail_catcher.rb:182:in `block in run!'
    from /var/lib/gems/2.7.0/gems/eventmachine-1.0.9.1/lib/eventmachine.rb:193:in `run_machine'
    from /var/lib/gems/2.7.0/gems/eventmachine-1.0.9.1/lib/eventmachine.rb:193:in `run'
    from /var/lib/gems/2.7.0/gems/mailcatcher-0.8.2/lib/mail_catcher.rb:180:in `run!'
    from /var/lib/gems/2.7.0/gems/mailcatcher-0.8.2/bin/mailcatcher:6:in `<top (required)>'
    from /usr/local/bin/mailcatcher:23:in `load'
    from /usr/local/bin/mailcatcher:23:in `<main>'
/usr/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:92:in `require': cannot load such file -- mail/indifferent_hash (LoadError)
    from /usr/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:92:in `require'
    from /var/lib/gems/2.7.0/gems/mail-2.8.0/lib/mail.rb:14:in `<module:Mail>'
    from /var/lib/gems/2.7.0/gems/mail-2.8.0/lib/mail.rb:3:in `<top (required)>'
    from /usr/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:92:in `require'
    from /usr/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:92:in `require'
    from /var/lib/gems/2.7.0/gems/mailcatcher-0.8.2/lib/mail_catcher/mail.rb:5:in `<top (required)>'
    from /usr/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:92:in `require'
    from /usr/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:92:in `require'
    from /var/lib/gems/2.7.0/gems/mailcatcher-0.8.2/lib/mail_catcher/smtp.rb:5:in `<top (required)>'
    from /usr/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:92:in `require'
    from /usr/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:92:in `require'
    from /var/lib/gems/2.7.0/gems/mailcatcher-0.8.2/lib/mail_catcher.rb:183:in `block (2 levels) in run!'
    from /var/lib/gems/2.7.0/gems/mailcatcher-0.8.2/lib/mail_catcher.rb:233:in `rescue_port'
    from /var/lib/gems/2.7.0/gems/mailcatcher-0.8.2/lib/mail_catcher.rb:182:in `block in run!'
    from /var/lib/gems/2.7.0/gems/eventmachine-1.0.9.1/lib/eventmachine.rb:193:in `run_machine'
    from /var/lib/gems/2.7.0/gems/eventmachine-1.0.9.1/lib/eventmachine.rb:193:in `run'
    from /var/lib/gems/2.7.0/gems/mailcatcher-0.8.2/lib/mail_catcher.rb:180:in `run!'
    from /var/lib/gems/2.7.0/gems/mailcatcher-0.8.2/bin/mailcatcher:6:in `<top (required)>'
    from /usr/local/bin/mailcatcher:23:in `load'
    from /usr/local/bin/mailcatcher:23:in `<main>'
Starting MailCatcher v0.8.2
Error: Process completed with exit code 1.
sj26 commented 1 year ago

Sorry, I don't know what's going on there 🤔

dspearson commented 1 year ago

Workaround: instead of using gem install, use eval $(/home/linuxbrew/.linuxbrew/bin/brew shellenv) && brew install mailcatcher. Execution time increases during setup phase, but the issue goes away. I compared successful vs failing runs and it may be related to an update of the base image used by GHA, since that was the only thing I noted as being different.

stell commented 1 year ago

Here is the issue: https://github.com/mikel/mail/issues/1489 Managed to fix it by doing this:

- name: Install & run mailcatcher
  run: |
    sudo gem install mailcatcher --no-update-sources --no-document
    sudo chmod 644 /var/lib/gems/3.0.0/gems/mail-2.8.0/lib/mail/indifferent_hash.rb
    sudo chmod 644 /var/lib/gems/3.0.0/gems/mail-2.8.0/lib/mail/fields.rb
    sudo chmod 644 /var/lib/gems/3.0.0/gems/mail-2.8.0/lib/mail/elements.rb
    mailcatcher
sj26 commented 1 year ago

Sounds like an upstream issue in mail which has been fixed.