Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing cookie.json #34

Open
CasvalDOT opened this issue Jun 7, 2020 · 3 comments
Open

Missing cookie.json #34

CasvalDOT opened this issue Jun 7, 2020 · 3 comments

Comments

@CasvalDOT
Copy link

Hi,
after i've installed node 14 the cli seems no work anymore.
Each command generated this warning:

Warning: Accessing non-existent property 'padLevels' of module exports inside circular dependency

Each command i run return the following error:

{ errno:-2, code:'ENOENT', syscall:'open', path: '/usr/lib/node_modules/passbolt_cli/app/tmp/cookie.json' }

I've created manuallty the tmp folder adding a blank file called cookie.json, and then I've change the ownership of the folder:

sudo chown -R <my_user>:<my_user> /usr/lib/node_modules/passbolt_cli/app/tmp

now it works again, but I supposed this is not the correct behavior. I've forgot something in the configuration procedure or it is a bug?

PS. the passbolt_cli is installed globally

@stripthis
Copy link
Member

Hi there,

Sorry for the late reply, by default you should have a app/tmp directory created, as there is a file named "empty", as placeholder. Maybe your issue was that it was not writable by the user using passbolt cli globally?

@CasvalDOT
Copy link
Author

Thanks for the reply and sorry for the late answer. Surely my user has not write permission to /usr folder running the CLI (probabily only with sudo it can write in /usr directory). I don't know if this folder should be created during installation process. Maybe is better create this folder in user home directory instead. What do you think? This should prevent this behavior.

@almereyda
Copy link

This also happened to me with a global install, yet within an NVM environment:

$ passbolt auth login
/home/yala/.nvm/versions/node/v14.18.2/lib/node_modules/passbolt_cli/node_modules/tough-cookie-file-store/lib/file-store.js:214
        if (err) throw err;
                 ^

[Error: ENOENT: no such file or directory, open '/home/yala/.nvm/versions/node/v14.18.2/lib/node_modules/passbolt_cli/app/tmp/cookie.json'] {
  errno: -2,
  code: 'ENOENT',
  syscall: 'open',
  path: '/home/yala/.nvm/versions/node/v14.18.2/lib/node_modules/passbolt_cli/app/tmp/cookie.json'
}

Creating the tmp directory directory was sufficient for this to continue to work:

$ mkdir /home/yala/.nvm/versions/node/v14.18.2/lib/node_modules/passbolt_cli/app/tmp
$ passbolt auth login
$ ls /home/yala/.nvm/versions/node/v14.18.2/lib/node_modules/passbolt_cli/app/tmp
cookie.json

It appears this is a packaging failure, as the node_modules directories should not be written other than by NPM, and we have explicitly created a ~/.config/passbolt/ directory during setup, where such transitory data could also be kept.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants