What are the Slack Archives?

It’s a history of our time together in the Slack Community! There’s a ton of knowledge in here, so feel free to search through the archives for a possible answer to your question.

Because this space is not active, you won’t be able to create a new post or comment here. If you have a question or want to start a discussion about something, head over to our categories and pick one to post in! You can always refer back to a post from Slack Archives if needed; just copy the link to use it as a reference..

Hi everyone, we just updated our Spryker installation and now tests don't work locally anymore. We'

UQ958DA4U
UQ958DA4U Posts: 232 🧑🏻‍🚀 - Cadet

Hi everyone,

we just updated our Spryker installation and now tests don't work locally anymore. We're getting this error:

╰─$ codecept run
Codeception PHP Testing Framework v4.1.1

[PyzTest\Yves\Application]: tests from /data/tests/PyzTest/Yves/Application

Deprecated: The resolvable class cache is enabled but was not generated. in /data/vendor/spryker/kernel/src/Spryker/Shared/Kernel/ClassResolver/ResolvableCache/CacheReader/CacheReaderPhp.php on line 33

In ErrorHandler.php line 83:

  session_set_save_handler(): Cannot change save handler when headers already sent

If we delete the PyzTest/Yves folder, tests are running again. What are we missing?

Many thanks in advance 🙂

Comments

  • UQ958DA4U
    UQ958DA4U Posts: 232 🧑🏻‍🚀 - Cadet
    edited October 2020

    PS: No blank line / whitespace files to be found anywhere. docker/sdk 1.23.0 is used.

  • UQ958DA4U
    UQ958DA4U Posts: 232 🧑🏻‍🚀 - Cadet

    Any ideas @ULYHPR789?

  • U01732LE0GM
    U01732LE0GM Posts: 6 🧑🏻‍🚀 - Cadet

    @UQ958DA4U we face the same problem, were you able to fix it?
    @U01C2R31NLW

  • sprymiker
    sprymiker Sprykee Posts: 781 🧑🏻‍🚀 - Cadet
    edited October 2020

    It seems Yves helpers somehow init the session.

  • U01C1TABT0V
    U01C1TABT0V Posts: 61 🧑🏻‍🚀 - Cadet

    I have the same issue with b2c-demo-shop version 202009.0 , have you fix it @UQ958DA4U @U01732LE0GM?

  • UQ958DA4U
    UQ958DA4U Posts: 232 🧑🏻‍🚀 - Cadet

    Yes, it is fixed for us. But to be quite honest: I have no idea why. After our initial update woes we were quick to fix anything wrong and in the process the tests have "magically" repaired themselves, probably due to being caused by another issue we fixed in the process.
    One interesting note here: Tests have always worked in CI for us (we don't use docker/sdk for CI) but never locally when we had the problem. That's why I mentioned Mike originally. Now they work both in CI and locally.

  • U01AMEUUMRV
    U01AMEUUMRV Posts: 13 🧑🏻‍🚀 - Cadet

    Same issue - is there an official solution to this Problem? b2b-demo version 202009.0

  • U01AMEUUMRV
    U01AMEUUMRV Posts: 13 🧑🏻‍🚀 - Cadet

    The Problem (in our case) was fixed by running the following command:

    docker/sdk console cache:class-resolver:build
    
  • UPWG9AYH2
    UPWG9AYH2 Posts: 509 🧑🏻‍🚀 - Cadet

    The question is more why its not executed by the docker/sdk init process

  • UPWG9AYH2
    UPWG9AYH2 Posts: 509 🧑🏻‍🚀 - Cadet

    Okay, seems that spryker originally run all their tests using some of the ci deploy ymls which will use on of the receipes under config/install which run an explicit

    cache-class-resolver-build

    command … this is not true just for the docker.yml receipe, except you point it out using the -s option (-s build-production).
    So at least the spryker cli container does not run the cache warmer with deploy.dev.yml … but the application container does. So i guess in the scenario above the tests are running in cli container, so it will throw the error …

  • sprymiker
    sprymiker Sprykee Posts: 781 🧑🏻‍🚀 - Cadet

    It is recommended to disable resolver cache during developing. https://documentation.spryker.com/docs/performance-guidelines#activate-class-resolver-cache

    That is why it is not in dev section. However configuration at the case could be wrong for the environment.

  • UPWG9AYH2
    UPWG9AYH2 Posts: 509 🧑🏻‍🚀 - Cadet

    @ULYHPR789 how do you prefer running tests in between development steps? Switching between different bootstrapping versions might not be efficient in long term i think …

  • sprymiker
    sprymiker Sprykee Posts: 781 🧑🏻‍🚀 - Cadet

    No switching. Such problem won’t appear if resolver cache is disabled for dev and tests.

  • UPWG9AYH2
    UPWG9AYH2 Posts: 509 🧑🏻‍🚀 - Cadet

    Ah okay, there is an extra option in the configs for this …

  • sprymiker
    sprymiker Sprykee Posts: 781 🧑🏻‍🚀 - Cadet

    Yes, it is.