Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compilation error in file web/views/layout_view.ex == #27

Open
mustela opened this issue Oct 31, 2019 · 2 comments
Open

Compilation error in file web/views/layout_view.ex == #27

mustela opened this issue Oct 31, 2019 · 2 comments
Assignees

Comments

@mustela
Copy link

mustela commented Oct 31, 2019

Hey guys, when trying to run the app mix phx.server, Im having

== Compilation error in file web/views/layout_view.ex ==
** (RuntimeError) unexpected EEx.Engine state: {:safe, [{:|, [], [{:__block__, [], [{:=, [], [{:tmp1, [], Phoenix.HTML.Engine}, [{:|, [], ["", "<!DOCTYPE html>\n<html lang=\"en\">\n  <head>\n    <meta charset=\"utf-8\">\n    <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n    <meta name=\"description\" content=\"\">\n    <meta name=\"author\" content=\"\">\n\n    <title>OAuth2/Phoenix!</title>\n    <link href=\"//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css\" rel=\"stylesheet\">\n    <link rel=\"stylesheet\" href=\""]}]]}, [{:|, [], [{:tmp1, [], Phoenix.HTML.Engine}, {:case, [generated: true], [{:static_path, [line: 12], [{{:., [line: 12], [{:__aliases__, [line: 12, alias: false], [:Phoenix, :HTML, :Engine]}, :fetch_assign]}, [line: 12], [{:var!, [line: 12, context: Phoenix.HTML.Engine, import: Kernel], [{:assigns, [line: 12], Phoenix.HTML.Engine}]}, :conn]}, "/css/app.css"]}, [do: [{:->, [generated: true], [[safe: {:data, [generated: true], Phoenix.HTML.Engine}], {:data, [generated: true], Phoenix.HTML.Engine}]}, {:->, [generated: true], [[{:when, [generated: true], [{:bin, [generated: true], Phoenix.HTML.Engine}, {:is_binary, [generated: true, context: Phoenix.HTML.Engine, import: Kernel], [{:bin, [generated: true], Phoenix.HTML.Engine}]}]}], {{:., [generated: true], [{:__aliases__, [generated: true, alias: false], [:Plug, :HTML]}, :html_escape]}, [generated: true], [{:bin, [generated: true], Phoenix.HTML.Engine}]}]}, {:->, [generated: true], [[{:other, [generated: true], Phoenix.HTML.Engine}], {{:., [line: 12], [{:__aliases__, [line: 12, alias: false], [:Phoenix, :HTML, :Safe]}, :to_iodata]}, [line: 12], [{:other, [line: 12], Phoenix.HTML.Engine}]}]}]]]}]}]]}, "\">\n  </head>\n\n  <body>\n    <div class=\"navbar navbar-inverse navbar-static-top\">\n      <div class=\"container\">\n        <div class=\"navbar-header\">\n          <a class=\"navbar-brand\" href=\"/\">Google OAuth2 Example</a>\n        </div>\n        <ul class=\"nav navbar-nav navbar-right\">\n          <li>\n            <a href=\"https://github.com/GoogleCloudPlatform/elixir-samples/tree/master/auth\">\n              <i class=\"fa fa-github\"></i>\n              View on GitHub\n            </a>\n          </li>\n        </ul>\n      </div>\n    </div>\n    <div class=\"jumbotron\">\n      <span class=\"logo\"></span>\n      <h2>Google OAuth2 Example Application!</h2>\n      <p class=\"lead\">\n        This is an application to show how to wire up\n        <a href=\"https://developers.google.com/identity/protocols/OAuth2\">Google</a> with\n        <a href=\"https://github.com/phoenixframework/phoenix\">Phoenix</a> using\n        <a href=\"https://github.com/scrogson/oauth2\">OAuth2</a>.\n      </p>\n      <p>\n        It is based off of the <a href=\"https://github.com/scrogson/oauth2_example\">OAuth2 Sample Application</a>\n        for Phoenix.\n      </p>\n      <br>\n\n"]}]}. This typically means a bug or an outdated EEx.Engine or tool
    (eex) lib/eex/engine.ex:216: EEx.Engine.check_state!/1
    (eex) lib/eex/engine.ex:161: EEx.Engine.handle_begin/1
    (eex) lib/eex/compiler.ex:56: EEx.Compiler.generate_buffer/4
    (phoenix) lib/phoenix/template.ex:378: Phoenix.Template.compile/2
    (phoenix) lib/phoenix/template.ex:186: anonymous fn/3 in Phoenix.Template."MACRO-__before_compile__"/2
    (elixir) lib/enum.ex:1948: Enum."-reduce/3-lists^foldl/2-0-"/3
    (phoenix) expanding macro: Phoenix.Template.__before_compile__/1
    web/views/layout_view.ex:1: GoogleOAuth2Example.LayoutView (module)
    (elixir) lib/kernel/parallel_compiler.ex:229: anonymous fn/4 in Kernel.ParallelCompiler.spawn_workers/7

Elixir:

Erlang/OTP 22 [erts-10.4.4] [source] [64-bit] [smp:12:12] [ds:12:12:10] [async-threads:1] [hipe] [dtrace]

Elixir 1.9.2 (compiled with Erlang/OTP 20)
@dogweather
Copy link

dogweather commented Jan 21, 2020

I'm getting this as well w/ a non-GCP app — not much to go on.

@dogweather
Copy link

I believe this happens when using recent Elixir versions with older code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants