Closed mikefortney closed 5 months ago
👋 Thanks for opening the issue.
Unfortunately, I'm not able to reproduce it. Some questions:
lsof -i:3457
to check if the default port is in use?yarn dev --graphiql-port 5555 --verbose
?Hello!
It is happening with the latest CLI version, on both an intel based Mac, and an M1 based Mac. I have checked using lsof
and none of the ports I’ve tried to use are in use. Here is the verbose output of the dev command with port 5555. Additionally, I used the logout command first so you can see in the output that a message is shown that I have to kill a port in order to login, so I wonder if it is something similar...
➜ inspired-shopify-app git:(mf-test-20241315) ✗ yarn dev --graphiql-port 5555 --verbose
2024-03-20T16:05:10.352Z: Running command app dev
2024-03-20T16:05:10.361Z: Getting a random port...
2024-03-20T16:05:10.366Z: Random port obtained: 53473
2024-03-20T16:05:10.367Z: Ensuring that the user is authenticated with the Partners API with the following scopes:
[]
2024-03-20T16:05:10.368Z: Getting session store...
2024-03-20T16:05:10.369Z: 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"
]
For applications:
{
"partnersApi": {
"scopes": []
}
}
2024-03-20T16:05:10.369Z: Initiating the full authentication flow...
2024-03-20T16:05:10.370Z: Authorizing through Identity's website...
? Authentication requires a port 3456 that's unavailable because it's running another process. Terminate that process?
✔ Yes, terminate process in order to log in now
To run this command, log in to Shopify Partners.
👉 Press any key to open the login page on your browser
Auto-open timed out. Open the login page: Log in to Shopify Partners
2024-03-20T16:05:43.727Z: Reading the content of file at ***@***.***/cli-kit/assets/success.html...
2024-03-20T16:05:44.099Z: Reading the content of file at ***@***.***/cli-kit/assets/style.css...
2024-03-20T16:05:44.231Z: Authorization code received. Exchanging it for a CLI token...
2024-03-20T16:05:44.232Z: Sending POST request to URL https://accounts.shopify.com/oauth/token?grant_type=authorization_code&code=aEdHQlJueWZWSGx1dllzeU0vRkcyNFpLL1Byb0U5UmhhM0E5UFV3R2F4RXAzY2xzZXJtMm5KSGxqSTNqbHdGRm0zU1VpZzQrRmt5VU83b3o4d0NDUUNBRiszTCtuWTQ1aEdWL3lMUjhNZERBZUVqa21QeWpnRGpmbU5zOW5iMzEzVzNUOHNaV2RFL1dWVGhzWCthRDZYaldjWmxndkFEOFZadGpkdkJyaW8yMG1JN1Nqdy9vMXVZdGI2VVNqeTZhVDU5N2pIZFArdjgwS3pwRlZtM2hjeFJ0eGozMFVlemU2RHFHcGtZbUt0RjdjdnhaYkxJc0dvaDFKNVY0TE55MmtZNDIvSE1GY25OL244YURycUpaeHpnMkMyRFBZWld3OFA2dzNnOWEwZk1iNjZucEY4OWZvQ3BQcTRlNXg4UWt1OWVMMmFkaWF3PT0tLXJlSmg0MGxUbWFjaDJuSnItLUZZNW00VFNQR1MxNVJvazlsUGVCbFE9PQ&redirect_uri=http%3A%2F%2F127.0.0.1%3A3456&client_id=fbdb2649-e327-4907-8f67-908d24cfd7e3&code_verifier=bYrfKFX5VipI1DYtPrSVSKM50rf28c2ExnpGdYyR6zA
With request headers:
- User-Agent: Shopify CLI; v=3.57.1
- Keep-Alive: timeout=30
- Sec-CH-UA-PLATFORM: darwin
- Content-Type: application/json
2024-03-20T16:05:44.327Z: Reading the content of file at ***@***.***/cli-kit/assets/favicon.svg...
2024-03-20T16:05:44.659Z: Request to https://accounts.shopify.com/oauth/token?grant_type=authorization_code&code=aEdHQlJueWZWSGx1dllzeU0vRkcyNFpLL1Byb0U5UmhhM0E5UFV3R2F4RXAzY2xzZXJtMm5KSGxqSTNqbHdGRm0zU1VpZzQrRmt5VU83b3o4d0NDUUNBRiszTCtuWTQ1aEdWL3lMUjhNZERBZUVqa21QeWpnRGpmbU5zOW5iMzEzVzNUOHNaV2RFL1dWVGhzWCthRDZYaldjWmxndkFEOFZadGpkdkJyaW8yMG1JN1Nqdy9vMXVZdGI2VVNqeTZhVDU5N2pIZFArdjgwS3pwRlZtM2hjeFJ0eGozMFVlemU2RHFHcGtZbUt0RjdjdnhaYkxJc0dvaDFKNVY0TE55MmtZNDIvSE1GY25OL244YURycUpaeHpnMkMyRFBZWld3OFA2dzNnOWEwZk1iNjZucEY4OWZvQ3BQcTRlNXg4UWt1OWVMMmFkaWF3PT0tLXJlSmg0MGxUbWFjaDJuSnItLUZZNW00VFNQR1MxNVJvazlsUGVCbFE9PQ&redirect_uri=http%3A%2F%2F127.0.0.1%3A3456&client_id=fbdb2649-e327-4907-8f67-908d24cfd7e3&code_verifier=bYrfKFX5VipI1DYtPrSVSKM50rf28c2ExnpGdYyR6zA completed in 420 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/"481bd58da5005414d23473b126b4e185"
- x-request-id: 999a6f22-03fb-4249-b150-624cf5999329-1710950744
2024-03-20T16:05:44.662Z: CLI token received. Exchanging it for application tokens...
2024-03-20T16:05:44.664Z: Sending POST request to URL https://accounts.shopify.com/oauth/token?grant_type=urn%3Aietf%3Aparams%3Aoauth%3Agrant-type%3Atoken-exchange&requested_token_type=urn%3Aietf%3Aparams%3Aoauth%3Atoken-type%3Aaccess_token&subject_token_type=urn%3Aietf%3Aparams%3Aoauth%3Atoken-type%3Aaccess_token&client_id=fbdb2649-e327-4907-8f67-908d24cfd7e3&audience=271e16d403dfa18082ffb3d197bd2b5f4479c3fc32736d69296829cbb28d41a6&scope=https%3A%2F%2Fapi.shopify.com%2Fauth%2Fpartners.app.cli.access&subject_token=****
With request headers:
- User-Agent: Shopify CLI; v=3.57.1
- Keep-Alive: timeout=30
- Sec-CH-UA-PLATFORM: darwin
- Content-Type: application/json
2024-03-20T16:05:44.664Z: Sending POST request to URL https://accounts.shopify.com/oauth/token?grant_type=urn%3Aietf%3Aparams%3Aoauth%3Agrant-type%3Atoken-exchange&requested_token_type=urn%3Aietf%3Aparams%3Aoauth%3Atoken-type%3Aaccess_token&subject_token_type=urn%3Aietf%3Aparams%3Aoauth%3Atoken-type%3Aaccess_token&client_id=fbdb2649-e327-4907-8f67-908d24cfd7e3&audience=ee139b3d-5861-4d45-b387-1bc3ada7811c&scope=https%3A%2F%2Fapi.shopify.com%2Fauth%2Fshop.storefront-renderer.devtools&subject_token=****
With request headers:
- User-Agent: Shopify CLI; v=3.57.1
- Keep-Alive: timeout=30
- Sec-CH-UA-PLATFORM: darwin
- Content-Type: application/json
2024-03-20T16:05:44.664Z: Sending POST request to URL https://accounts.shopify.com/oauth/token?grant_type=urn%3Aietf%3Aparams%3Aoauth%3Agrant-type%3Atoken-exchange&requested_token_type=urn%3Aietf%3Aparams%3Aoauth%3Atoken-type%3Aaccess_token&subject_token_type=urn%3Aietf%3Aparams%3Aoauth%3Atoken-type%3Aaccess_token&client_id=fbdb2649-e327-4907-8f67-908d24cfd7e3&audience=32ff8ee5-82b8-4d93-9f8a-c6997cefb7dc&scope=https%3A%2F%2Fapi.shopify.com%2Fauth%2Fdestinations.readonly&subject_token=****
With request headers:
- User-Agent: Shopify CLI; v=3.57.1
- Keep-Alive: timeout=30
- Sec-CH-UA-PLATFORM: darwin
- Content-Type: application/json
2024-03-20T16:05:44.943Z: Request to https://accounts.shopify.com/oauth/token?grant_type=urn%3Aietf%3Aparams%3Aoauth%3Agrant-type%3Atoken-exchange&requested_token_type=urn%3Aietf%3Aparams%3Aoauth%3Atoken-type%3Aaccess_token&subject_token_type=urn%3Aietf%3Aparams%3Aoauth%3Atoken-type%3Aaccess_token&client_id=fbdb2649-e327-4907-8f67-908d24cfd7e3&audience=271e16d403dfa18082ffb3d197bd2b5f4479c3fc32736d69296829cbb28d41a6&scope=https%3A%2F%2Fapi.shopify.com%2Fauth%2Fpartners.app.cli.access&subject_token=**** completed in 278 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/"7a81399b97fb2c68009be3ed8fdb40dd"
- x-request-id: 0ad84355-d075-4121-823d-cf25d10a5a2a-1710950744
2024-03-20T16:05:44.945Z: Request to https://accounts.shopify.com/oauth/token?grant_type=urn%3Aietf%3Aparams%3Aoauth%3Agrant-type%3Atoken-exchange&requested_token_type=urn%3Aietf%3Aparams%3Aoauth%3Atoken-type%3Aaccess_token&subject_token_type=urn%3Aietf%3Aparams%3Aoauth%3Atoken-type%3Aaccess_token&client_id=fbdb2649-e327-4907-8f67-908d24cfd7e3&audience=32ff8ee5-82b8-4d93-9f8a-c6997cefb7dc&scope=https%3A%2F%2Fapi.shopify.com%2Fauth%2Fdestinations.readonly&subject_token=**** completed in 277 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/"7f728b250d41ca96a7f56280117a35eb"
- x-request-id: 6118ebea-f7d5-4bff-aae1-b4768824a3f4-1710950744
2024-03-20T16:05:44.948Z: Request to https://accounts.shopify.com/oauth/token?grant_type=urn%3Aietf%3Aparams%3Aoauth%3Agrant-type%3Atoken-exchange&requested_token_type=urn%3Aietf%3Aparams%3Aoauth%3Atoken-type%3Aaccess_token&subject_token_type=urn%3Aietf%3Aparams%3Aoauth%3Atoken-type%3Aaccess_token&client_id=fbdb2649-e327-4907-8f67-908d24cfd7e3&audience=ee139b3d-5861-4d45-b387-1bc3ada7811c&scope=https%3A%2F%2Fapi.shopify.com%2Fauth%2Fshop.storefront-renderer.devtools&subject_token=**** completed in 281 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/"3b79a35689b54afdab913d31214ef8b1"
- x-request-id: 4ec43823-117e-4d7a-8dba-dad412ffbaa0-1710950744
✔ Logged in.
2024-03-20T16:05:44.949Z: Setting session store...
2024-03-20T16:05:44.973Z: Verifying that the user has a Partner organization
2024-03-20T16:05:44.979Z: Sending "Partners" GraphQL request:
{
organizations(first: 1) {
nodes {
id
}
}
}
With request headers:
- User-Agent: Shopify CLI; v=3.57.1
- Keep-Alive: timeout=30
- Sec-CH-UA-PLATFORM: darwin
- Content-Type: application/json
2024-03-20T16:05:45.232Z: Reading the content of file at ***@***.***/cli-kit/assets/favicon.svg...
2024-03-20T16:05:45.257Z: Reading the content of file at ***@***.***/cli-kit/assets/favicon.svg...
2024-03-20T16:05:45.283Z: Request to https://partners.shopify.com/api/cli/graphql completed in 290 ms
With response headers:
- cache-control: max-age=0, private, must-revalidate
- content-type: application/json; charset=utf-8
- etag: W/"5e2fc688801cd6ac59f4782d82e17e45"
- x-request-id: af4d9f43-f850-495d-92c7-c7931f954d07-1710950745
2024-03-20T16:05:45.289Z: Sending "Partners" GraphQL request:
query currentAccountInfo {
currentAccountInfo {
__typename
... on ServiceAccount {
orgName
}
... on UserAccount {
email
}
}
}
With request headers:
- User-Agent: Shopify CLI; v=3.57.1
- Keep-Alive: timeout=30
- Sec-CH-UA-PLATFORM: darwin
- Content-Type: application/json
2024-03-20T16:05:46.141Z: Request to https://partners.shopify.com/api/cli/graphql completed in 850 ms
With response headers:
- cache-control: max-age=0, private, must-revalidate
- content-type: application/json; charset=utf-8
- etag: W/"779bdb3bdf728cbb700f66f54e318b79"
- x-request-id: 22f5d4cc-6361-4a12-93cd-d66c3c71e35b-1710950745
2024-03-20T16:05:46.144Z: Reading cached app information for directory /Users/mikefortney/Code/inspired-shopify-app...
2024-03-20T16:05:46.161Z: Reading cached app information for directory /Users/mikefortney/Code/inspired-shopify-app...
2024-03-20T16:05:46.167Z: Reading cached app information for directory /Users/mikefortney/Code/inspired-shopify-app...
2024-03-20T16:05:46.170Z: Reading the content of file at shopify.app.toml...
2024-03-20T16:05:46.178Z: Reading the content of file at shopify.app.toml...
2024-03-20T16:05:46.268Z: Reading the content of file at shopify.app.demo.toml...
2024-03-20T16:05:46.268Z: Reading the content of file at shopify.app.demo2.toml...
2024-03-20T16:05:46.268Z: Reading the content of file at shopify.app.demo3.toml...
2024-03-20T16:05:46.269Z: Reading the content of file at shopify.app.demo4.toml...
2024-03-20T16:05:46.269Z: Reading the content of file at shopify.app.local.toml...
2024-03-20T16:05:46.269Z: Reading the content of file at shopify.app.local.example.toml...
2024-03-20T16:05:46.270Z: Reading the content of file at shopify.app.prod.toml...
2024-03-20T16:05:46.270Z: Reading the content of file at shopify.app.stage.toml...
2024-03-20T16:05:46.270Z: Reading the content of file at shopify.app.toml...
2024-03-20T16:05:46.375Z: Sending "Partners" GraphQL request:
query FindApp($apiKey: String!) {
app(apiKey: $apiKey) {
id
title
apiKey
organizationId
apiSecretKeys {
secret
}
appType
grantedScopes
developmentStorePreviewEnabled
disabledBetas
}
}
With variables:
{
"apiKey": "*****"
}
With request headers:
- User-Agent: Shopify CLI; v=3.57.1
- Keep-Alive: timeout=30
- Sec-CH-UA-PLATFORM: darwin
- Content-Type: application/json
2024-03-20T16:05:47.048Z: Request to https://partners.shopify.com/api/cli/graphql completed in 670 ms
With response headers:
- cache-control: max-age=0, private, must-revalidate
- content-type: application/json; charset=utf-8
- etag: W/"73e9eed050dd033fe08002cd88700ab1"
- x-request-id: 4aacf45e-1d3e-49bb-a041-5b76aabbca14-1710950746
2024-03-20T16:05:47.054Z: Sending "Partners" GraphQL request:
query FindOrganization($id: ID!) {
organizations(id: $id, first: 1) {
nodes {
id
businessName
website
}
}
}
With variables:
{
"id": "1964153"
}
With request headers:
- User-Agent: Shopify CLI; v=3.57.1
- Keep-Alive: timeout=30
- Sec-CH-UA-PLATFORM: darwin
- Content-Type: application/json
2024-03-20T16:05:47.318Z: Request to https://partners.shopify.com/api/cli/graphql completed in 260 ms
With response headers:
- cache-control: max-age=0, private, must-revalidate
- content-type: application/json; charset=utf-8
- etag: W/"7377122911fe733fe3a57840b614b221"
- x-request-id: fdb07e39-6573-42b3-8076-066f00dd58f4-1710950747
2024-03-20T16:05:47.324Z: Sending "Partners" GraphQL request:
query FindOrganization($id: ID!, $shopDomain: String) {
organizations(id: $id, first: 1) {
nodes {
id
businessName
website
stores(shopDomain: $shopDomain, first: 1, archived: false) {
nodes {
shopId
link
shopDomain
shopName
transferDisabled
convertableToPartnerTest
}
}
}
}
}
With variables:
{
"id": "1964153",
"shopDomain": "mike-dev-20240307.myshopify.com"
}
With request headers:
- User-Agent: Shopify CLI; v=3.57.1
- Keep-Alive: timeout=30
- Sec-CH-UA-PLATFORM: darwin
- Content-Type: application/json
2024-03-20T16:05:47.894Z: Request to https://partners.shopify.com/api/cli/graphql completed in 568 ms
With response headers:
- cache-control: max-age=0, private, must-revalidate
- content-type: application/json; charset=utf-8
- etag: W/"19dc62446398e310105635298dfb8679"
- x-request-id: f7c4b698-59dd-4911-b226-1a34d8fd6b36-1710950747
2024-03-20T16:05:47.898Z: Sending "Partners" GraphQL request:
query fetchSpecifications($api_key: String!) {
extensionSpecifications(apiKey: $api_key) {
name
externalName
externalIdentifier
identifier
gated
experience
options {
managementExperience
registrationLimit
}
features {
argo {
surface
}
}
}
}
With variables:
{
"api_key": "549dee2476c0f03fee6e83b6cb4aa43b"
}
With request headers:
- User-Agent: Shopify CLI; v=3.57.1
- Keep-Alive: timeout=30
- Sec-CH-UA-PLATFORM: darwin
- Content-Type: application/json
2024-03-20T16:05:48.215Z: Request to https://partners.shopify.com/api/cli/graphql completed in 314 ms
With response headers:
- cache-control: max-age=0, private, must-revalidate
- content-type: application/json; charset=utf-8
- etag: W/"5ea9431c2b39b2d9003ebb8a8f3ea447"
- x-request-id: 228d62e3-9e9b-437b-aecd-5b20d1d0a431-1710950748
2024-03-20T16:05:48.220Z: Sending "Partners" GraphQL request:
query activeAppVersion($apiKey: String!) {
app(apiKey: $apiKey) {
activeAppVersion {
appModuleVersions {
registrationId
registrationUuid
registrationTitle
type
config
specification {
identifier
name
experience
options {
managementExperience
}
}
}
}
}
}
With variables:
{
"apiKey": "*****"
}
With request headers:
- User-Agent: Shopify CLI; v=3.57.1
- Keep-Alive: timeout=30
- Sec-CH-UA-PLATFORM: darwin
- Content-Type: application/json
2024-03-20T16:05:48.718Z: Request to https://partners.shopify.com/api/cli/graphql completed in 496 ms
With response headers:
- cache-control: max-age=0, private, must-revalidate
- content-type: application/json; charset=utf-8
- etag: W/"fae70996ae3117c5e8b1e55a2778292b"
- x-request-id: 70f27cc4-0aec-457d-9726-beea2eb424bf-1710950748
2024-03-20T16:05:48.724Z: Reading cached app information for directory /Users/mikefortney/Code/inspired-shopify-app...
2024-03-20T16:05:48.724Z: Reading the content of file at shopify.app.toml...
2024-03-20T16:05:48.726Z: Reading the content of file at shopify.app.toml...
2024-03-20T16:05:48.729Z: Reading the content of file at shopify.app.demo.toml...
2024-03-20T16:05:48.729Z: Reading the content of file at shopify.app.demo2.toml...
2024-03-20T16:05:48.729Z: Reading the content of file at shopify.app.demo3.toml...
2024-03-20T16:05:48.729Z: Reading the content of file at shopify.app.local.example.toml...
2024-03-20T16:05:48.730Z: Reading the content of file at shopify.app.demo4.toml...
2024-03-20T16:05:48.731Z: Reading the content of file at shopify.app.local.toml...
2024-03-20T16:05:48.731Z: Reading the content of file at shopify.app.prod.toml...
2024-03-20T16:05:48.731Z: Reading the content of file at shopify.app.stage.toml...
2024-03-20T16:05:48.732Z: Reading the content of file at shopify.app.toml...
2024-03-20T16:05:48.804Z: Reading the .env file at .env
2024-03-20T16:05:48.804Z: Reading the content of file at .env...
2024-03-20T16:05:48.814Z: Reading the content of file at extensions/impact-offer/shopify.theme.extension.toml...
2024-03-20T16:05:48.816Z: Reading the content of file at package.json...
2024-03-20T16:05:48.816Z: Reading the content of file at package.json...
2024-03-20T16:05:48.817Z: Obtaining the dependency manager in directory /Users/mikefortney/Code/inspired-shopify-app...
2024-03-20T16:05:48.849Z: Reading the content of file at web/shopify.web.toml...
2024-03-20T16:05:48.939Z: Reading the content of file at package.json...
2024-03-20T16:05:48.944Z: File-writing some content to file at shopify.app.toml...
╭─ info ────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ │
│ Using shopify.app.toml: │
│ │
│ • Org: Inspired │
│ • App: Mike Dev 2 │
│ • Dev store: mike-dev-20240307.myshopify.com │
│ • Update URLs: Yes │
│ │
│ You can pass `--reset` to your command to reset your app configuration. │
│ │
╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
╭─ error ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ │
│ Port 5555 is not available for serving GraphiQL. │
│ │
│ Choose a different port by setting the `--graphiql-port` flag. │
│ │
╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
2024-03-20T16:05:48.993Z: Obtaining the dependency manager in directory /Users/mikefortney/Code/inspired-shopify-app...
2024-03-20T16:05:48.996Z:
Running system process:
· Command: ruby -v
· Working directory: /Users/mikefortney/Code/inspired-shopify-app
2024-03-20T16:05:49.316Z: Request to https://monorail-edge.shopifysvc.com/v1/produce completed in 237 ms
With response headers:
- x-request-id: 380d3f68-1b85-4aa9-8676-596d3f3471f1
2024-03-20T16:05:49.317Z: Analytics event sent: {
"command": "app dev",
"time_start": 1710950710353,
"time_end": 1710950748986,
"total_time": 38633,
"success": false,
"cli_version": "3.57.1",
"ruby_version": "3.1.2",
"node_version": "18.16.0",
"is_employee": false,
"uname": "darwin amd64",
"env_ci": false,
"env_plugin_installed_any_custom": false,
"env_plugin_installed_shopify": ***@***.******@***.******@***.******@***.***/plugin-did-you-mean\"]",
"env_shell": "zsh",
"env_device_id": "931edb539b543f21964c98554b369692d97e6f9a",
"env_cloud": "localhost",
"env_package_manager": "yarn",
"cmd_app_warning_api_key_deprecation_displayed": false,
"cmd_app_all_configs_any": true,
"cmd_app_all_configs_clients": "{\"shopify.app.demo.toml\":\"f640c5379e21bd8378ef6dd6aaf176de\",\"shopify.app.demo2.toml\":\"73b461ccce67ed8a3260247a3beff66f\",\"shopify.app.demo3.toml\":\"541436c4404bf3f0e54b4d34816d259b\",\"shopify.app.demo4.toml\":\"a53bd83584de633a53b8f1e92500a00e\",\"shopify.app.local.example.toml\":\"9c5b31a27198c251f45833eccaf177e1\",\"shopify.app.local.toml\":\"30f4c3840d2735869db42dfd7b1214f2\",\"shopify.app.prod.toml\":\"156f1bcff82a9a207126d5f1ce2292e3\",\"shopify.app.stage.toml\":\"9c5b31a27198c251f45833eccaf177e1\",\"shopify.app.toml\":\"549dee2476c0f03fee6e83b6cb4aa43b\"}",
"cmd_app_linked_config_used": true,
"cmd_app_linked_config_name": "shopify.app.toml",
"cmd_app_linked_config_git_tracked": true,
"cmd_app_linked_config_source": "cached",
"cmd_app_linked_config_uses_cli_managed_urls": true,
"partner_id": 1964153,
"api_key": "549dee2476c0f03fee6e83b6cb4aa43b",
"project_type": "frontend",
"app_extensions_any": true,
"app_extensions_breakdown": "{\"theme\":1}",
"app_extensions_count": 1,
"app_extensions_custom_layout": false,
"app_extensions_function_any": false,
"app_extensions_function_count": 0,
"app_extensions_theme_any": true,
"app_extensions_theme_count": 1,
"app_extensions_ui_any": false,
"app_extensions_ui_count": 0,
"app_name_hash": "03c43754d385fe8179715f253d2e3828998b4fb6",
"app_path_hash": "e95e5966e8c33cbcc0ec24af48ed39f8c4f64306",
"app_scopes": "[\"read_orders\",\"read_products\",\"read_script_tags\",\"read_themes\",\"write_script_tags\"]",
"app_web_backend_any": false,
"app_web_backend_count": 0,
"app_web_custom_layout": false,
"app_web_frontend_any": true,
"app_web_frontend_count": 1,
"env_package_manager_workspaces": true,
"cmd_all_timing_network_ms": 4184,
"cmd_all_timing_prompts_ms": 33538,
"cmd_all_launcher": "yarn",
"cmd_all_topic": "app",
"cmd_all_plugin": ***@***.***/app",
"cmd_all_verbose": true,
"cmd_all_path_override": true,
"cmd_all_path_override_hash": "e95e5966e8c33cbcc0ec24af48ed39f8c4f64306",
"cmd_app_dependency_installation_skipped": false,
"cmd_app_reset_used": false,
"cmd_dev_tunnel_type": "custom",
"cmd_all_timing_active_ms": 909,
"cmd_all_exit": "expected_error",
"args": "--tunnel-url https://mf777.pagekite.me:8081 --graphiql-port 5555 --verbose",
"error_message": "Port 5555 is not available for serving GraphiQL.",
"app_name": "inspired-impact-experience",
"env_plugin_installed_all": ***@***.******@***.******@***.******@***.***/plugin-did-you-mean\"]",
"metadata": "{\"extraPublic\":{},\"extraSensitive\":{}}"
}
2024-03-20T16:05:49.322Z: Reporting handled error to Bugsnag: Port 5555 is not available for serving GraphiQL.
2024-03-20T16:05:49.338Z: Obtaining the dependency manager in directory /Users/mikefortney/Code/inspired-shopify-app…
Thank you! Mike
On Mar 20, 2024, at 2:52 AM, Gonzalo Riestra @.***> wrote:
👋 Thanks for opening the issue.
Unfortunately, I'm not able to reproduce it. Some questions:
Does it happen with the latest CLI version (3.57.1)? Could you run lsof -i:3457 to check if the default port is in use? Could you share the verbose log of yarn dev --graphiql-port 5555 --verbose? — Reply to this email directly, view it on GitHub https://github.com/Shopify/cli/issues/3578#issuecomment-2009158167, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAHNLIHXIBEX2E2RLPN3U5DYZFL43AVCNFSM6AAAAABE6CYGJ6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMBZGE2TQMJWG4. You are receiving this because you authored the thread.
The issue with the port while trying to log in is revealing. There must be something weird in your environment.
Two more questions:
npm init @shopify/app@latest
and then npm run dev
One more test: could you try changing the version of the @shopify/cli
and @shopify/app
dependencies from your package.json
to 0.0.0-experimental-20240321094046
and running install
with your package manager? That version uses a random port for GraphiQL when the default one is not available (from this PR).
@gonzaloriestra the dev
script is defined in my package.json as shopify app dev --tunnel-url $(grep TUNNEL_URL .env | cut -d '=' -f2)
so our team of devs can all have their own local tunnel url. Today I will test with a fresh new app, and also using the dependency version you referenced. I will report back later today!
@gonzaloriestra I tried with a fresh app, and it works just fine... I've tried the experimental dependency versions in my existing app but still had the same issue with the random port. So it must be something missing/conflicting in my local app. It is a NextJS app, not Remix. I've been dragging my feet refactoring to remix. I can replicate this issue in my repo on two computers, so I'm guessing it must be an issue with my app. I will continue to use the 3.52.0 dependency versions for the moment until I refactor using the latest app template. You can close this issue. Thank you so much for your help!
We just ran into this and spent a ton of time debugging it. For anyone coming from google in the future, this is what the problem was for us:
https://github.com/unjs/get-port-please/blob/main/src/get-port.ts#L150
the function used to check ports defaults to looking on the hostname set at process.env.HOST
which we were using in our app through a .env
file for something unrelated which was causing conflicts (it was set to something like HOST=http://localhost/
)
removing the HOST=
from our environment solved this and had everything working
We just ran into this and spent a ton of time debugging it. For anyone coming from google in the future, this is what the problem was for us:
https://github.com/unjs/get-port-please/blob/main/src/get-port.ts#L150
the function used to check ports defaults to looking on the hostname set at
process.env.HOST
which we were using in our app through a.env
file for something unrelated which was causing conflicts (it was set to something likeHOST=http://localhost/
)removing the
HOST=
from our environment solved this and had everything working
OMG this totally fixed it!! @gonzaloriestra please add this note (or similar) to the CLI documentation:
"You must not have a value for HOST
in your local .env
file in order for the local GraphiQL server to function. Please change the name of that environment variable to something like APP_HOST
instead."
This also solved the issue I mentioned (in a comment above) that the CLI had an issue with the port for logging in as well!
Please confirm that you have:
In which of these areas are you experiencing a problem?
App
Expected behavior
CLI
dev
command should launch without issues on MacOSActual behavior
CLI
dev
command fails with the error 'Port 3457 is not available for serving GraphiQL' and offers a command option to use a different port. No matter which port I choose, the behavior is the same. I have looked into the code a bit, and I see that you are usingget-port-please
to check port availability. There may be an issue in that package that misreports the availability of the port, OR there is something else blocking the port availability even tho it is reported as available.Verbose output
Reproduction steps
@shopify/cli
and@shopify/app
<= 3.52.0.cli
andapp
package versions to at least 3.53.0.shopify app dev
command using your local package manager.Operating System
Mac OS Sonoma 14.4
Shopify CLI version (check your project's
package.json
if you're not sure)Shell
zsh
Node version (run
node -v
if you're not sure)v20.11.1
What language and version are you using in your application?
Node v20.11.1, NextJS v13.0.3, React v18.2.0