Skip to content

Missing locales mask error reports #1637

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

Closed
symcbean opened this issue Dec 30, 2020 · 2 comments
Closed

Missing locales mask error reports #1637

symcbean opened this issue Dec 30, 2020 · 2 comments
Labels

Comments

@symcbean
Copy link

sysPass Version
3.1 (311.19121601)

Describe the bug
If setLocale() fails, the logs do not show the real reason for faults.

To Reproduce
This was observed on an Ubuntu 18.04 host which, out of the box, only supports the default POSIX locales:
C
C.UTF-8
POSIX

Expected behavior
If setLocale() fails, system should fall back to a default / it might be nice of the installer checked this

Screenshots
If applicable, add screenshots to help explain your problem.

Event log
error #1 was reported before adding locales, error #2 after....

error #1

[2020-12-29 12:45:26] syspass.INFO: logger {"message":"Config file created","caller":"SP\Config\Config::initialize"}
[2020-12-29 12:45:26] syspass.INFO: logger {"message":"Extensions checked","caller":"SP\Core\PhpExtensionChecker::checkMandatory"}
[2020-12-29 12:45:26] syspass.ERROR: logger {"message":"Could not set locale","caller":"SP\Core\Language::setLocales"}
[2020-12-29 12:45:26] syspass.EXCEPTION: logger {"message":"File not found (/var/www/html/syspass/app/cache/icons.cache)
#0 /var/www/html/syspass/lib/SP/Storage/File/FileCacheBase.php(70): SP\Storage\File\FileHandler->checkFileExists()
#1 /var/www/html/syspass/lib/SP/Core/UI/Theme.php(159): SP\Storage\File\FileCacheBase->isExpired(Integer)
#2 /var/www/html/syspass/lib/SP/Core/UI/Theme.php(127): SP\Core\UI\Theme->initIcons()
#3 /var/www/html/syspass/app/modules/web/Init.php(173): SP\Core\UI\Theme->initTheme(Boolean)
#4 /var/www/html/syspass/lib/SP/Bootstrap.php(232): SP\Modules\Web\Init->initialize(String)
#5 [internal function]: SP\Bootstrap->SP{closure}(Object(Klein\Request),Object(Klein\Response),Object(Klein\ServiceProvider),Object(Klein\App),Object(Klein\Klein),Object(Klein\DataCollection\RouteCollection),Array)
#6 /var/www/html/syspass/vendor/klein/klein/src/Klein/Klein.php(886): call_user_func(Object(Closure),Object(Klein\Request),Object(Klein\Response),Object(Klein\ServiceProvider),Object(Klein\App),Object(Klein\Klein),Object(Klein\DataCollection\RouteCollection),Array)
#7 /var/www/html/syspass/vendor/klein/klein/src/Klein/Klein.php(588): Klein\Klein->handleRouteCallback(Object(Klein\Route),Object(Klein\DataCollection\RouteCollection),Array)
#8 /var/www/html/syspass/lib/SP/Bootstrap.php(464): Klein\Klein->dispatch(Object(Klein\Request))
#9 /var/www/html/syspass/lib/Base.php(75): SP\Bootstrap->run(Object(DI\Container))
#10 /var/www/html/syspass/index.php(28): require(String)","caller":"N/A"}

error #2

[2020-12-30 14:22:08] syspass.INFO: logger {"message":"Extensions checked","caller":"SP\Core\PhpExtensionChecker::checkMandatory"}
[2020-12-30 14:22:08] syspass.INFO: logger {"message":"Extensions checked","caller":"SP\Core\PhpExtensionChecker::checkMandatory"}
[2020-12-30 14:22:08] syspass.ERROR: logger {"message":"Token not found","caller":"SP\Services\Api\ApiService::setup"}
[2020-12-30 14:22:08] syspass.EXCEPTION: logger {"message":"Internal error
#0 /var/www/html/syspass/app/modules/api/Controllers/ControllerBase.php(134): SP\Services\Api\ApiService->setup(Integer)
#1 /var/www/html/syspass/app/modules/api/Controllers/AccountController.php(94): SP\Modules\Api\Controllers\ControllerBase->setupApi(Integer)
#2 [internal function]: SP\Modules\Api\Controllers\AccountController->viewPassAction()
#3 /var/www/html/syspass/lib/SP/Bootstrap.php(181): call_user_func(Array)
#4 [internal function]: SP\Bootstrap->SP{closure}(Object(Klein\Request),Object(Klein\Response),Object(Klein\ServiceProvider),Object(Klein\App),Object(Klein\Klein),Object(Klein\DataCollection\RouteCollection),Array)
#5 /var/www/html/syspass/vendor/klein/klein/src/Klein/Klein.php(886): call_user_func(Object(Closure),Object(Klein\Request),Object(Klein\Response),Object(Klein\ServiceProvider),Object(Klein\App),Object(Klein\Klein),Object(Klein\DataCollection\RouteCollection),Array)
#6 /var/www/html/syspass/vendor/klein/klein/src/Klein/Klein.php(588): Klein\Klein->handleRouteCallback(Object(Klein\Route),Object(Klein\DataCollection\RouteCollection),Array)
#7 /var/www/html/syspass/lib/SP/Bootstrap.php(470): Klein\Klein->dispatch(Object(Klein\Request))
#8 /var/www/html/syspass/lib/Base.php(75): SP\Bootstrap->run(Object(DI\Container))
#9 /var/www/html/syspass/api.php(28): require(String)","caller":"N/A"}

Platform (please complete the following information):

  • Linux
  • Ubuntu 18.04
  • any

Additional context
(still working on learning syspass)

@nuxsmin nuxsmin added kind/question v3 3.0 version labels Jan 16, 2021
@nuxsmin
Copy link
Owner

nuxsmin commented Jan 16, 2021

Hello,

it's an error message and it doesn't modify the app behavior, so messages are displayed using the original language (English).

This is the current code implementation:
image

Regards

@nuxsmin nuxsmin closed this as completed Sep 19, 2021
@NetVicious
Copy link

NetVicious commented Sep 25, 2024

To fix this check in your php.ini file the intl.default_locale variable and set it to something like en_US

intl.default_locale = en_US

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

No branches or pull requests

3 participants