'Unknown cipher' error when using adonisjs in electron

Hello, I am buildind a POC using Electron and AdonisJS, I have a JWT auth working using Adonis, but when application is packed with electron I have a cipher error when try to login on my app.

async authenticate({request, auth}) {
    const {username, password} = request.all();

    const token = await auth
      .attempt(username, password)

      token.user = await auth.validate(username, password, true)

    return {
      data: token,
      message: 'logged_in',
      success: true

the error I have

‘Unknown cipher’ error when using adonisjs in electron

Package versions

AdonisJS: 4.1
Electron: 6.0.12
adonisjs/framework: 5.0.9


1 Like

I have the same problem

Hey guys! :wave:

I have pushed a fix, may you try to install @adonisjs/framework from Github using the branch 5.0.13?

Link regarding this issue: https://github.com/adonisjs/adonis-framework/issues/1132

I’ve found a solution while we wait for the fix.
the problem is the dependency of node-cookie, it is an obsolete version
you can solve the problem like this:
create a file named npm-shrinkwrap.json

  "dependencies": {
    "node-cookie": {
      "version": "2.1.1",
      "requires": {
        "cookie": "^0.3.1",
        "cookie-signature": "^1.1.0"
      "dependencies": {
        "simple-encryptor": {
          "version": "3.0.0",
          "requires": {
            "scmp": "2.0.0"

1 Like

same problem