Skip to content

Error occurring when precompiling assets in v4.2.0-beta1 #26541

Description

@DalekDave

Steps to reproduce the problem

  1. Make changes to assets, such as toot max length change as per instructions in https://kcore.org/2022/12/18/increasing-mastodon-post-length/
  2. Execute RAILS_ENV=production bundle exec rails assets:precompile
  3. Precompilation results in an error message. Error output at the command line:
mastodon@burnout:~/live$ RAILS_ENV=production bundle exec rails assets:precompile
Compiling...
Compilation failed:
node:internal/crypto/hash:69
  this[kHandle] = new _Hash(algorithm, xofLen);
                  ^

Error: error:0308010C:digital envelope routines::unsupported
    at new Hash (node:internal/crypto/hash:69:19)
    at Object.createHash (node:crypto:133:10)
    at module.exports (/home/mastodon/live/node_modules/webpack/lib/util/createHash.js:135:53)
    at ConcatenatedModule._createIdentifier (/home/mastodon/live/node_modules/webpack/lib/optimize/ConcatenatedModule.js:563:16)
    at new ConcatenatedModule (/home/mastodon/live/node_modules/webpack/lib/optimize/ConcatenatedModule.js:445:27)
    at /home/mastodon/live/node_modules/webpack/lib/optimize/ModuleConcatenationPlugin.js:250:26
    at SyncBailHook.eval [as call] (eval at create (/home/mastodon/live/node_modules/tapable/lib/HookCodeFactory.js:19:10), <anonymous>:7:16)
    at SyncBailHook.lazyCompileHook (/home/mastodon/live/node_modules/tapable/lib/Hook.js:154:20)
    at /home/mastodon/live/node_modules/webpack/lib/Compilation.js:1351:37
    at AsyncSeriesHook.eval [as callAsync] (eval at create (/home/mastodon/live/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:6:1)
    at AsyncSeriesHook.lazyCompileHook (/home/mastodon/live/node_modules/tapable/lib/Hook.js:154:20)
    at Compilation.seal (/home/mastodon/live/node_modules/webpack/lib/Compilation.js:1342:27)
    at /home/mastodon/live/node_modules/webpack/lib/Compiler.js:675:18
    at /home/mastodon/live/node_modules/webpack/lib/Compilation.js:1261:4
    at AsyncSeriesHook.eval [as callAsync] (eval at create (/home/mastodon/live/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:24:1)
    at AsyncSeriesHook.lazyCompileHook (/home/mastodon/live/node_modules/tapable/lib/Hook.js:154:20)
    at Compilation.finish (/home/mastodon/live/node_modules/webpack/lib/Compilation.js:1253:28)
    at /home/mastodon/live/node_modules/webpack/lib/Compiler.js:672:17
    at eval (eval at create (/home/mastodon/live/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:11:1)
    at /home/mastodon/live/node_modules/webpack/lib/Compilation.js:1185:12
    at /home/mastodon/live/node_modules/webpack/lib/Compilation.js:1097:9
    at process.processTicksAndRejections (node:internal/process/task_queues:77:11) {
  opensslErrorStack: [ 'error:03000086:digital envelope routines::initialization error' ],
  library: 'digital envelope routines',
  reason: 'unsupported',
  code: 'ERR_OSSL_EVP_UNSUPPORTED'
}

Node.js v18.17.1
  1. Restart the Mastodon services.
  2. Do a complete refresh of the Mastodon Web interface and try to post a toot that exceeds 500 characters.

Expected behaviour

Maximum toot length should have been changed to, for example, 1000

Actual behaviour

No change in maximum toot length. Cannot post more than 500 characters. 500-character limit still displayed in toot editor.

Detailed description

I'd like to increase the toot max length (that subject is covered in #12265 )
I carefully followed the instructions at https://kcore.org/2022/12/18/increasing-mastodon-post-length/
Precompilation fails after making the changes (see above command line output)
When I try to precompile a second time, I get the following output:

mastodon@burnout:~/live$ RAILS_ENV=production bundle exec rails assets:precompile
Everything's up-to-date. Nothing to do

The changes I made are still in the code.

When I revert the changes, I still get the above-pasted error message.
When I precompile a second time, I get the above "Everything's up-to-date" message.

Is the precompilation error normal?

Mastodon instance

burnout.cafe

Mastodon version

v4.2.0-beta1

Technical details

If this is happening on your own Mastodon server, please fill out those:

  • OS: Ubuntu server 22.04
  • Ruby version: ruby 3.2.2 (2023-03-30 revision e51014f9c0) [x86_64-linux]
  • Node.js version: v18.17.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingstatus/to triageThis issue needs to be triaged

    Type

    Fields

    No fields configured for Bug.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions