Expand my Community achievements bar.

Submissions are now open for the 2026 Adobe Experience Maker Awards.

Error while executing "aio login"

Avatar

Level 1

trying to execute "aio login" and result is:

Visit this url to log in:
https://aio-login.adobeioruntime.net/api/v1/web/default/applogin?id=********&port=*****&redirect_uri=https%3A%2F%2Faio-login.adobeioruntime.net%2Fapi%2Fv1%2Fweb%2Fdefault%2Fapplogin%2Flogin-success
- Waiting for browser loginnode:events:497
      throw er; // Unhandled 'error' event
      ^

Error: spawn undefined\System32\WindowsPowerShell\v1.0\powershell ENOENT
    at ChildProcess._handle.onexit (node:internal/child_process:285:19)
    at onErrorNT (node:internal/child_process:483:16)
    at process.processTicksAndRejections (node:internal/process/task_queues:90:21)
Emitted 'error' event on ChildProcess instance at:
    at ChildProcess._handle.onexit (node:internal/child_process:291:12)
    at onErrorNT (node:internal/child_process:483:16)
    at process.processTicksAndRejections (node:internal/process/task_queues:90:21) {
  errno: -4058,
  code: 'ENOENT',
  syscall: 'spawn undefined\\System32\\WindowsPowerShell\\v1.0\\powershell',
  path: 'undefined\\System32\\WindowsPowerShell\\v1.0\\powershell',
  spawnargs: [
    '-NoProfile',
    '-NonInteractive',
    '–ExecutionPolicy',
    'Bypass',
    '-EncodedCommand',
    'UwB0AGEAcgB0ACAAIgBoAHQAdABwAHMAOgAvAC8AYQBpAG8ALQBsAG8AZwBpAG4ALgBhAGQAbwBiAGUAaQBvAHIAdQBuAHQAaQBtAGUALgBuAGUAdAAvAGEAcABpAC8AdgAxAC8AdwBlAGIALwBkAGUAZgBhAHUAbAB0AC8AYQBwAHAAbABvAGcAaQBuAD8AaQBkAD0ANgAwAGQAMgBkADUAMAAyACYAcABvAHIAdAA9ADUAMAAyADEAMgAmAHIAZQBkAGkAcgBlAGMAdABfAHUAcgBpAD0AaAB0AHQAcABzACUAMwBBACUAMgBGACUAMgBGAGEAaQBvAC0AbABvAGcAaQBuAC4AYQBkAG8AYgBlAGkAbwByAHUAbgB0AGkAbQBlAC4AbgBlAHQAJQAyAEYAYQBwAGkAJQAyAEYAdgAxACUAMgBGAHcAZQBiACUAMgBGAGQAZQBmAGEAdQBsAHQAJQAyAEYAYQBwAHAAbABvAGcAaQBuACUAMgBGAGwAbwBnAGkAbgAtAHMAdQBjAGMAZQBzAHMAIgA='
  ]
}

Node.js v22.19.0

 

I've trying to open link (from previous result) manually and after sign in and choosing organization i've see the next result: 

DmitriyDe_0-1760942164977.png

When "Contacting the Adobe CLI..." is complete - next text is appears 

 

DmitriyDe_1-1760942183212.png

By clicking the link i've seen the next text:

 

DmitriyDe_2-1760942192278.png

 

Error described above appears in "cmd (command prompt)" and "PowerShell"

 

sometimes "aio login" can be executed without any problems (default browser automatically opens and after sign in i can use aio)

2 Replies

Avatar

Level 3

Hi @DmitriyDe 

 

 

Option 1: Check Environment Variables

  1. Open Command Prompt.

  2. Run:

     
    echo %SystemRoot%

    You should see something like:

     
    C:\Windows

    If it’s empty, that’s the issue.

  3. Fix it manually:

    • Press Windows + R → sysdm.cpl → Advanced → Environment Variables

    • Under System variables, click New (if not exist) and add:

       
      Variable name: SystemRoot Variable value: C:\Windows
    • Also check ComSpec—it should be:

       
      C:\Windows\System32\cmd.exe
  4. Restart your terminal and try:

     
    aio login

Option 2: Set PowerShell Path Manually

If your PowerShell path isn’t resolving, set it before running the command:

 

 
setx PATH "%PATH%;C:\Windows\System32\WindowsPowerShell\v1.0"

 

 

Then restart the command prompt and run:

 

 
aio login

 

 

Option 3: Force Browser Launch

Sometimes the CLI fails to open a browser automatically. You can use:

 

 
aio login --no-launch

 

This prints the URL to the terminal—just copy-paste it into your browser manually.

After successful login, it should say:

 

 
✔ Successfully logged in

 

 

Option 4: Reinstall Adobe I/O CLI

If the issue persists:

 

 
npm uninstall -g @adobe/aio-cli npm install -g @adobe/aio-cli

 

 

Option 5: Node.js Path Issue

Sometimes Node itself doesn’t resolve PowerShell correctly.
Ensure you’re using a stable version (LTS preferred):

 

 
node -v
 

If you’re on v22.x (as shown in your log), downgrade to v20.x LTS—Adobe CLI has better stability there.

Avatar

Level 1

 

 

Hi, Syed! Thanks for the answer, but unfortunately nothing helped.

.

I should clarify. Sometimes I can perform aio login, but I don't know what's causing it.

 

It seems like sometimes when I run the aio login command, an error occurs because aio thinks I'm already logged in, causing some sort of conflict.

 

Simply waiting has helped me many times. A couple of days later, when I returned to this problem, it simply disappeared and I was able to log in without any problems.

 

PS: aio logout doesn't help.