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..

Hey guys, we are facing an issue with error logging on local machines vs stages: some fatal errors (

24

Comments

  • UUZSG90UR
    UUZSG90UR Posts: 14 πŸ§‘πŸ»β€πŸš€ - Cadet

    gracefully ignored :D

  • hard to guess any causes here without knowing th configuration on you dev/stage

  • Unknown
    edited June 2020

    i will try to reproduce the local behaviour now

  • for me it actually triggers an error when i try to access the a null pointer

  • however, that was on a vagrant vm where i had to deactivate the opcache

  • so that is where you might have a look at

  • Unknown
    edited June 2020

    do you have opcache running locally but not on the remote environment?

  • different twig caching settings?

  • same result with opcache, actually

  • Unknown
    edited June 2020

    so, now i need more details

  • 😊

  • UUZSG90UR
    UUZSG90UR Posts: 14 πŸ§‘πŸ»β€πŸš€ - Cadet
    edited June 2020

    we are running spryker in docker locally and with k8s on both stages. if it can't be connected to opcache, what kind of other details could still be of interest?

  • any kind of configuration, spryker, php, additional caches anywhere?

  • but let me check my again against my docker env

  • i assume you run it more or less vanilla?

  • the Spryker Docker SDK?

  • i can confirm that twig on docker will ignore any bullshit info i feed it πŸ€”

  • so, this looks like you most likely have this twig option active on your remote environment:

  • strict_variables [boolean]
    
    If set to false, Twig will silently ignore invalid variables (variables and or attributes/methods that do not exist) and replace them with a null value. When set to true, Twig throws an exception instead (default to false).
    
  • can you confirm?

  • UUZSG90UR
    UUZSG90UR Posts: 14 πŸ§‘πŸ»β€πŸš€ - Cadet

    It works! We have been rewriting twig options in local config in order to add some cache configurations. Globally, strict_variables have been set to true, but our local settings did an override. Adding 'strict_variables' => true fixed it.

    I can't even begin to explain how much pain you have saved us! Thank you so much!

  • you are very welcome! 😊 πŸ‘

  • Valerii Trots
    Valerii Trots SRE @ Spryker Sprykee Posts: 1,654 ✨ - Novice

    I'm still trying to reproduce what you have reported into support.
    @UUZSG90UR sometime ago you reported an issue about twig dump wasn't working and I sent you a patch for the docker config.
    Is your current project already another one?
    I just applied that patch to spryker-shop/b2c-demo-shop and got fail whale page whereas before that patch your null thingy was ignored.

  • U01C1TABT0V
    U01C1TABT0V Posts: 61 πŸ§‘πŸ»β€πŸš€ - Cadet

    hi, i've just finished installation with b2c and got FAIL WHALE issue as well

  • for the fail whale to go away, you best replace the WebHtmlErrorRenderer(?, just search for renderer) with the WebExceptionRenderer in config/Shared/config_default-docker.php

  • it should be in there twice

  • U01C1TABT0V
    U01C1TABT0V Posts: 61 πŸ§‘πŸ»β€πŸš€ - Cadet

    Thanks @UJN2JRU4F but look like I need to replace in both demo & dev files, don't I?

  • U01C1TABT0V
    U01C1TABT0V Posts: 61 πŸ§‘πŸ»β€πŸš€ - Cadet

    I'm currently trying to setup demo shop for b2c

  • U01C1TABT0V
    U01C1TABT0V Posts: 61 πŸ§‘πŸ»β€πŸš€ - Cadet

    ohh, we don't have WebExceptionRenderer class ❓

  • that does not look like the standard demoshop setup πŸ€”