# \[admin:watch\] Login geht nicht unter Version 6.2.0 (RC1)

**URL:** <https://forum.shopware.com/t/admin-watch-login-geht-nicht-unter-version-6-2-0-rc1/66733>\
**Category:** Allgemein\
**Created:** [5. Mai 2020 um 14:01 UTC](https://forum.shopware.com/t/admin-watch-login-geht-nicht-unter-version-6-2-0-rc1/66733 "2020-05-05T14:01:04Z")\
**Posts on this page:** 17\
**Page:** 1

<div class="post-metadata">

**Author:** ![pino](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/pino/32/14373_2.png) [@pino](https://forum.shopware.com/u/pino)\
**Post date:** [5. Mai 2020 um 14:01 UTC](https://forum.shopware.com/t/admin-watch-login-geht-nicht-unter-version-6-2-0-rc1/66733/1 "2020-05-05T14:01:04Z")

</div>

Tach zusammen,

ich kann mich unter&nbsp;Version 6.2.0 (RC1) normal anmelden und die Logindaten stimmen auch (admin:shopware).  
Befinde ich mich allerding im watch Modus (./psh.phar administration:watch), dann kann ich mich nicht anmelden.  
Hab’s&nbsp;mit mehreren Browsern (+ Inkognito) getestet.

Habt ihr auch das Problem?

// edit  
Hab über bin/console mal nen neuen User angelegt.  
Unter diesen Benutzer kann ich mich auch nicht unter admin:watch anmelden.

---

<div class="post-metadata">

**Author:** ![oerkel](https://avatars.discourse-cdn.com/v4/letter/o/a9adbd/32.png) [@oerkel](https://forum.shopware.com/u/oerkel)\
**Post date:** [5. Mai 2020 um 14:19 UTC](https://forum.shopware.com/t/admin-watch-login-geht-nicht-unter-version-6-2-0-rc1/66733/2 "2020-05-05T14:19:53Z")

</div>

gleiches Problem bei mir. Nach dem Update ist kein Login mehr möglich.

---

<div class="post-metadata">

**Author:** ![rschwering](https://avatars.discourse-cdn.com/v4/letter/r/cab0a1/32.png) [@rschwering](https://forum.shopware.com/u/rschwering)\
**Post date:** [6. Mai 2020 um 07:00 UTC](https://forum.shopware.com/t/admin-watch-login-geht-nicht-unter-version-6-2-0-rc1/66733/3 "2020-05-06T07:00:03Z")

</div>

Hallo,

verwendet ihr eine abweichende URL zum Öffnen der Administration? Wenn ja, bitte öffnet dann die Administration über `localhost`:  
Wenn es vorher beispielsweise über [http://docker.vm:8080](http://docker.vm:8080) gemacht wurde, bitte [http://localhost:8080](http://localhost:8080) verwenden. So solltet ihr euch bei Verwendung von administration:watch wie gewohnt einloggen können.

Liebe Grüße,

Ramona

---

<div class="post-metadata">

**Author:** ![pino](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/pino/32/14373_2.png) [@pino](https://forum.shopware.com/u/pino)\
**Post date:** [6. Mai 2020 um 07:13 UTC](https://forum.shopware.com/t/admin-watch-login-geht-nicht-unter-version-6-2-0-rc1/66733/4 "2020-05-06T07:13:48Z")

</div>

Guten Morgen,

seit 6.1.0 (RC1)&nbsp;öffne ich den watcher so und hab auf eine lokale Netzwerk-IP verwiesen:

```
192.168.123.45:8080

```

Wie gesagt seit 6.2.0 (RC1) geht das nicht mehr.

---

<div class="post-metadata">

**Author:** ![oerkel](https://avatars.discourse-cdn.com/v4/letter/o/a9adbd/32.png) [@oerkel](https://forum.shopware.com/u/oerkel)\
**Post date:** [6. Mai 2020 um 08:11 UTC](https://forum.shopware.com/t/admin-watch-login-geht-nicht-unter-version-6-2-0-rc1/66733/5 "2020-05-06T08:11:55Z")

</div>

localhost ist bei mir auch nicht möglich da ich die dev Instanz auf einem eigenen Server betreibe

---

<div class="post-metadata">

**Author:** ![jleifeld](https://avatars.discourse-cdn.com/v4/letter/j/e47774/32.png) [@jleifeld](https://forum.shopware.com/u/jleifeld)\
**Post date:** [6. Mai 2020 um 08:56 UTC](https://forum.shopware.com/t/admin-watch-login-geht-nicht-unter-version-6-2-0-rc1/66733/6 "2020-05-06T08:56:27Z")

</div>

Hey guys,

can you try to change the following code in the core:  
&nbsp;

```
// platform/src/Administration/Resources/app/administration/src/core/service/login.service.js

...

function cookieStorageFactory() {
    const domain = window.location.hostname; // change this line
    const path = context.basePath + context.pathInfo;

    // Set default cookie values
    return new CookieStorage(
        {
            path: path,
            domain: domain,
            secure: false, // only allow HTTPs
            sameSite: 'Strict' // Should be Strict
        }
    );
}

...

```

If this works for you then I would try to create a ticket for this to fix this problem in the next version.

---

<div class="post-metadata">

**Author:** ![pino](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/pino/32/14373_2.png) [@pino](https://forum.shopware.com/u/pino)\
**Post date:** [6. Mai 2020 um 09:24 UTC](https://forum.shopware.com/t/admin-watch-login-geht-nicht-unter-version-6-2-0-rc1/66733/7 "2020-05-06T09:24:12Z")

</div>

thank you, it works.  
i can login right now.  
BUT

now i get JavaScript errors after i logged in.

&nbsp;

---

<div class="post-metadata">

**Author:** ![jleifeld](https://avatars.discourse-cdn.com/v4/letter/j/e47774/32.png) [@jleifeld](https://forum.shopware.com/u/jleifeld)\
**Post date:** [6. Mai 2020 um 09:44 UTC](https://forum.shopware.com/t/admin-watch-login-geht-nicht-unter-version-6-2-0-rc1/66733/8 "2020-05-06T09:44:33Z")

</div>

I forgot the Web Worker which don´t have access to the window. Can you try this:

&nbsp;

```
// platform/src/Administration/Resources/app/administration/src/core/service/login.service.js

...

function cookieStorageFactory() {
    let domain;

    if (typeof window === 'object') {
        domain = window.location.hostname;
    } else {
        // eslint-disable-next-line no-restricted-globals
        const url = new URL(self.location.origin);
        domain = url.hostname;
    }

    const path = context.basePath + context.pathInfo;

    // Set default cookie values
    return new CookieStorage(
        {
            path: path,
            domain: domain,
            secure: false, // only allow HTTPs
            sameSite: 'Strict' // Should be Strict
        }
    );
}

...

```

&nbsp;

---

<div class="post-metadata">

**Author:** ![pino](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/pino/32/14373_2.png) [@pino](https://forum.shopware.com/u/pino)\
**Post date:** [6. Mai 2020 um 09:51 UTC](https://forum.shopware.com/t/admin-watch-login-geht-nicht-unter-version-6-2-0-rc1/66733/9 "2020-05-06T09:51:25Z")

</div>

great, thank you.

---

<div class="post-metadata">

**Author:** ![oerkel](https://avatars.discourse-cdn.com/v4/letter/o/a9adbd/32.png) [@oerkel](https://forum.shopware.com/u/oerkel)\
**Post date:** [6. Mai 2020 um 11:35 UTC](https://forum.shopware.com/t/admin-watch-login-geht-nicht-unter-version-6-2-0-rc1/66733/10 "2020-05-06T11:35:00Z")

</div>

work, thx

---

<div class="post-metadata">

**Author:** ![DannyDan](https://avatars.discourse-cdn.com/v4/letter/d/c2a13f/32.png) [@DannyDan](https://forum.shopware.com/u/DannyDan)\
**Post date:** [4. Juni 2020 um 11:29 UTC](https://forum.shopware.com/t/admin-watch-login-geht-nicht-unter-version-6-2-0-rc1/66733/11 "2020-06-04T11:29:16Z")

</div>

Merkwürdig, bei mir funktioniert das trotz der Änderung nicht. Gleiches verhalten wenn ich versuche mich einzuloggen.

Änderung wie oben beschrieben vorgenommen, Admin neu gebaut, cache geleert, browsercache geleert.  
Habe ich evtl. noch etwas vergessen?

Danny

---

<div class="post-metadata">

**Author:** ![DannyDan](https://avatars.discourse-cdn.com/v4/letter/d/c2a13f/32.png) [@DannyDan](https://forum.shopware.com/u/DannyDan)\
**Post date:** [5. Juni 2020 um 11:08 UTC](https://forum.shopware.com/t/admin-watch-login-geht-nicht-unter-version-6-2-0-rc1/66733/12 "2020-06-05T11:08:32Z")

</div>

Hat keiner eine Idee wie man das Problem mit einer Vagrant Umgebung in den Griff bekommen kann?  
Manuell jedesmal den Adminkram zu bauen dauert nicht nur immer knapp eine Minute, sondern ist auch super umständlich. ☹

Danny

---

<div class="post-metadata">

**Author:** ![Hansibert](https://avatars.discourse-cdn.com/v4/letter/h/8e8cbc/32.png) [@Hansibert](https://forum.shopware.com/u/Hansibert)\
**Post date:** [10. Juli 2020 um 14:05 UTC](https://forum.shopware.com/t/admin-watch-login-geht-nicht-unter-version-6-2-0-rc1/66733/13 "2020-07-10T14:05:26Z")

</div>

The solution that worked for @DannyDan‍ I was still unable to log in. After some hours wasted, I found this:

```
# First, change the "login.service.js" file as proposed by
# jleifeld above.

cd /home/vagrant/shopware-dev/platform/src/Administration/Resources/app/administration

export PROJECT_ROOT="/home/vagrant/shopware-dev"
export ENV_FILE="$PROJECT_ROOT/.env"
export PORT="8080"
export HOST="192.168.33.10"
export APP_URL="http://192.168.33.10"

# Not necessary, personal recommendation:
export ESLINT_DISABLE=true

npm run dev
# ... wait until ready... then log in at
# "http://192.168.33.10:8080/"

```

Relevant data missing in a context … this seems to be a bit of a theme in development with Shopware 6 at the moment (not just in JS, unfortunately).

Since I am already writing this post: big compliment to the Shopware guys for the smooth installation of the vagrant environment ![Shopware](https://europe1.discourse-cdn.com/flex013/uploads/shopware/original/1X/86c57fbace799dd4eb1f1b8a2d3bdc1733f0aea1.png "Shopware") ![Thumb-Up](https://europe1.discourse-cdn.com/flex013/uploads/shopware/original/1X/7fcda44f782696668a3d093569d15e88105769e1.png "Thumb-Up")! This is so nice, please don’t let it die!

---

<div class="post-metadata">

**Author:** ![euroxid](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/euroxid/32/15105_2.png) [@euroxid](https://forum.shopware.com/u/euroxid)\
**Post date:** [10. August 2020 um 13:34 UTC](https://forum.shopware.com/t/admin-watch-login-geht-nicht-unter-version-6-2-0-rc1/66733/14 "2020-08-10T13:34:19Z")

</div>

No luck with any of the approaches.

Is there a way to run administration:build (which works just&nbsp;fine) in a way that int produces&nbsp; „dev files“?

I don’t care about hot reloading, all I need is the Vue chrome plugin&nbsp; working.

---

<div class="post-metadata">

**Author:** ![juanitolaguna](https://avatars.discourse-cdn.com/v4/letter/j/dc4da7/32.png) [@juanitolaguna](https://forum.shopware.com/u/juanitolaguna)\
**Post date:** [11. August 2020 um 19:04 UTC](https://forum.shopware.com/t/admin-watch-login-geht-nicht-unter-version-6-2-0-rc1/66733/15 "2020-08-11T19:04:37Z")

</div>

This is still in problem in Vagrant 6.3.0.1 Please fix that.

---

<div class="post-metadata">

**Author:** ![juanitolaguna](https://avatars.discourse-cdn.com/v4/letter/j/dc4da7/32.png) [@juanitolaguna](https://forum.shopware.com/u/juanitolaguna)\
**Post date:** [11. August 2020 um 19:21 UTC](https://forum.shopware.com/t/admin-watch-login-geht-nicht-unter-version-6-2-0-rc1/66733/16 "2020-08-11T19:21:47Z")

</div>

@euroxid Be aware to copy the code directly ito the vendor folder here: (SW 6.3.0.1)

/shopware-platform-vagrant/shopware-dev/vendor/shopware/platform/src/Administration/Resources/app/administration/src/core/service/login.service.js

not here:

/shopware-platform-vagrant/shopware-dev/platform/src/Administration/Resources/app/administration/src/core/service/login.service.js

&nbsp;

> [@euroxid schrieb:](https://forum.shopware.com/profile/22870/euroxid "euroxid")
> 
> No luck with any of the approaches.
> 
> Is there a way to run administration:build (which works just&nbsp;fine) in a way that int produces&nbsp; „dev files“?
> 
> I don’t care about hot reloading, all I need is the Vue chrome plugin&nbsp; working.

---

<div class="post-metadata">

**Author:** ![devnullroot](https://avatars.discourse-cdn.com/v4/letter/d/3bc359/32.png) [@devnullroot](https://forum.shopware.com/u/devnullroot)\
**Post date:** [7. September 2020 um 08:29 UTC](https://forum.shopware.com/t/admin-watch-login-geht-nicht-unter-version-6-2-0-rc1/66733/17 "2020-09-07T08:29:17Z")

</div>

Moin Zusammen,

der Source-Code-Hack funktioniert auch in der 6.3.0.2 noch, vielen Dank dafür! Im Vergleich zur 6.1.x fehlt bei mir aber das automatische Reload:

- Da der reine Aufruf von localhost:8080 zum Aufruf des HMR-Admin bei mir, auch mit der shopware.ova ([Shopware 6 - Setting Up a Local Environment with Virtual Box](https://docs.shopware.com/en/shopware-6-en/tutorials-and-faq/virtual-box-setup)) und NAT nie funktioniert hat, sind die Server in den VMs mit einer festen IP verbunden und werden für das HMR z.B. per :9000 aufgerufen
- Das wiederum wird innerhalb der VM von Apache nach localhost:8080 geproxied. Damit läßt sich schon mal das Backend aufrufen
- Der Core-Hack hilft dann beim Einloggen
- Zusätzlich hat die 6.3.x ein fehlerhaftes Script für ./psh.phar administration:watch ([Shopware Issuetracker](https://issues.shopware.com/issues/NEXT-10496)). Die dort beschrieben Lösung funktioniert. Für das Production-Template habe ich die analoge Änderung an der Datei shopware-root/bin/watch-administration.sh durchgeführt (`bin/console feature:dump` auskommentiert).
- Damit werden bei mir alle Skripte kompiliert und stehen dem dev-server zur Verfügung. Allerdings hagelt es `GET http://localhost:8080/sockjs-node/info?t=1599396756356 net::ERR_CONNECTION_REFUSED` Fehler, was auch kein Wunder ist, da localhost:8080 für den Browser ja in Leere führt.

Daher lädt der Browser eben nicht neu - ist nicht sooo dramatisch, aber wenn jemandem noch was dazu einfällt (@rschwering‍, [@Moritz Naczenski]([http://forum.shopware.com/profile/14574/Moritz](http://forum.shopware.com/profile/14574/Moritz) Naczenski “Moritz Naczenski”)‍ ), gerne immer her damit! 😉

Beste Grüße,  
devnullroot
