Skip to content

Couldn't save the Shopify Access Token in the .env file. No .env file exists at /srv/app/tortu/htdocs/.env #204

Closed

Description

@srosenbrand

Description

When authorizing the Shopify app on production i get a 'Your Shopify app has been successfully authorized' notification.

All settings are working in development (with a second Shopify 'local' app) trough ngrok tunnel.

But in the debugbar there is an error '
craft\shopify\services\Api::getAccessToken | Couldn't save the Shopify Access Token in the .env file. No .env file exists at /srv/app/xxx/htdocs/.env'

This seems to be an issue with Fortrabbit, where the website is hosted and .env vars are stored separately and not in an .env file in the root.

Result is that the webhooks option is not shown after authentication. On reload of the succes page i get an 'Error authorizing app. Invalid OAuth callback.'

EDIT: fixed by creating an empty .env file in the root of production. After authentication copy the generated SHOPIFY_API_ACCESS_TOKEN to the env vars section. Now working!

Additional info

  • Craft version: 5.19.17
  • PHP version: 8.4
  • Plugins & versions: Shopify 7.0.1

Activity

  1. added
    bug
    Plugins → Shopify
    Plugins
    on Mar 24, 2026
  2. linear commented on Mar 24, 2026

    @linear
  3. nfourtythree commented on Mar 24, 2026

    @nfourtythree
    Contributor

    Hi @srosenbrand

    Thank you for bringing this to our attention.

    We have just pushed up a fix for this and it is included in the 7.0.2 release which has just gone live.

    Please update to that version and let us know if you have any further issues.

    Thanks!

  4. added a commit that references this issue on Mar 25, 2026
    e4b8686
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    PluginsPlugins → Shopifybugrepo:shopify

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions