Build Failed /opt/render/project/src/config/environment.rb:5:in `<main>'

The thrown error looks to be due to ActiveSupport::MessageEncryptor::InvalidMessage.

Other community members have encountered this error in the past. You might find some insight from those posts.

And a longer thread from a GitHub Issue on the Rails repo (possibly an older version, but looks like it may contain guidance that’s still relevant):