Error 500 Internal Server Error

GET https://staging.lineupforecast.com/forgot-password

Forwarded to ErrorController (27feb3)

Exceptions

Impossible to access an attribute ("isAppleLogin") on a null variable in security/forgot-password-anonymous.html.twig at line 23.

Exception

Twig\Error\ RuntimeError

Show exception properties
Twig\Error\RuntimeError {#956
  -lineno: 23
  -rawMessage: "Impossible to access an attribute ("isAppleLogin") on a null variable."
  -source: Twig\Source {#842
    -code: """
      {% extends 'base.html.twig' %}\n
      \n
      {% block title %}Recuperar contraseña | Lineup{% endblock %}\n
      \n
      {% block navbarClass %}d-none {% endblock %}\n
      \n
      {% block navbarContent %}\n
          <a class="fa-link js-show-nprogress" href="{{ path('app_login') }}">\n
              <i class="fa fa-angle-left ml-1"></i>\n
          </a>\n
      {% endblock %}\n
      \n
      {% block bodyClass %}bg-light{% endblock %}\n
      \n
      {% block body %}\n
          <div class="container-fluid px-4">\n
      \n
              <div class="row">\n
                  <div class="col pt-2">\n
                      <div class="d-flex justify-content-center mt-4">\n
                          <img class="m-4" src="{{ asset('assets/svg/logo/lineup-logo-black.svg') }}" height="46px">\n
                      </div>\n
                      {% if app.user.isAppleLogin or app.user.isGoogleLogin %}\n
                          <div class="alert alert-warning">\n
                              No se permite cambiar la contraseña ya que has iniciado sesión con Social Login. Si necesitas asistencia, por favor contacta a soporte@lineupforecast.com.\n
                          </div>\n
                      {% else %}\n
                          <h6 class="mb-4 text-center">Escribe tu email y te enviaremos instrucciones para cambiar tu contraseña.</h6>\n
      \n
      \n
                          {% if(formSubmitted is not defined) %}\n
      \n
                              <form class="form-login mt-4" method="post">\n
                                  {% if error %}\n
                                      <div class="alert alert-danger">{{ error.messageKey|trans(error.messageData, 'security') }}</div>\n
                                  {% endif %}\n
      \n
                                  {{ form_start(form, {'attr': {'class': 'mt-4'} }) }}\n
                                  {{ form_widget(form.email, {'value': email}) }}\n
      \n
                                  <input type="hidden" name="anonymousId" value="{{ anonymousId }}">\n
      \n
                                  <button id="submit" class="btn btn-lg btn-primary btn-block mt-4" type="submit">\n
                                      Enviar instrucciones\n
                                  </button>\n
                                  {{ form_end(form) }}\n
      \n
                              </form>\n
      \n
                          {% else %}\n
      \n
                              <p class="text-center mt-5">Hemos recibido correctamente tu petición.</p>\n
                              <p class="text-center">\n
                                  Si el email indicado pertenece a un usuario de Lineup, enviaremos instrucciones para cambiar la contraseña.\n
                              </p>\n
      \n
                              <p class="text-center">\n
                                  <a href="{{ path('app_login') }}" class="">Iniciar sesión</a>\n
                              </p>\n
      \n
                              {% endif %}\n
                      {% endif %}\n
                  </div>\n
      \n
              </div>\n
              <div class="fixed-bottom border-top bg-white text-center py-3">\n
                  ¿No tienes cuenta? <a href="{{ path('app_signup') }}" class="">Crear cuenta</a>\n
              </div>\n
          </div>\n
      {% endblock %}\n
      \n
      {% block javascripts %}\n
          {{ parent() }}\n
          <script>\n
              window.ReactNativeWebView.postMessage(JSON.stringify({ title: 'Recuperar contraseña' }));\n
          </script>\n
      {% endblock %}
      """
    -name: "security/forgot-password-anonymous.html.twig"
    -path: "/var/www/lineup-staging/templates/security/forgot-password-anonymous.html.twig"
  }
  -phpFile: "/var/www/lineup-staging/vendor/twig/twig/src/Extension/CoreExtension.php"
  -phpLine: 1752
}
  1. <div class="row">
  2. <div class="col pt-2">
  3. <div class="d-flex justify-content-center mt-4">
  4. <img class="m-4" src="{{ asset('assets/svg/logo/lineup-logo-black.svg') }}" height="46px">
  5. </div>
  6. {% if app.user.isAppleLogin or app.user.isGoogleLogin %}
  7. <div class="alert alert-warning">
  8. No se permite cambiar la contraseña ya que has iniciado sesión con Social Login. Si necesitas asistencia, por favor contacta a soporte@lineupforecast.com.
  9. </div>
  10. {% else %}
  11. <h6 class="mb-4 text-center">Escribe tu email y te enviaremos instrucciones para cambiar tu contraseña.</h6>
  1. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("assets/svg/logo/lineup-logo-black.svg"), "html", null, true);
  2. yield "\" height=\"46px\">
  3. </div>
  4. ";
  5. // line 23
  6. if ((CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, (isset($context["app"]) || array_key_exists("app", $context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.', 23, $this->source); })()), "user", [], "any", false, false, false, 23), "isAppleLogin", [], "any", false, false, false, 23) || CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, (isset($context["app"]) || array_key_exists("app", $context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.', 23, $this->source); })()), "user", [], "any", false, false, false, 23), "isGoogleLogin", [], "any", false, false, false, 23))) {
  7. // line 24
  8. yield " <div class=\"alert alert-warning\">
  9. No se permite cambiar la contraseña ya que has iniciado sesión con Social Login. Si necesitas asistencia, por favor contacta a soporte@lineupforecast.com.
  10. </div>
  11. ";
in vendor/twig/twig/src/Template.php -> block_body (line 456)
  1. }
  2. if (null !== $template) {
  3. try {
  4. $template->ensureSecurityChecked();
  5. yield from $template->$block($context, $blocks);
  6. } catch (Error $e) {
  7. if (!$e->getSourceContext()) {
  8. $e->setSourceContext($template->getSourceContext());
  9. }
  1. ";
  2. // line 103
  3. yield "
  4. ";
  5. // line 104
  6. yield from $this->unwrap()->yieldBlock('body', $context, $blocks);
  7. // line 105
  8. yield "
  9. ";
  10. // line 106
  11. yield from $this->unwrap()->yieldBlock('footer', $context, $blocks);
in vendor/twig/twig/src/Template.php -> doDisplay (line 411)
  1. $context += $this->env->getGlobals();
  2. $blocks = array_merge($this->blocks, $blocks);
  3. try {
  4. $this->ensureSecurityChecked();
  5. yield from $this->doDisplay($context, $blocks);
  6. } catch (Error $e) {
  7. if (!$e->getSourceContext()) {
  8. $e->setSourceContext($this->getSourceContext());
  9. }
  1. $__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  2. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "security/forgot-password-anonymous.html.twig"));
  3. $this->parent = $this->load("base.html.twig", 1);
  4. yield from $this->parent->unwrap()->yield($context, array_merge($this->blocks, $blocks));
  5. $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  6. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
in vendor/twig/twig/src/Template.php -> doDisplay (line 411)
  1. $context += $this->env->getGlobals();
  2. $blocks = array_merge($this->blocks, $blocks);
  3. try {
  4. $this->ensureSecurityChecked();
  5. yield from $this->doDisplay($context, $blocks);
  6. } catch (Error $e) {
  7. if (!$e->getSourceContext()) {
  8. $e->setSourceContext($this->getSourceContext());
  9. }
  1. return $this->blocks;
  2. }
  3. public function display(array $context, array $blocks = []): void
  4. {
  5. foreach ($this->yield($context, $blocks) as $data) {
  6. echo $data;
  7. }
  8. }
  9. public function render(array $context): string
in vendor/twig/twig/src/Template.php -> display (line 381)
  1. ob_start();
  2. } else {
  3. ob_start(static function () { return ''; });
  4. }
  5. try {
  6. $this->display($context);
  7. } catch (\Throwable $e) {
  8. while (ob_get_level() > $level) {
  9. ob_end_clean();
  10. }
  1. yield from $this->template->yieldBlock($name, $context);
  2. }
  3. public function render(array $context = []): string
  4. {
  5. return $this->template->render($context);
  6. }
  7. /**
  8. * @return void
  9. */
  1. * @throws SyntaxError When an error occurred during compilation
  2. * @throws RuntimeError When an error occurred during rendering
  3. */
  4. public function render($name, array $context = []): string
  5. {
  6. return $this->load($name)->render($context);
  7. }
  8. /**
  9. * Displays a template.
  10. *
  1. if (null !== $block) {
  2. return $this->container->get('twig')->load($view)->renderBlock($block, $parameters);
  3. }
  4. return $this->container->get('twig')->render($view, $parameters);
  5. }
  6. private function doRender(string $view, ?string $block, array $parameters, ?Response $response, string $method): Response
  7. {
  8. $content = $this->doRenderView($view, $block, $parameters, $method);
  1. return $this->container->get('twig')->render($view, $parameters);
  2. }
  3. private function doRender(string $view, ?string $block, array $parameters, ?Response $response, string $method): Response
  4. {
  5. $content = $this->doRenderView($view, $block, $parameters, $method);
  6. $response ??= new Response();
  7. if (200 === $response->getStatusCode()) {
  8. foreach ($parameters as $v) {
  9. if ($v instanceof FormInterface && $v->isSubmitted() && !$v->isValid()) {
  1. * If an invalid form is found in the list of parameters, a 422 status code is returned.
  2. * Forms found in parameters are auto-cast to form views.
  3. */
  4. protected function render(string $view, array $parameters = [], ?Response $response = null): Response
  5. {
  6. return $this->doRender($view, null, $parameters, $response, __FUNCTION__);
  7. }
  8. /**
  9. * Renders a block in a view.
  10. *
AbstractController->render() in src/Controller/SecurityController.php (line 182)
  1. 'email' => $email,
  2. 'anonymousId' => $request->getSession()->getId(),
  3. 'error' => $error,
  4. ]);
  5. } else {
  6. return $this->render('security/forgot-password-anonymous.html.twig', [
  7. 'form' => $form->createView(),
  8. 'email' => $email,
  9. 'anonymousId' => $request->getSession()->getId(),
  10. 'error' => $error,
  11. ]);
in vendor/symfony/http-kernel/HttpKernel.php -> forgotPassword (line 188)
  1. $this->dispatcher->dispatch($event, KernelEvents::CONTROLLER_ARGUMENTS);
  2. $controller = $event->getController();
  3. $arguments = $event->getArguments();
  4. // call controller
  5. $response = $controller(...$arguments);
  6. // view
  7. if (!$response instanceof Response) {
  8. $event = new ViewEvent($this, $request, $type, $response, $controllerMetadata);
  9. $this->dispatcher->dispatch($event, KernelEvents::VIEW);
  1. $request->headers->set('X-Php-Ob-Level', (string) ob_get_level());
  2. $this->requestStack->push($request);
  3. $response = null;
  4. try {
  5. return $response = $this->handleRaw($request, $type, $controllerMetadata);
  6. } catch (\Throwable $e) {
  7. if ($e instanceof \Error && !$this->handleAllThrowables) {
  8. throw $e;
  9. }
  1. if (!$this->handlingHttpCache) {
  2. $this->resetServices = true;
  3. }
  4. try {
  5. return $this->getHttpKernel()->handle($request, $type, $catch);
  6. } finally {
  7. --$this->requestStackSize;
  8. }
  9. }
  1. ) {
  2. }
  3. public function run(): int
  4. {
  5. $response = $this->kernel->handle($this->request);
  6. $response->send(false);
  7. if (\function_exists('fastcgi_finish_request') && !$this->debug) {
  8. fastcgi_finish_request();
in vendor/autoload_runtime.php -> run (line 32)
  1. $app = $app(...$args);
  2. exit(
  3. $runtime
  4. ->getRunner($app)
  5. ->run()
  6. );
require_once('/var/www/lineup-staging/vendor/autoload_runtime.php') in public/index.php (line 5)
  1. <?php
  2. use App\Kernel;
  3. require_once dirname(__DIR__).'/vendor/autoload_runtime.php';
  4. return function (array $context) {
  5. return new Kernel($context['APP_ENV'], (bool) $context['APP_DEBUG']);
  6. };

Logs

Level Channel Message
INFO 12:22:20 request Matched route "_profiler".
{
    "route": "_profiler",
    "route_parameters": {
        "_route": "_profiler",
        "_controller": "web_profiler.controller.profiler::panelAction",
        "token": "0211e3"
    },
    "request_uri": "https://staging.lineupforecast.com/_profiler/0211e3",
    "method": "GET"
}

Stack Trace

RuntimeError
Twig\Error\RuntimeError:
Impossible to access an attribute ("isAppleLogin") on a null variable in "security/forgot-password-anonymous.html.twig" at line 23.

  at templates/security/forgot-password-anonymous.html.twig:23
  at Twig\Extension\CoreExtension::getAttribute()
     (var/cache/dev/twig/ff/ffd74940b6eb80fed4e83b86549a8db0.php:191)
  at __TwigTemplate_fc6f4d5f9339add54e230ab8212b553d->block_body()
     (vendor/twig/twig/src/Template.php:456)
  at Twig\Template->yieldBlock()
     (var/cache/dev/twig/3a/3a7967e087dfb39af9e4e86bb08d3585.php:222)
  at __TwigTemplate_2a08d965ff5d4d37549ab22d77e541ea->doDisplay()
     (vendor/twig/twig/src/Template.php:411)
  at Twig\Template->yield()
     (var/cache/dev/twig/ff/ffd74940b6eb80fed4e83b86549a8db0.php:58)
  at __TwigTemplate_fc6f4d5f9339add54e230ab8212b553d->doDisplay()
     (vendor/twig/twig/src/Template.php:411)
  at Twig\Template->yield()
     (vendor/twig/twig/src/Template.php:366)
  at Twig\Template->display()
     (vendor/twig/twig/src/Template.php:381)
  at Twig\Template->render()
     (vendor/twig/twig/src/TemplateWrapper.php:51)
  at Twig\TemplateWrapper->render()
     (vendor/twig/twig/src/Environment.php:333)
  at Twig\Environment->render()
     (vendor/symfony/framework-bundle/Controller/AbstractController.php:472)
  at Symfony\Bundle\FrameworkBundle\Controller\AbstractController->doRenderView()
     (vendor/symfony/framework-bundle/Controller/AbstractController.php:477)
  at Symfony\Bundle\FrameworkBundle\Controller\AbstractController->doRender()
     (vendor/symfony/framework-bundle/Controller/AbstractController.php:281)
  at Symfony\Bundle\FrameworkBundle\Controller\AbstractController->render()
     (src/Controller/SecurityController.php:182)
  at App\Controller\SecurityController->forgotPassword()
     (vendor/symfony/http-kernel/HttpKernel.php:188)
  at Symfony\Component\HttpKernel\HttpKernel->handleRaw()
     (vendor/symfony/http-kernel/HttpKernel.php:79)
  at Symfony\Component\HttpKernel\HttpKernel->handle()
     (vendor/symfony/http-kernel/Kernel.php:143)
  at Symfony\Component\HttpKernel\Kernel->handle()
     (vendor/symfony/runtime/Runner/Symfony/HttpKernelRunner.php:34)
  at Symfony\Component\Runtime\Runner\Symfony\HttpKernelRunner->run()
     (vendor/autoload_runtime.php:32)
  at require_once('/var/www/lineup-staging/vendor/autoload_runtime.php')
     (public/index.php:5)