MessageEncryptor::InvalidMessage: missing separator - Can't Deploy

HI, anyone already with ActiveSupport::MessageEncryptor::InvalidMessage: missing separator problem? Here is my entire log:

✖ release_command failed
-------
Error release_command failed running on machine 568307e7b27008 with exit code 1.
Checking logs: fetching the last 100 lines below:
2024-12-19T14:07:02Z 2024-12-19T14:07:02.967762953 [01JFFKW8JP88GJ7NTWA0NQWRZ7:main] Running Firecracker v1.7.0
2024-12-19T14:07:03Z [    0.040685] Spectre V2 : WARNING: Unprivileged eBPF is enabled with eIBRS on, data leaks possible via Spectre v2 BHB attacks!
2024-12-19T14:07:03Z  INFO Starting init (commit: 1df1d0a0)...
2024-12-19T14:07:03Z  INFO Preparing to run: `/rails/bin/docker-entrypoint ./bin/rails db:prepare` as 1000
2024-12-19T14:07:03Z  INFO [fly api proxy] listening at /.fly/api
2024-12-19T14:07:03Z Machine started in 868ms
2024-12-19T14:07:03Z 2024/12/19 14:07:03 INFO SSH listening listen_address=[fdaa:9:73e8:a7b:33f:b35a:40bc:2]:22 dns_server=[fdaa::3]:53
2024-12-19T14:07:05Z bin/rails aborted!
2024-12-19T14:07:05Z ActiveSupport::MessageEncryptor::InvalidMessage: missing separator
2024-12-19T14:07:05Z /rails/config/initializers/devise.rb:17:in `block in <main>'
2024-12-19T14:07:05Z /rails/config/initializers/devise.rb:11:in `<main>'
2024-12-19T14:07:05Z /rails/config/environment.rb:5:in `<main>'
2024-12-19T14:07:05Z /rails/bin/rails:4:in `<main>'
2024-12-19T14:07:05Z Tasks: TOP => db:prepare => db:load_config => environment
2024-12-19T14:07:05Z (See full trace by running task with --trace)
2024-12-19T14:07:06Z  INFO Main child exited normally with code: 1

Actions Taken:

  • Already reset credentials.yml.enc using fly console connection;
  • Reset/Remove RAILS_SECRET_KEY
  • Generate new credentials.yml.enc

Any of this seems work properly, anyone could help me?
Thanks!

By any chance do you have a file by the name of config/credentials/production.key?

Thanks rubys,

I don’t have this file in VM, there’s a way to create it?

No, don’t create it. One common problem is to have two sets of credentials and use the wrong one. We’ve now ruled that out.

Rereading, I see you said:

RAILS_SECRET_KEY

That’s not the correct variable. See: Environment Configuration · Fly Docs

1 Like

Enviroment variable RAILS_MASTER_KEY has already been created when I started.

Any other solution in mind?

I’ve tried follow this instructions but without success:

Does RAILS_MASTER_KEY have the right value?

Compare the results of

fly ssh console -C "printenv RAILS_MASTER_KEY"

… with the contents of config/master.key

There’s no config/master.key created on the rails fly instance.
I tried insert a docker command to created it using the printenv, but it returns permission denied

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.