You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.)
In which of these areas are you experiencing a problem?
App, Extension
Expected behavior
According to the docs, shopify app env pull command should create or update an .env file with app and app extension environment variables. See app env pull.
That means for each extension, there should be a SHOPIFY_<EXTENSION>_ID variable in .env.
Actual behavior
The shopify app env pull command only sets the SHOPIFY_API_KEY, SHOPIFY_API_SECRET and SCOPES. It doesn't set the extension ID SHOPIFY_<EXTENSION>_ID.
The extension ID will be set by shopify app deploy.
Verbose output
pnpm shopify app env pull --verbose
> efficient-logistics-app@ shopify /Users/zirkelc/Code/shopify-cli-app-env-pull
> shopify "app""env""pull""--verbose"
2024-07-19T07:57:25.668Z: Running command app env pull
2024-07-19T07:57:25.681Z: Reading cached app information for directory /Users/zirkelc/Code/shopify-cli-app-env-pull...
2024-07-19T07:57:25.681Z: Reading the content of file at shopify.app.toml...
2024-07-19T07:57:25.684Z: Reading the content of file at shopify.app.toml...
2024-07-19T07:57:25.710Z: Reading the .env file at .env
2024-07-19T07:57:25.710Z: Reading the content of file at .env...
2024-07-19T07:57:25.725Z: Reading the content of file at extensions/theme-extension/shopify.extension.toml...
2024-07-19T07:57:25.726Z: Reading the content of file at package.json...
2024-07-19T07:57:25.727Z: Reading the content of file at package.json...
2024-07-19T07:57:25.730Z:
Running system process:
· Command: npm prefix
· Working directory: /Users/zirkelc/Code/shopify-cli-app-env-pull
2024-07-19T07:57:25.919Z: Obtaining the dependency manager in directory /Users/zirkelc/Code/shopify-cli-app-env-pull...
2024-07-19T07:57:26.039Z: Reading the content of file at shopify.web.toml...
2024-07-19T07:57:26.041Z: Reading the content of file at package.json...
2024-07-19T07:57:26.043Z: Ensuring that the user is authenticated with the Partners API with the following scopes:
[]
2024-07-19T07:57:26.043Z: Getting session store...
2024-07-19T07:57:26.044Z: 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-07-19T07:57:26.044Z: Sending Identity Introspection request to URL: https://accounts.shopify.com/oauth/introspection
2024-07-19T07:57:26.045Z: Sending POST request to URL https://accounts.shopify.com/oauth/introspection
With request headers:
- User-Agent: Shopify CLI; v=3.64.1
- Keep-Alive: timeout=30
- Sec-CH-UA-PLATFORM: darwin
- Content-Type: application/json
2024-07-19T07:57:26.252Z: Request to https://accounts.shopify.com/oauth/introspection completed in 197 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/"10558954b5b3ba22b47868105b7b01ac"
- x-request-id: 09ccd185-b8db-48f5-bffc-e9dd5c710568-1721375846
2024-07-19T07:57:26.253Z: The identity token is valid: true
2024-07-19T07:57:26.253Z:
The validation of the token for application/identity completed with the following results:
- It's expired: false- It's invalid in identity: false
2024-07-19T07:57:26.254Z: Verifying that the user has a Partner organization
2024-07-19T07:57:26.259Z: Sending "Partners" GraphQL request:
{
organizations(first: 1) {
nodes {
id
}
}
}
With request headers:
- User-Agent: Shopify CLI; v=3.64.1
- Keep-Alive: timeout=30
- Sec-CH-UA-PLATFORM: darwin
- Content-Type: application/json
2024-07-19T07:57:26.522Z: Request to https://partners.shopify.com/api/cli/graphql completed in 254 ms
With response headers:
- cache-control: max-age=0, private, must-revalidate
- content-type: application/json; charset=utf-8
- etag: W/"e2299e25fd42fa35958c8e042d8df48d"
- x-request-id: b769dd78-1ab2-49b5-9dc0-c98c9af0b83a-1721375846
2024-07-19T07:57:26.526Z: Sending "Partners" GraphQL request:
query currentAccountInfo {
currentAccountInfo {
__typename
... on ServiceAccount {
orgName
}
... on UserAccount {
email
}
}
}
With request headers:
- User-Agent: Shopify CLI; v=3.64.1
- Keep-Alive: timeout=30
- Sec-CH-UA-PLATFORM: darwin
- Content-Type: application/json
2024-07-19T07:57:26.760Z: Request to https://partners.shopify.com/api/cli/graphql completed in 232 ms
With response headers:
- cache-control: max-age=0, private, must-revalidate
- content-type: application/json; charset=utf-8
- etag: W/"7f978c3b072cc974aea18aa1bf336023"
- x-request-id: bf820aa4-0f51-4061-8f14-53f4f11b360e-1721375846
2024-07-19T07:57:26.768Z: Sending "Partners" GraphQL request:
query FindApp($apiKey: String!) {
app(apiKey: $apiKey) {
id
title
apiKey
organizationId
apiSecretKeys {
secret
}
appType
grantedScopes
applicationUrl
redirectUrlWhitelist
requestedAccessScopes
webhookApiVersion
embedded
posEmbedded
preferencesUrl
gdprWebhooks {
customerDeletionUrl
customerDataRequestUrl
shopDeletionUrl
}
appProxy {
subPath
subPathPrefix
url
}
developmentStorePreviewEnabled
disabledFlags
}
}
With variables:
{
"apiKey": "*****"
}
With request headers:
- User-Agent: Shopify CLI; v=3.64.1
- Keep-Alive: timeout=30
- Sec-CH-UA-PLATFORM: darwin
- Content-Type: application/json
2024-07-19T07:57:27.253Z: Request to https://partners.shopify.com/api/cli/graphql completed in 484 ms
With response headers:
- cache-control: max-age=0, private, must-revalidate
- content-type: application/json; charset=utf-8
- etag: W/"e2f2bce5e51b658a10885cc2e3912341"
- x-request-id: efe0204a-4b0c-4227-8b55-f8b446eec48f-1721375846
2024-07-19T07:57:27.255Z: Reading the content of file at .env...
No changes to .env
2024-07-19T07:57:27.262Z:
Running system process:
· Command: npm prefix
· Working directory: /Users/zirkelc/Code/shopify-cli-app-env-pull
2024-07-19T07:57:27.380Z: Obtaining the dependency manager in directory /Users/zirkelc/Code/shopify-cli-app-env-pull...
2024-07-19T07:57:27.381Z:
Running system process:
· Command: ruby -v
· Working directory: /Users/zirkelc/Code/shopify-cli-app-env-pull
2024-07-19T07:57:27.606Z: Request to https://monorail-edge.shopifysvc.com/v1/produce completed in 210 ms
With response headers:
- x-request-id: fd056800-fd2b-4ec9-8628-ffd3c3f28dd9
2024-07-19T07:57:27.607Z: Analytics event sent: {
"command": "app env pull",
"time_start": 1721375845669,
"time_end": 1721375847258,
"total_time": 1589,
"success": true,
"cli_version": "3.64.1",
"ruby_version": "3.3.4",
"node_version": "20.13.1",
"is_employee": false,
"uname": "darwin arm64",
"env_ci": false,
"env_plugin_installed_any_custom": false,
"env_plugin_installed_shopify": "[\"@shopify/cli\"]",
"env_shell": "zsh",
"env_device_id": "df29c12cb7b5d37dd6019bd4709d6a6ba1000f62",
"env_cloud": "localhost",
"env_package_manager": "pnpm",
"env_is_global": false,
"cmd_app_warning_api_key_deprecation_displayed": false,
"cmd_app_all_configs_any": true,
"cmd_app_all_configs_clients": "{\"shopify.app.toml\":\"9dab5ec753c594793e7e38551eefdeb6\"}",
"cmd_app_linked_config_used": true,
"cmd_app_linked_config_name": "shopify.app.toml",
"cmd_app_linked_config_git_tracked": false,
"cmd_app_linked_config_source": "cached",
"cmd_app_linked_config_uses_cli_managed_urls": true,
"project_type": "node",
"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": "afdf5114f08fad79a5a6c82369c5cf30e2e75d38",
"app_path_hash": "1abfcb7349860a83f977ae787a1187034a1747cb",
"app_scopes": "[\"write_products\"]",
"app_web_backend_any": true,
"app_web_backend_count": 1,
"app_web_custom_layout": true,
"app_web_framework": "remix",
"app_web_frontend_any": true,
"app_web_frontend_count": 1,
"env_package_manager_workspaces": true,
"partner_id": 1554137,
"api_key": "****",
"cmd_all_timing_network_ms": 1187,
"cmd_all_timing_prompts_ms": 0,
"cmd_all_launcher": "pnpm",
"cmd_all_topic": "app env",
"cmd_all_plugin": "@shopify/cli",
"cmd_all_verbose": true,
"cmd_all_path_override": true,
"cmd_all_path_override_hash": "1abfcb7349860a83f977ae787a1187034a1747cb",
"cmd_all_timing_active_ms": 401,
"cmd_all_exit": "ok",
"args": "--verbose",
"app_name": "efficient-logistics-app",
"env_plugin_installed_all": "[\"@shopify/cli\"]",
"metadata": "{\"extraPublic\":{},\"extraSensitive\":{}}"
}
2024-07-19T07:57:27.608Z: Completed command app env pull
Reproduction steps
Created a Remix app and extension via Shopify CLI
2024-07-19_09-56-28.mp4
Operating System
darwin-arm64
Shopify CLI version (check your project's package.json if you're not sure)
3.64.1
Shell
/bin/zsh
Node version (run node -v if you're not sure)
v20.13.1
What language and version are you using in your application?
TypeScript
The text was updated successfully, but these errors were encountered:
This issue seems inactive. If it's still relevant, please add a comment saying so. Otherwise, take no action.
→ If there's no activity within a week, then a bot will automatically close this.
Thanks for helping to improve Shopify's dev tooling and experience.
P.S. You can learn more about why we stale issues here.
This is actually the expected behaviour of env pull, extensions IDs are only stored after a deploy.
We are working on simplifying this whole flow, but for now this is the expected behaviour.
Please confirm that you have:
In which of these areas are you experiencing a problem?
App, Extension
Expected behavior
According to the docs,
shopify app env pull
command should create or update an.env
file with app and app extension environment variables. See app env pull.That means for each extension, there should be a
SHOPIFY_<EXTENSION>_ID
variable in.env
.Actual behavior
The
shopify app env pull
command only sets theSHOPIFY_API_KEY
,SHOPIFY_API_SECRET
andSCOPES
. It doesn't set the extension IDSHOPIFY_<EXTENSION>_ID
.The extension ID will be set by
shopify app deploy
.Verbose output
Reproduction steps
Created a Remix app and extension via Shopify CLI
2024-07-19_09-56-28.mp4
Operating System
darwin-arm64
Shopify CLI version (check your project's
package.json
if you're not sure)3.64.1
Shell
/bin/zsh
Node version (run
node -v
if you're not sure)v20.13.1
What language and version are you using in your application?
TypeScript
The text was updated successfully, but these errors were encountered: