在Heroku上部署Symfony 5期间的错误

发布于 2025-01-29 12:54:59 字数 5958 浏览 0 评论 0 原文

我真的需要帮助。我创建了一个应用程序(带有登录和注册),可让您监视正在进行的项目及其相关任务。每个项目都有一个用户作为创建者。我将其部署在Heroku上,当我创建一个项目时,我应该将其重定向到我的帐户(/account ),并列出了所有项目,但是它不起作用。我知道创建该项目是因为我可以在另一个URL上看到其详细信息,例如/project/[id]/详细信息,但是我不能再返回/account url 。我在网站上遇到了这个错误:

Oops! An Error Occurred
The server returned a "500 Internal Server Error".

Something is broken. Please let us know what you were doing when this error occurred. We will fix it as soon as possible. Sorry for any inconvenience caused.

我的Heroku日志:

2022-05-17T10:13:06.508011+00:00 heroku[router]: at=info method=GET path="/account" host=ebi-tracker.herokuapp.com request_id=51d1ce91-7b3d-4619-9692-cd8fcb849910 fwd="77.198.36.214" dyno=web.1 connect=0ms service=23ms status=500 bytes=1113 protocol=https

2022-05-17T10:13:06.503594+00:00 app[web.1]: [2022-05-17T10:13:06.502577+00:00] deprecation.INFO: Deprecated: uasort(): Returning bool from comparison function is deprecated, return an integer less than, equal to, or greater than zero {"exception":"[object] (ErrorException(code: 0): Deprecated: uasort(): Returning bool from comparison function is deprecated, return an integer less than, equal to, or greater than zero at /app/vendor/twig/twig/src/Extension/CoreExtension.php:940)"} []

2022-05-17T10:13:06.506126+00:00 app[web.1]: {"message":"Matched route \"app_account\".","context":{"route":"app_account","route_parameters":{"_route":"app_account","_controller":"App\\Controller\\UserController::account"},"request_uri":"http://ebi-tracker.herokuapp.com/account","method":"GET"},"level":200,"level_name":"INFO","channel":"request","datetime":"2022-05-17T10:13:06.486637+00:00","extra":{}}

2022-05-17T10:13:06.506484+00:00 app[web.1]: {"message":"Checking for authenticator support.","context":{"firewall_name":"main","authenticators":1},"level":100,"level_name":"DEBUG","channel":"security","datetime":"2022-05-17T10:13:06.486973+00:00","extra":{}}

2022-05-17T10:13:06.506917+00:00 app[web.1]: {"message":"Checking support on authenticator.","context":{"firewall_name":"main","authenticator":"App\\Security\\LoginAuthenticator"},"level":100,"level_name":"DEBUG","channel":"security","datetime":"2022-05-17T10:13:06.486978+00:00","extra":{}}

2022-05-17T10:13:06.507429+00:00 app[web.1]: {"message":"Authenticator does not support the request.","context":{"firewall_name":"main","authenticator":"App\\Security\\LoginAuthenticator"},"level":100,"level_name":"DEBUG","channel":"security","datetime":"2022-05-17T10:13:06.486983+00:00","extra":{}}

2022-05-17T10:13:06.507973+00:00 app[web.1]: {"message":"Read existing security token from the session.","context":{"key":"_security_main","token_class":"Symfony\\Component\\Security\\Http\\Authenticator\\Token\\PostAuthenticationToken"},"level":100,"level_name":"DEBUG","channel":"security","datetime":"2022-05-17T10:13:06.499829+00:00","extra":{}}

2022-05-17T10:13:06.508459+00:00 app[web.1]: {"message":"User was reloaded from a user provider.","context":{"provider":"Symfony\\Bridge\\Doctrine\\Security\\User\\EntityUserProvider","username":"[email protected]"},"level":100,"level_name":"DEBUG","channel":"security","datetime":"2022-05-17T10:13:06.502157+00:00","extra":{}}

2022-05-17T10:13:06.509406+00:00 app[web.1]: {"message":"Deprecated: uasort(): Returning bool from comparison function is deprecated, return an integer less than, equal to, or greater than zero","context":{"exception":{"class":"ErrorException","message":"Deprecated: uasort(): Returning bool from comparison function is deprecated, return an integer less than, equal to, or greater than zero","code":0,"file":"/app/vendor/twig/twig/src/Extension/CoreExtension.php:940"}},"level":200,"level_name":"INFO","channel":"deprecation","datetime":"2022-05-17T10:13:06.502577+00:00","extra":{}}

2022-05-17T10:13:06.511950+00:00 app[web.1]: {"message":"Uncaught PHP Exception Twig\\Error\\RuntimeError: \"An exception has been thrown during the rendering of a template (\"The Symfony\\Polyfill\\Intl\\Icu\\IntlDateFormatter::__construct() method's argument $locale value 'fr' behavior is not implemented. Only the locale \"en\" is supported.  Please install the \"intl\" extension for full localization capabilities.\").\" at /tmp/build_4ffe4d79/templates/pages/account/index.html.twig line 29","context":{"exception":{"class":"Twig\\Error\\RuntimeError","message":"An exception has been thrown during the rendering of a template (\"The Symfony\\Polyfill\\Intl\\Icu\\IntlDateFormatter::__construct() method's argument $locale value 'fr' behavior is not implemented. Only the locale \"en\" is supported.  Please install the \"intl\" extension for full localization capabilities.\").","code":0,"file":"/tmp/build_4ffe4d79/templates/pages/account/index.html.twig:29","previous":{"class":"Symfony\\Polyfill\\Intl\\Icu\\Exception\\MethodArgumentValueNotImplementedException","message":"The Symfony\\Polyfill\\Intl\\Icu\\IntlDateFormatter::__construct() method's argument $locale value 'fr' behavior is not implemented. Only the locale \"en\" is supported.  Please install the \"intl\" extension for full localization capabilities.","code":0,"file":"/app/vendor/symfony/polyfill-intl-icu/IntlDateFormatter.php:148"}}},"level":500,"level_name":"CRITICAL","channel":"request","datetime":"2022-05-17T10:13:06.505321+00:00","extra":{}}

2022-05-17T10:13:06.512287+00:00 app[web.1]: {"message":"Stored the security token in the session.","context":{"key":"_security_main"},"level":100,"level_name":"DEBUG","channel":"security","datetime":"2022-05-17T10:13:06.506763+00:00","extra":{}}

2022-05-17T10:13:06.512571+00:00 app[web.1]: 10.1.27.78 - - [17/May/2022:10:13:06 +0000] "GET /account HTTP/1.1" 500 831 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:100.0) Gecko/20100101 Firefox/100.0

I really need help for this one. I created an app (with login and signup) that allows you to monitor ongoing projects and their associated tasks. Each project has a user as creator. I deployed it on Heroku, when I create a project, I should be redirected to my account (/account) and have all the projects listed, but it does not work. I know the project is created because I can see its details on another URL like /project/[id]/details, but I can no longer go back to /account URL. I get this error on my website :

Oops! An Error Occurred
The server returned a "500 Internal Server Error".

Something is broken. Please let us know what you were doing when this error occurred. We will fix it as soon as possible. Sorry for any inconvenience caused.

my Heroku logs :

2022-05-17T10:13:06.508011+00:00 heroku[router]: at=info method=GET path="/account" host=ebi-tracker.herokuapp.com request_id=51d1ce91-7b3d-4619-9692-cd8fcb849910 fwd="77.198.36.214" dyno=web.1 connect=0ms service=23ms status=500 bytes=1113 protocol=https

2022-05-17T10:13:06.503594+00:00 app[web.1]: [2022-05-17T10:13:06.502577+00:00] deprecation.INFO: Deprecated: uasort(): Returning bool from comparison function is deprecated, return an integer less than, equal to, or greater than zero {"exception":"[object] (ErrorException(code: 0): Deprecated: uasort(): Returning bool from comparison function is deprecated, return an integer less than, equal to, or greater than zero at /app/vendor/twig/twig/src/Extension/CoreExtension.php:940)"} []

2022-05-17T10:13:06.506126+00:00 app[web.1]: {"message":"Matched route \"app_account\".","context":{"route":"app_account","route_parameters":{"_route":"app_account","_controller":"App\\Controller\\UserController::account"},"request_uri":"http://ebi-tracker.herokuapp.com/account","method":"GET"},"level":200,"level_name":"INFO","channel":"request","datetime":"2022-05-17T10:13:06.486637+00:00","extra":{}}

2022-05-17T10:13:06.506484+00:00 app[web.1]: {"message":"Checking for authenticator support.","context":{"firewall_name":"main","authenticators":1},"level":100,"level_name":"DEBUG","channel":"security","datetime":"2022-05-17T10:13:06.486973+00:00","extra":{}}

2022-05-17T10:13:06.506917+00:00 app[web.1]: {"message":"Checking support on authenticator.","context":{"firewall_name":"main","authenticator":"App\\Security\\LoginAuthenticator"},"level":100,"level_name":"DEBUG","channel":"security","datetime":"2022-05-17T10:13:06.486978+00:00","extra":{}}

2022-05-17T10:13:06.507429+00:00 app[web.1]: {"message":"Authenticator does not support the request.","context":{"firewall_name":"main","authenticator":"App\\Security\\LoginAuthenticator"},"level":100,"level_name":"DEBUG","channel":"security","datetime":"2022-05-17T10:13:06.486983+00:00","extra":{}}

2022-05-17T10:13:06.507973+00:00 app[web.1]: {"message":"Read existing security token from the session.","context":{"key":"_security_main","token_class":"Symfony\\Component\\Security\\Http\\Authenticator\\Token\\PostAuthenticationToken"},"level":100,"level_name":"DEBUG","channel":"security","datetime":"2022-05-17T10:13:06.499829+00:00","extra":{}}

2022-05-17T10:13:06.508459+00:00 app[web.1]: {"message":"User was reloaded from a user provider.","context":{"provider":"Symfony\\Bridge\\Doctrine\\Security\\User\\EntityUserProvider","username":"[email protected]"},"level":100,"level_name":"DEBUG","channel":"security","datetime":"2022-05-17T10:13:06.502157+00:00","extra":{}}

2022-05-17T10:13:06.509406+00:00 app[web.1]: {"message":"Deprecated: uasort(): Returning bool from comparison function is deprecated, return an integer less than, equal to, or greater than zero","context":{"exception":{"class":"ErrorException","message":"Deprecated: uasort(): Returning bool from comparison function is deprecated, return an integer less than, equal to, or greater than zero","code":0,"file":"/app/vendor/twig/twig/src/Extension/CoreExtension.php:940"}},"level":200,"level_name":"INFO","channel":"deprecation","datetime":"2022-05-17T10:13:06.502577+00:00","extra":{}}

2022-05-17T10:13:06.511950+00:00 app[web.1]: {"message":"Uncaught PHP Exception Twig\\Error\\RuntimeError: \"An exception has been thrown during the rendering of a template (\"The Symfony\\Polyfill\\Intl\\Icu\\IntlDateFormatter::__construct() method's argument $locale value 'fr' behavior is not implemented. Only the locale \"en\" is supported.  Please install the \"intl\" extension for full localization capabilities.\").\" at /tmp/build_4ffe4d79/templates/pages/account/index.html.twig line 29","context":{"exception":{"class":"Twig\\Error\\RuntimeError","message":"An exception has been thrown during the rendering of a template (\"The Symfony\\Polyfill\\Intl\\Icu\\IntlDateFormatter::__construct() method's argument $locale value 'fr' behavior is not implemented. Only the locale \"en\" is supported.  Please install the \"intl\" extension for full localization capabilities.\").","code":0,"file":"/tmp/build_4ffe4d79/templates/pages/account/index.html.twig:29","previous":{"class":"Symfony\\Polyfill\\Intl\\Icu\\Exception\\MethodArgumentValueNotImplementedException","message":"The Symfony\\Polyfill\\Intl\\Icu\\IntlDateFormatter::__construct() method's argument $locale value 'fr' behavior is not implemented. Only the locale \"en\" is supported.  Please install the \"intl\" extension for full localization capabilities.","code":0,"file":"/app/vendor/symfony/polyfill-intl-icu/IntlDateFormatter.php:148"}}},"level":500,"level_name":"CRITICAL","channel":"request","datetime":"2022-05-17T10:13:06.505321+00:00","extra":{}}

2022-05-17T10:13:06.512287+00:00 app[web.1]: {"message":"Stored the security token in the session.","context":{"key":"_security_main"},"level":100,"level_name":"DEBUG","channel":"security","datetime":"2022-05-17T10:13:06.506763+00:00","extra":{}}

2022-05-17T10:13:06.512571+00:00 app[web.1]: 10.1.27.78 - - [17/May/2022:10:13:06 +0000] "GET /account HTTP/1.1" 500 831 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:100.0) Gecko/20100101 Firefox/100.0

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

梦明 2025-02-05 12:54:59

Uncaught PHP Exception Twig\Error\RuntimeError: "An exception has been thrown during the rendering of a template ("The Symfony\Polyfill\Intl\Icu\IntlDateFormatter::__construct() method's argument $locale value 'fr' behavior没有实现。

。 扩展。

intl 您可以通过添加 作为 composer.json 的依赖项:

{
    "require": {
        "ext-intl": "*"
    }
}

commit和redeploy。

然后 /52834633/354577“>启用适当的语言环境,但请查看以上是否首先自行起作用。

Uncaught PHP Exception Twig\Error\RuntimeError: "An exception has been thrown during the rendering of a template ("The Symfony\Polyfill\Intl\Icu\IntlDateFormatter::__construct() method's argument $locale value 'fr' behavior is not implemented. Only the locale "en" is supported. Please install the "intl" extension for full localization capabilities.

So, install the intl extension.

On Heroku you can do that by adding ext-intl as a dependency in your composer.json:

{
    "require": {
        "ext-intl": "*"
    }
}

Then commit and redeploy.

You might also have to enable an appropriate locale, but see if the above works on its own first.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文