# Can't install plugin

**URL:** <https://forum.shopware.com/t/cant-install-plugin/59990>\
**Category:** Programming (EN)\
**Created:** [13. Juni 2019 um 08:55 UTC](https://forum.shopware.com/t/cant-install-plugin/59990 "2019-06-13T08:55:16Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rearden](https://avatars.discourse-cdn.com/v4/letter/r/b19c9b/32.png) [@Rearden](https://forum.shopware.com/u/Rearden)\
**Post date:** [13. Juni 2019 um 08:55 UTC](https://forum.shopware.com/t/cant-install-plugin/59990/1 "2019-06-13T08:55:16Z")

</div>

**Summary**

I can’t install plugins either by the command line, or by using the admin area UI. I’ll go through both scenarios.

&nbsp;

**Scenario 1: Steps to reproduce (command line install)**

Install Shopware 6 using docker. Create composer.json and BundleExample.php according to this guide: [https://docs.shopware.com/en/shopware-platform-dev-en/getting-started/indepth-guide-bundle/setup](https://docs.shopware.com/en/shopware-platform-dev-en/getting-started/indepth-guide-bundle/setup)

Atempt to install using this line:

```
bin/console plugin:install --activate BundleExample

```

&nbsp;

**Current behaviour**

After running the install command, this error is shown in the console:

```
Shopware Plugin Lifecycle Service

```

`Install 1 plugin(s):`

- `Example for Shopware (v1.0.0)`

`In PluginLifecycleService.php line 405:`

`Call to a member function setContainer() on null`

&nbsp;

**Scenario 2: Steps to reproduce (admin area UI)**

Install Shopware 6 using docker. Create composer.json and BundleExample.php according to this guide: [https://docs.shopware.com/en/shopware-platform-dev-en/getting-started/indepth-guide-bundle/setup](https://docs.shopware.com/en/shopware-platform-dev-en/getting-started/indepth-guide-bundle/setup)

Run this line so that the plugin is visible in the admin area:

```
bin/console plugin:refresh

```

Go to the admin area then Settings \> System \> Plugins. (at this point a console error appears - see logs below)

Click “Install” next to the Example for Shopware plugin.

&nbsp;

**Current behaviour**

After clicking “Install”, an infinite loading spinner appears. The plugin doesn’t get installed.

&nbsp;

**Relevant logs**

On navigating to Settings \> System \> Plugins, I see the following error in the console:

```
POST http://localhost:8000/api/v1/_action/store/checklogin?language=en-GB 500 (Internal Server Error)

```

Here is the response.

```
{
    "errors": [{
        "status": "500",
        "code": "FRAMEWORK__STORE_TOKEN_IS_MISSING",
        "title": "Internal Server Error",
        "detail": "Store host is missing",
        "meta": {
            "parameters": []
        },
        "trace": [{
            "file": "\/app\/vendor\/symfony\/http-kernel\/HttpKernel.php",
            "line": 151,
            "function": "checkLogin",
            "class": "Shopware\\Core\\Framework\\Store\\Api\\StoreController",
            "type": "-\u003E",
            "args": [{
                "languageIdChain": ["2fbb5fe2e29a4d70aa5854ce7ce3e20b"],
                "versionId": "0fa91ce3e96a4bc2be4bd9ce752c3425",
                "currencyId": "b7d2554b0ce847cd82f3ac9bd1c0dfca",
                "currencyFactor": 1,
                "currencyPrecision": 2,
                "scope": "user",
                "ruleIds": [],
                "source": {},
                "considerInheritance": false,
                "taxState": "gross",
                "extensions": []
            }]
        }, {
            "file": "\/app\/vendor\/symfony\/http-kernel\/HttpKernel.php",
            "line": 68,
            "function": "handleRaw",
            "class": "Symfony\\Component\\HttpKernel\\HttpKernel",
            "type": "-\u003E",
            "args": [{
                "attributes": {},
                "request": {},
                "query": {},
                "server": {},
                "files": {},
                "cookies": {},
                "headers": {}
            }, 1]
        }, {
            "file": "\/app\/vendor\/symfony\/http-kernel\/Kernel.php",
            "line": 198,
            "function": "handle",
            "class": "Symfony\\Component\\HttpKernel\\HttpKernel",
            "type": "-\u003E",
            "args": [{
                "attributes": {},
                "request": {},
                "query": {},
                "server": {},
                "files": {},
                "cookies": {},
                "headers": {}
            }, 1, true]
        }, {
            "file": "\/app\/public\/index.php",
            "line": 54,
            "function": "handle",
            "class": "Symfony\\Component\\HttpKernel\\Kernel",
            "type": "-\u003E",
            "args": [{
                "attributes": {},
                "request": {},
                "query": {},
                "server": {},
                "files": {},
                "cookies": {},
                "headers": {}
            }]
        }]
    }]
}

```

I’m not sure if this is relevant, but I get a similar response from `http://localhost:8000/api/v1/_action/store/licenses?language=en-GB` when I navigate to Settings \> System \> Plugins \> Licenses.

---

<div class="post-metadata">

**Author:** ![Patrick\_Stahl](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/patrick_stahl/32/7679_2.png) [@Patrick\_Stahl](https://forum.shopware.com/u/Patrick_Stahl)\
**Post date:** [14. Juni 2019 um 12:48 UTC](https://forum.shopware.com/t/cant-install-plugin/59990/2 "2019-06-14T12:48:33Z")

</div>

Hello @Rearden‍,

this error also occurs&nbsp;if you misconfigured your&nbsp;_composer.json_&nbsp;file.  
Please double check if the properties **extra.shopware-plugin-class** , as well as the&nbsp; **autoload.psr-4** &nbsp;object is configured properly and contains correct namespace- and class-names.

Kind regards,  
Patrick&nbsp; ![Shopware](https://europe1.discourse-cdn.com/flex013/uploads/shopware/original/1X/86c57fbace799dd4eb1f1b8a2d3bdc1733f0aea1.png "Shopware")

---

<div class="post-metadata">

**Author:** ![Rearden](https://avatars.discourse-cdn.com/v4/letter/r/b19c9b/32.png) [@Rearden](https://forum.shopware.com/u/Rearden)\
**Post date:** [14. Juni 2019 um 14:41 UTC](https://forum.shopware.com/t/cant-install-plugin/59990/3 "2019-06-14T14:41:56Z")

</div>

Hi @Patrick‍

My composer file was correct since I had copied it straight from the tutorial. After looking at the documentation again I realized I had made a silly mistake - my BundleExample.php file was not in the right location.
