[domo CLI] login issue in domo app CLI after performing npm start

Description

When attempting to develop the custom Domo app locally and run the local server using npm start, an authentication error is returned, prompting the user to log in to Domo using domo login. After successfully logging in, attempting to use npm start again returns the same authentication error. However, it perfectly works if I publish the code to the domo data asset library. The card can be changed accordingly, this mean that domo login works for domo publish.

Expected behavior

The local server should start successfully without requiring repeated authentication after successful login.

Actual behavior

The local server is not able to start and requires repeated authentication after every login attempt.

Steps to reproduce

Run the command npm start to start the local server.
Observe the authentication error.

D:\Git\collapse-table-domo-js\node_modules\react-scripts\scripts\start.js:19
  throw err;
  ^
Error: Not authenticated. Please login using "domo login"
    at Transport.verifyLogin (D:\Git\collapse-table-domo-js\node_modules\@domoinc\ryuu-proxy\dist\lib\Transport\index.js:252:19)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
Node.js v18.7.0

Run the command domo login to log in to Domo.

PS D:\Git\collapse-table-domo-js> domo login
? Domo instance e.g. company.domo.com  company.domo.com
✓ Login to company.domo.com successful.
Welcome, Shawn.

Run the command npm start again.

D:\Git\collapse-table-domo-js\node_modules\react-scripts\scripts\start.js:19
  throw err;
  ^
Error: Not authenticated. Please login using "domo login"
    at Transport.verifyLogin (D:\Git\collapse-table-domo-js\node_modules\@domoinc\ryuu-proxy\dist\lib\Transport\index.js:252:19)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
Node.js v18.7.0

Observe the authentication error is still present.

Possible causes

It is possible that there is a bug or issue with the proxy server setup that is causing repeated authentication requests. Additionally, if the instance has a firewall setup that may be blocking access to the local server, this may also cause authentication issues.

Additional Information

Browser: Chrome
Operating System: Windows 11

Conclusion

The issue would not stop the dev progress, but it has a significant impact on the dev efficiency (as you can't see the living changes on local server). Otherwise, I can publish directly to the domo. Any suggestions and ideas for solving this issue would be appreciated!

Best Answer

Answers