neos / flow-development-collection

The unified repository containing the Flow core packages, used for Flow development.
https://flow.neos.io/
MIT License
138 stars 188 forks source link

Database mapping issues with DateTimeInternface #1672

Closed markusguenther closed 4 years ago

markusguenther commented 5 years ago

Description

Today I tried to setup a new development environment for the 5.0 release. So I cloned the repository and went through the setup.

Neos was not able to create a backend user. First thought it is maybe a setup tool issue but even on cli it is not possible. And when you try to test it with the build in server you also get errors.

Steps to Reproduce

  1. git clone https://github.com/neos/neos-development-distribution.git
  2. cd neos-development-distribution && composer install
  3. ./flow server run

Expected behavior

Server starts and you can setup neos.

Actual behavior

Exception:

Bildschirmfoto 2019-07-17 um 11 08 28

If you don`t use the flow server run and have a local nginx or so. You will fail in generating users.

Failure while evaluating property annotations for class "Neos\ContentRepository\Domain\Model\NodeData": The attribute 'type' is required for the column description of property Neos\ContentRepository\Domain\Model\NodeData::$creationDateTime.
Type: Doctrine\ORM\Mapping\MappingException
  Code: 1382003497
  File:
Data/Temporary/Development/SubContextBeach/SubContextInstance/Cache/Code/Fl

ow_Object_Classes/Neos_Flow_Persistence_Doctrine_Mapping_Driver_FlowAnnotat
        ionDriver.php
  Line: 416

Nested exception:
The attribute 'type' is required for the column description of property
Neos\ContentRepository\Domain\Model\NodeData::$creationDateTime.

  Type: Doctrine\ORM\Mapping\MappingException
  File:
Packages/Libraries/doctrine/orm/lib/Doctrine/ORM/Mapping/MappingException.p
        hp
  Line: 360

  Type: Neos\Flow\Core\Booting\Exception\SubProcessException
  Code: 1355480641
  File: Packages/Framework/Neos.Flow/Classes/Core/Booting/Scripts.php
  Line: 703

Affected Versions

Neos: master

Flow: master

markusguenther commented 5 years ago

While chatting with @albe we maybe found already the related change.

https://github.com/neos/flow-development-collection/pull/1640/files#diff-18e35307a68fb093757fbd5382f9a641

markusguenther commented 5 years ago

The one issue with the DataMapping has been fixed by @albe Tried today to reproduce the second issue with the new master and sadly it still happen.

Exception #1355480641 in line 645 of /Volumes/Development/Locals/Neos-Five-Dev/Packages/Framework/Neos.Flow/Classes/Core/Booting/Scripts.php: string(120) "An exception occurred in driver: SQLSTATE[HY000] [2054] The server requested authentication method unknown to the client"
int(2054)
An exception occurred in driver: SQLSTATE[HY000] [2054] The server requested authentication method unknown to the client

  Type: Doctrine\DBAL\Exception\DriverException
  File: Packages/Libraries/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriv
        er.php
  Line: 108

Nested exception:
SQLSTATE[HY000] [2054] The server requested authentication method unknown to the client

  Type: Doctrine\DBAL\Driver\PDOException
  Code: 2054
  File: Packages/Libraries/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php
  Line: 31

Nested exception:
SQLSTATE[HY000] [2054] The server requested authentication method unknown to the client

  Type: PDOException
  Code: 2054
  File: Packages/Libraries/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php
  Line: 27

Nested exception:
PDO::__construct(): The server requested authentication method unknown to the client [caching_sha2_password]

  Type: PDOException
  File: Packages/Libraries/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php
  Line: 27

14 Neos\Flow\Core\Booting\Scripts::executeCommand("neos.flow:doctrine:compileproxies", array|17|)
13 Neos\Flow\Core\Booting\Scripts::compileDoctrineProxies(Neos\Flow\Core\Bootstrap)
12 Neos\Flow\Core\Booting\Scripts::initializeProxyClasses(Neos\Flow\Core\Bootstrap)
11 call_user_func(array|2|, Neos\Flow\Core\Bootstrap)
10 Neos\Flow\Core\Booting\Step::__invoke(Neos\Flow\Core\Bootstrap)
9 Neos\Flow\Core\Booting\Sequence::invokeStep(Neos\Flow\Core\Booting\Step, Neos\Flow\Core\Bootstrap)
8 Neos\Flow\Core\Booting\Sequence::invokeStep(Neos\Flow\Core\Booting\Step, Neos\Flow\Core\Bootstrap)
7 Neos\Flow\Core\Booting\Sequence::invokeStep(Neos\Flow\Core\Booting\Step, Neos\Flow\Core\Bootstrap)
6 Neos\Flow\Core\Booting\Sequence::invokeStep(Neos\Flow\Core\Booting\Step, Neos\Flow\Core\Bootstrap)
5 Neos\Flow\Core\Booting\Sequence::invoke(Neos\Flow\Core\Bootstrap)
4 Neos\Flow\Cli\CommandRequestHandler::boot("Runtime")
3 Neos\Flow\Cli\CommandRequestHandler::handleRequest()
2 Neos\Flow\Core\Bootstrap::run()
1 require("/Volumes/Development/Locals/Neos-Five-Dev/Packages/Framework/Neos.Flow/Scripts/flow.php")

I already checked if we have changes in the doctrine service but that is pretty "old" code and did work all the time.

The strange thing is. It happens only after clearing cache. So when I clone the development distribution the error comes on the first start. Did I try it the second time the local server is starting and after clearing the cache we have the same issue, but the server did not show the setup in the browser we just get the exception

But to be honest I don`t see any relation to latest changes. But I am not that deep into the flow framework. Some how flow seems to create a database connection even if we have no connection configured.

Bildschirmfoto 2019-07-18 um 09 50 02
markusguenther commented 5 years ago

Ok became even stranger. Can only reproduce this on my iMac. Macbook just works :(

iMac has:

Macbook has:

Already faced the issue with mysql 8 and changed my user passwords. https://mysqlserverteam.com/upgrading-to-mysql-8-0-default-authentication-plugin-considerations/

The strange thing is that this come before I configure any Database credentials. 20190718074945b55f0d.txt

markusguenther commented 5 years ago

Hmm when no one else have this issue... we can close it I guess.

albe commented 4 years ago

I'll close this for now. In case this comes up again, feel free to reopen :)