pm2 plus authentication error
Open
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 43.3k
- Forks
- 2.7k
- PR merge metrics
- No merged PRs in 30d
Description
What's going wrong?

pm2 plus command shows error
[PM2 I/O] Authenticating ...
[PM2 I/O] Unexpected error : Missing mandatory field refresh_token to make a POST request on /api/oauth/token
How could we reproduce this issue?
pm2 plus and login
Supporting information
$ pm2 report
--- PM2 report ----------------------------------------------------------------
Date : Sat Dec 18 2021 10:58:20 GMT+0000 (Coordinated Universal Time)
===============================================================================
--- Daemon -------------------------------------------------
pm2d version : 5.1.2
node version : 16.5.0
node path : /home/ec2-user/.nvm/versions/node/v16.5.0/bin/pm2
argv : /home/ec2-user/.nvm/versions/node/v16.5.0/bin/node,/home/ec2-user/.nvm/versions/node/v16.5.0/lib/node_modules/pm2/lib/Daemon.js
argv0 : node
user : ec2-user
uid : 1000
gid : 1000
uptime : 5min
===============================================================================
--- CLI ----------------------------------------------------
local pm2 : 5.1.2
node version : 16.5.0
node path : /home/ec2-user/.nvm/versions/node/v16.5.0/bin/pm2
argv : /home/ec2-user/.nvm/versions/node/v16.5.0/bin/node,/home/ec2-user/.nvm/versions/node/v16.5.0/bin/pm2,report
argv0 : node
user : ec2-user
uid : 1000
gid : 1000
===============================================================================
--- System info --------------------------------------------
arch : x64
platform : linux
type : Linux
cpus : Intel(R) Xeon(R) CPU E5-2676 v3 @ 2.40GHz
cpus nb : 1
freemem : 217161728
totalmem : 1030275072
home : /home/ec2-user
===============================================================================
--- PM2 list -----------------------------------------------
┌─────┬─────────┬─────────────┬─────────┬─────────┬──────────┬────────┬──────┬───────────┬──────────┬──────────┬──────────┬──────────┐
│ id │ name │ namespace │ version │ mode │ pid │ uptime │ ↺ │ status │ cpu │ mem │ user │ watching │
├─────┼─────────┼─────────────┼─────────┼─────────┼──────────┼────────┼──────┼───────────┼──────────┼──────────┼──────────┼──────────┤
│ 0 │ auth │ default │ 2.0.0 │ cluster │ 16304 │ 5m │ 0 │ online │ 0.1% │ 53.5mb │ ec2-user │ enabled │
│ 1 │ auth │ default │ 2.0.0 │ cluster │ 16305 │ 5m │ 0 │ online │ 0.1% │ 53.6mb │ ec2-user │ enabled │
└─────┴─────────┴─────────────┴─────────┴─────────┴──────────┴────────┴──────┴───────────┴──────────┴──────────┴──────────┴──────────┘
[PM2][WARN] Current process list is not synchronized with saved list. App auth_test auth_test differs. Type 'pm2 save' to synchronize.
===============================================================================
--- Daemon logs --------------------------------------------
/home/ec2-user/.pm2/pm2.log last 20 lines:
PM2 | 2021-12-18T10:53:12: PM2 log: [Watch] Start watching auth
PM2 | 2021-12-18T10:53:12: PM2 log: App [auth:1] starting in -cluster mode-
PM2 | 2021-12-18T10:53:13: PM2 log: App [auth:0] online
PM2 | 2021-12-18T10:53:13: PM2 log: [Watch] Start watching auth_test
PM2 | 2021-12-18T10:53:13: PM2 log: App [auth_test:2] starting in -cluster mode-
PM2 | 2021-12-18T10:53:13: PM2 log: App [auth:1] online
PM2 | 2021-12-18T10:53:13: PM2 log: [Watch] Start watching auth_test
PM2 | 2021-12-18T10:53:13: PM2 log: App [auth_test:3] starting in -cluster mode-
PM2 | 2021-12-18T10:53:14: PM2 log: App [auth_test:2] online
PM2 | 2021-12-18T10:53:14: PM2 log: App [auth_test:3] online
PM2 | 2021-12-18T10:55:01: PM2 log: [Watch] Stop watching auth_test
PM2 | 2021-12-18T10:55:01: PM2 log: Stopping app:auth_test id:2
PM2 | 2021-12-18T10:55:01: PM2 log: [Watch] Stop watching auth_test
PM2 | 2021-12-18T10:55:01: PM2 log: Stopping app:auth_test id:3
PM2 | 2021-12-18T10:55:01: PM2 log: App name:auth_test id:2 disconnected
PM2 | 2021-12-18T10:55:01: PM2 log: App [auth_test:2] exited with code [0] via signal [SIGINT]
PM2 | 2021-12-18T10:55:01: PM2 log: App name:auth_test id:3 disconnected
PM2 | 2021-12-18T10:55:01: PM2 log: App [auth_test:3] exited with code [0] via signal [SIGINT]
PM2 | 2021-12-18T10:55:01: PM2 log: pid=16326 msg=process killed
PM2 | 2021-12-18T10:55:01: PM2 log: pid=16332 msg=process killed
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by running the reported pm2 plus login flow with PM2 5.1.2 and reviewing the authentication request that produces the missing refresh_token error. Done means the command can authenticate successfully without that error; the issue provides no file or test entry point.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, node.js
- Domain
- authentication, cli
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100