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

[Bug]: spawn EPERM #5260

Open
2 tasks done
NadimM17 opened this issue Jan 23, 2025 · 3 comments
Open
2 tasks done

[Bug]: spawn EPERM #5260

NadimM17 opened this issue Jan 23, 2025 · 3 comments
Labels
Type: Bug Something isn't working

Comments

@NadimM17
Copy link

Please confirm that you have:

  • Searched existing issues to see if your issue is a duplicate. (If you’ve found a duplicate issue, feel free to add additional information in a comment on it.)
  • Reproduced the issue in the latest CLI version.

In which of these areas are you experiencing a problem?

App

Expected behavior

The app should have been initialized properly.

Actual behavior

I am getting an error after trying 'shopify app init' command.

Image

Verbose output

Verbose output
2025-01-23T10:26:08.411Z: Running command app init
2025-01-23T10:26:08.421Z: Notifications to show: 0
2025-01-23T10:26:11.091Z: Ensuring that the user is authenticated with the Business Platform API with the following scopes:
[]

2025-01-23T10:26:11.091Z: Getting session store...
2025-01-23T10:26:11.092Z: Validating existing session against the scopes:
[
"openid",
"https://api.shopify.com/auth/shop.admin.graphql",
"https://api.shopify.com/auth/shop.admin.themes",
"https://api.shopify.com/auth/partners.collaborator-relationships.readonly",
"https://api.shopify.com/auth/shop.storefront-renderer.devtools",
"https://api.shopify.com/auth/partners.app.cli.access",
"https://api.shopify.com/auth/destinations.readonly",
"https://api.shopify.com/auth/organization.store-management",
"https://api.shopify.com/auth/organization.apps.manage"
]
For applications:
{
"businessPlatformApi": {
  "scopes": []
}
}

2025-01-23T10:26:11.093Z: Initiating the full authentication flow...
2025-01-23T10:26:11.094Z: Requesting device authorization code...
2025-01-23T10:26:11.094Z: Sending POST request to URL https://accounts.shopify.com/oauth/device_authorization
With request headers:
- User-Agent: Shopify CLI; v=3.74.0
- Keep-Alive: timeout=30
- Sec-CH-UA-PLATFORM: win32
- Content-Type: application/json
- Content-type: application/x-www-form-urlencoded

2025-01-23T10:26:11.652Z: Request to https://accounts.shopify.com/oauth/device_authorization completed in 557 ms
With response headers:
- cache-control: no-cache, no-store, private, must-revalidate, max-age=0
- content-type: application/json; charset=utf-8
- etag: W/"fabf284d19a953432298866af9dc31bd"
- server-timing: processing;dur=83, socket_queue;dur=2.059, edge;dur=1.046, util;dur=0.15, cfRequestDuration;dur=204.999924
- x-request-id: b4095564-f2a9-4e4c-a26e-0d20dc02deb1-1737627971

2025-01-23T10:26:11.656Z: Received device authorization code: {
"verification_uri": "https://shopify.com/activate",
"verification_uri_complete": "https://accounts.shopify.com/activate-with-code?device_code%5Buser_code%5D=[redacted]",
"expires_in": 599,
"interval": 5,
"device_code": "32c73c95-7568-4b09-9915-bd11a009cf35",
"user_code": [redacted]
}

To run this command, log in to Shopify.
User verification code: [redacted]
👉 Press any key to open the login page on your browser
╭─ error ──────────────────────────────────────────────────────────────────────╮
│                                                                              │
│  spawn EPERM                                                                 │
│                                                                              │
│  To investigate the issue, examine this stack trace:                         │
│    at spawn (node:internal/child_process:420)                                │
│    at spawn (node:child_process:753)                                         │
│    at baseOpen (Users/nadim.mouawad/AppData/Local/nvm/v22.13.1/node_modules  │
│    /@shopify/cli/dist/open-BHIF7E3E.js:120)                                  │
│    at async openURL (Users/nadim.mouawad/AppData/Local/nvm/v22.13.1/node_mo  │
│    dules/@shopify/cli/dist/chunk-L3FVJFIT.js:24750)                          │
│    at async requestDeviceAuthorization (Users/nadim.mouawad/AppData/Local/n  │
│    vm/v22.13.1/node_modules/@shopify/cli/dist/chunk-QRARFXIM.js:854)         │
│    at async executeCompleteFlow (Users/nadim.mouawad/AppData/Local/nvm/v22.  │
│    13.1/node_modules/@shopify/cli/dist/chunk-QRARFXIM.js:992)                │
│    at async ensureAuthenticated (Users/nadim.mouawad/AppData/Local/nvm/v22.  │
│    13.1/node_modules/@shopify/cli/dist/chunk-QRARFXIM.js:967)                │
│    at async ensureAuthenticatedBusinessPlatform                              │
│    (Users/nadim.mouawad/AppData/Local/nvm/v22.13.1/node_modules/@shopify/cl  │
│    i/dist/chunk-WKO4CJCL.js:85)                                              │
│    at businessPlatformToken (Users/nadim.mouawad/AppData/Local/nvm/v22.13.1  │
│    /node_modules/@shopify/cli/dist/index.js:169093)                          │
│    at session (Users/nadim.mouawad/AppData/Local/nvm/v22.13.1/node_modules/  │
│    @shopify/cli/dist/index.js:169065)                                        │
│                                                                              │
╰──────────────────────────────────────────────────────────────────────────────╯

2025-01-23T10:26:16.650Z:
Running system process:
· Command: npm prefix
· Working directory: C:/Users/nadim.mouawad/source/Shopify/Test App

2025-01-23T10:26:19.048Z: Obtaining the dependency manager in directory C:\Users\nadim.mouawad...
2025-01-23T10:26:19.049Z: Getting session store...
2025-01-23T10:26:19.050Z: Getting session store...
2025-01-23T10:26:19.550Z: Request to https://monorail-edge.shopifysvc.com/v1/produce completed in 489 ms
With response headers:
- x-request-id: 61c8b28c-67bc-48ed-a2ae-1b9735d9f831

2025-01-23T10:26:19.551Z: Analytics event sent: {
"command": "app init",
"time_start": 1737627968412,
"time_end": 1737627976564,
"total_time": 8152,
"success": false,
"cli_version": "3.74.0",
"ruby_version": "",
"node_version": "22.13.1",
"is_employee": false,
"uname": "windows amd64",
"env_ci": false,
"env_plugin_installed_any_custom": false,
"env_plugin_installed_shopify": "[\"@shopify/cli\"]",
"env_shell": "cmd.exe",
"env_device_id": "e58d9a14b532f47a6e984c5f83182812f6b83a03",
"env_cloud": "localhost",
"env_package_manager": "npm",
"env_is_global": true,
"env_auth_method": "none",
"cmd_app_warning_api_key_deprecation_displayed": false,
"cmd_all_timing_network_ms": 557,
"cmd_all_timing_prompts_ms": 4094,
"cmd_all_launcher": "unknown",
"cmd_all_topic": "app",
"cmd_all_plugin": "@shopify/app",
"cmd_all_verbose": true,
"cmd_all_path_override": true,
"cmd_all_path_override_hash": "56284e1dd2aecdfc0ce806365082596351fe0f48",
"cmd_all_timing_active_ms": 3500,
"cmd_all_exit": "expected_error",
"user_id": "unknown",
"request_ids": [],
"args": "--verbose",
"error_message": "spawn EPERM",
"env_plugin_installed_all": "[\"@shopify/cli\"]",
"metadata": "{\"extraPublic\":{},\"extraSensitive\":{}}"
}
2025-01-23T10:26:19.567Z: Reporting handled error to Bugsnag: spawn EPERM
2025-01-23T10:26:19.842Z:
Running system process:
· Command: npm prefix
· Working directory: C:/Users/nadim.mouawad/source/Shopify/Test App

2025-01-23T10:26:22.245Z: Obtaining the dependency manager in directory C:\Users\nadim.mouawad...
2025-01-23T10:26:22.246Z: Getting session store...

Reproduction steps

  1. Navigate to my directory
  2. Run 'shopify app init'
  3. When prompted to open log in page, press any key and the error will appear

Operating System

Windows 10

Shopify CLI version (shopify --version)

3.74.0

Shell

CMD

Node version (run node -v if you're not sure)

22.13.1

What language and version are you using in your application?

No response

@NadimM17 NadimM17 added the Type: Bug Something isn't working label Jan 23, 2025
@isaacroldan
Copy link
Contributor

Hi @NadimM17, seems like your terminal or npm installation don't have enough permissions to open a browser link (EPERM error).

Can you try running in PowerShell?
If not, I'd recommend searching on the internet on how to fix the EPERM error, this is specific to your system and not a CLI error i'm afraid.

@NadimM17
Copy link
Author

NadimM17 commented Jan 23, 2025

Hello @isaacroldan
Thank you for your prompt reply I really appreciate it.
I will try running it on Powershell.

In addition I want to add that I have installed npm and Shopify cli using admin permissions. Moreover, I can use the commands ‘npm open url’ and ‘start url’ to open my browser from the command prompt window.

Maybe because I am using my company’s machine.
I will also try to run it on my own personal machine as well.

I will let you know with updates if you want.

Edit: I accidentally closed the issue. I will reopen it

@NadimM17
Copy link
Author

Reopening the issue as it was closed by accident

@isaacroldan isaacroldan reopened this Jan 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants