Forums › Forums › OroPlatform › OroPlatform – Installation/Technical Issues or Problems › Undefined mask: MASK_CREATE_SYSTEM
This topic contains 16 replies, has 3 voices, and was last updated by kirank 7 years, 7 months ago.
Starting from March 1, 2020 the forum has been switched to the read-only mode. Please head to StackOverflow for support.
- CreatorTopic
- July 9, 2016 at 8:13 pm #35350
Hey guys,
I’ve been trying to install OroCommerce with the command
PHP1php app/console oro:install --env prodbut I keep getting the following error:
PHP123456> loading Oro\Bundle\SecurityBundle\Migrations\Data\ORM\AddSearchReindexJob> loading Oro\Bundle\OrganizationBundle\Migrations\Data\ORM\UpdateCustomEntitiesWithOrganization> loading Oro\Bundle\UserBundle\Migrations\Data\ORM\LoadRolesData[InvalidArgumentException]Undefined mask: MASK_CREATE_SYSTEM.Any ideas of what might be happening?
- CreatorTopic
- AuthorReplies
- July 11, 2016 at 2:40 am #35351
Hi,
Please give me our ‘git clone’ command with the help of which you downloaded the OroCommerce code
July 11, 2016 at 10:41 am #35352PHP1git clone https://github.com/orocommerce/orocommerce-application.gitAugust 25, 2016 at 2:03 pm #35353I have the same issue. What was the solution. I’m using Centos 7 VM I cloned the latest git repo as above.
Here’s more debug into:
Shell123456789101112131415161718192021222324252627282930313233343536373839404142434445464748[info] >> process trigger: schedule_integration [create] - updated[info] >> process trigger: sync_email_flag_after_changed [update] - updated[info] >> process triggers modifications stored in DBLoading "main" data fixtures ...> loading [-240] Oro\Bundle\OrganizationBundle\Migrations\Data\ORM\LoadOrganizationAndBusinessUnitData> loading [-230] Oro\Bundle\CalendarBundle\Migrations\Data\ORM\UpdateCalendarWithOrganization> loading Oro\Bundle\OrganizationBundle\Migrations\Data\ORM\MoveOrganizationFromConfig> loading Oro\Bundle\DataGridBundle\Migrations\Data\ORM\LoadAppearanceTypes> loading Oro\Bundle\SegmentBundle\Migrations\Data\ORM\LoadSegmentTypes> loading Oro\Bundle\ReportBundle\Migrations\Data\ORM\LoadReportTypes> loading Oro\Bundle\NotificationBundle\Migrations\Data\ORM\LoadDefaultNotificationEvents> loading Oro\Bundle\LocaleBundle\Migrations\Data\ORM\LoadLocalizationData> loading Oro\Bundle\ImapBundle\Migrations\Data\ORM\ClearInactiveMailboxes> loading Oro\Bundle\CalendarBundle\Migrations\Data\ORM\LoadAttendeeData> loading Oro\Bundle\AddressBundle\Migrations\Data\ORM\LoadAddressTypeData> loading Oro\Bundle\ActivityListBundle\Migrations\Data\ORM\UpdateEmailActivityListDescription> loading Oro\Bundle\AddressBundle\Migrations\Data\ORM\LoadCountryData> loading Oro\Bundle\SecurityBundle\Migrations\Data\ORM\AddSearchReindexJob> loading Oro\Bundle\OrganizationBundle\Migrations\Data\ORM\UpdateCustomEntitiesWithOrganization> loading Oro\Bundle\UserBundle\Migrations\Data\ORM\LoadRolesData[InvalidArgumentException]Undefined mask: MASK_CREATE_SYSTEM.oro:migration:data:load [--fixtures-type [FIXTURES-TYPE]] [--dry-run] [--bundles [BUNDLES]] [--exclude [EXCLUDE]] [-h|--help] [-q|--quiet] [-v|vv|vvv|--verbose] [-V|--version] [--ansi] [--no-ansi] [-n|--no-interaction] [-s|--shell] [--process-isolation] [-e|--env ENV] [--no-debug] [--jms-job-id JMS-JOB-ID] [--disabled-listeners DISABLED-LISTENERS] [--] <command>[RuntimeException]The command '/usr/bin/php' 'app/console' 'oro:migration:data:load' '--no-interaction' '--env=prod' terminated with an exit code: 1.Exception trace:() at /var/www/html/orocompany/orocrm/vendor/oro/platform/src/Oro/Bundle/InstallerBundle/CommandExecutor.php:211Oro\Bundle\InstallerBundle\CommandExecutor->processResult() at /var/www/html/orocompany/orocrm/vendor/oro/platform/src/Oro/Bundle/InstallerBundle/CommandExecutor.php:154Oro\Bundle\InstallerBundle\CommandExecutor->runCommand() at /var/www/html/orocompany/orocrm/vendor/oro/platform/src/Oro/Bundle/InstallerBundle/Command/InstallCommand.php:470Oro\Bundle\InstallerBundle\Command\InstallCommand->loadDataStep() at /var/www/html/orocompany/orocrm/vendor/oro/platform/src/Oro/Bundle/InstallerBundle/Command/InstallCommand.php:131Oro\Bundle\InstallerBundle\Command\InstallCommand->execute() at /var/www/html/orocompany/orocrm/vendor/symfony/symfony/src/Symfony/Component/Console/Command/Command.php:259Symfony\Component\Console\Command\Command->run() at /var/www/html/orocompany/orocrm/vendor/symfony/symfony/src/Symfony/Component/Console/Application.php:863Symfony\Component\Console\Application->doRunCommand() at /var/www/html/orocompany/orocrm/vendor/symfony/symfony/src/Symfony/Component/Console/Application.php:192Symfony\Component\Console\Application->doRun() at /var/www/html/orocompany/orocrm/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Console/Application.php:92Symfony\Bundle\FrameworkBundle\Console\Application->doRun() at /var/www/html/orocompany/orocrm/vendor/jms/job-queue-bundle/JMS/JobQueueBundle/Console/Application.php:45JMS\JobQueueBundle\Console\Application->doRun() at /var/www/html/orocompany/orocrm/vendor/symfony/symfony/src/Symfony/Component/Console/Application.php:123Symfony\Component\Console\Application->run() at /var/www/html/orocompany/orocrm/app/console:23oro:install [--application-url [APPLICATION-URL]] [--organization-name [ORGANIZATION-NAME]] [--user-name [USER-NAME]] [--user-email [USER-EMAIL]] [--user-firstname [USER-FIRSTNAME]] [--user-lastname [USER-LASTNAME]] [--user-password [USER-PASSWORD]] [--skip-assets] [--force] [--symlink] [--sample-data [SAMPLE-DATA]] [--drop-database] [--force-debug] [--timeout [TIMEOUT]] [-h|--help] [-q|--quiet] [-v|vv|vvv|--verbose] [-V|--version] [--ansi] [--no-ansi] [-n|--no-interaction] [-s|--shell] [--process-isolation] [-e|--env ENV] [--no-debug] [--jms-job-id JMS-JOB-ID] [--disabled-listeners DISABLED-LISTENERS] [--] <command>August 26, 2016 at 2:07 am #35354Hi,
Can you show me your packages versions inside “Oro Packages” section there /admin/platform/information?
August 26, 2016 at 5:31 am #35355Sorry, you can’t show me version via UI. Better show platform version using the command:
Shell1composer show oro/platformWill be something like this: “versions : * 1.10.0-beta.3”
Also please send me archive with our project on mkudelia@magecore.com, i will try reproduce issue locally.
P.S. Which version of php do you use?
August 26, 2016 at 8:18 am #35356Sure. I was originally using PHP 7.0.9. But I shifted to 5.6.24 still same issue. All on centos 7.1. I also got a better stack trace — see below. I’ll send a full archive later (but to reproduce, I just followed instructions on the OroCook book installation page). Btw, I also deleted the VM and made a clean VM and database without any other software for this run.
Shell1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889[centos@services2 oro110]$ composer show oro/platformname : oro/platformdescrip. : Business Application Platform (BAP)keywords :versions : * 1.10.0type : librarylicense : MIT License (MIT) (OSI approved) https://spdx.org/licenses/MIT.html#licenseTextsource : [git] https://github.com/orocrm/platform.git 9adcb130dacd9037a4efa3a3e41fb85cf852fee5dist : [zip] https://api.github.com/repos/orocrm/platform/zipball/9adcb130dacd9037a4efa3a3e41fb85cf852fee5 9adcb130dacd9037a4efa3a3e41fb85cf852fee5names : oro/platformautoloadpsr-0Oro\Component => src/Oro\Bundle => src/requiresa2lix/translation-form-bundle dev-1.x-symfony2.8akeneo/batch-bundle 0.4.2ass/xmlsecurity 1.0.0besimple/soap 0.2.2components/backbone 1.1.*components/font-awesome ~4.3.0components/jquery 2.1.*components/underscore 1.7.*composer/composer 1.2.*doctrine/data-fixtures 1.1.1doctrine/dbal 2.5.1doctrine/doctrine-bundle 1.6.3doctrine/doctrine-fixtures-bundle 2.2.0doctrine/orm 2.5.1escapestudios/wsse-authentication-bundle 1.0.2ext-gd *ext-intl *ext-mbstring *ext-xml *ezyang/htmlpurifier 4.6.0friendsofsymfony/jsrouting-bundle 1.5.4friendsofsymfony/rest-bundle 1.7.1genemu/form-bundle 2.2.1guzzle/guzzle 3.7.*hwi/oauth-bundle ~0.3incenteev/composer-parameter-handler 2.1.0jdare/clank-bundle 0.1.*jms/job-queue-bundle 1.2.*jms/serializer 0.14.0jms/serializer-bundle 0.13.0knplabs/knp-gaufrette-bundle 0.1.*knplabs/knp-menu 2.0.0-alpha2knplabs/knp-menu-bundle 2.0.0-alpha2kriswallsmith/assetic 1.3.1leafo/lessphp 0.4.0lexik/maintenance-bundle v1.0.3liip/imagine-bundle 0.17.*liuggio/excelbundle ~2.1monolog/monolog 1.8.*mtdowling/cron-expression 1.0.*nelmio/api-doc-bundle 2.13.0nesbot/carbon 1.8.*ocramius/proxy-manager ~0.4oro/doctrine-extensions 1.0.*oro/jsplumb ~1.7oro/moment-timezone 0.3.*php >=5.5.9piwik/device-detector ~3.0sensio/distribution-bundle 4.0.*sensio/framework-extra-bundle 2.3.4stof/doctrine-extensions-bundle 1.1.0sylius/flow-bundle 0.6.*symfony/assetic-bundle 2.7.1symfony/monolog-bundle 2.7.*symfony/polyfill-php70 1.*symfony/swiftmailer-bundle 2.3.*symfony/symfony 2.8.*tinymce/tinymce 4.1.*twig/extensions 1.0.1twig/twig 1.24.*vakata/jstree ^3.2zendframework/zend-mail 2.1.5requires (dev)behat/behat v3.1.0behat/mink-extension ^2.0behat/mink-selenium2-driver 1.*behat/symfony2-extension 2.1.1bossa/phpspec2-expect ~1.0nelmio/alice ^2.1sensio/generator-bundle 2.5.3[centos@services2 oro110]$Stack track at exception:
Shell123456789101112131415161718192021222324252627#0 Oro\Bundle\SecurityBundle\Acl\Extension\EntityMaskBuilder->getMask() called at [/var/www/html/crm/oro110/vendor/oro/platform/src/Oro/Bundle/SecurityBundle/Acl/Extension/EntityMaskBuilder.php:137]#1 Oro\Bundle\SecurityBundle\Acl\Extension\EntityMaskBuilder->add() called at [/var/www/html/crm/oro110/vendor/oro/platform/src/Oro/Bundle/EmailBundle/EventListener/RoleSubscriber.php:78]#2 Oro\Bundle\EmailBundle\EventListener\RoleSubscriber->postFlush() called at [/var/www/html/crm/oro110/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/ContainerAwareEventManager.php:63]#3 Symfony\Bridge\Doctrine\ContainerAwareEventManager->dispatchEvent() called at [/var/www/html/crm/oro110/vendor/oro/platform/src/Oro/Bundle/EntityBundle/Event/OroEventManager.php:48]#4 Oro\Bundle\EntityBundle\Event\OroEventManager->dispatchEvent() called at [/var/www/html/crm/oro110/vendor/doctrine/orm/lib/Doctrine/ORM/UnitOfWork.php:3313]#5 Doctrine\ORM\UnitOfWork->dispatchPostFlushEvent() called at [/var/www/html/crm/oro110/vendor/doctrine/orm/lib/Doctrine/ORM/UnitOfWork.php:427]#6 Doctrine\ORM\UnitOfWork->commit() called at [/var/www/html/crm/oro110/vendor/doctrine/orm/lib/Doctrine/ORM/EntityManager.php:356]#7 Doctrine\ORM\EntityManager->flush() called at [/var/www/html/crm/oro110/vendor/oro/platform/src/Oro/Bundle/EntityBundle/ORM/OroEntityManager.php:188]#8 Oro\Bundle\EntityBundle\ORM\OroEntityManager->flush() called at [/var/www/html/crm/oro110/vendor/oro/platform/src/Oro/Bundle/UserBundle/Migrations/Data/ORM/LoadRolesData.php:50]#9 Oro\Bundle\UserBundle\Migrations\Data\ORM\LoadRolesData->load() called at [/var/www/html/crm/oro110/vendor/doctrine/data-fixtures/lib/Doctrine/Common/DataFixtures/Executor/AbstractExecutor.php:121]#10 Doctrine\Common\DataFixtures\Executor\AbstractExecutor->load() called at [/var/www/html/crm/oro110/vendor/doctrine/data-fixtures/lib/Doctrine/Common/DataFixtures/Executor/ORMExecutor.php:83]#11 Doctrine\Common\DataFixtures\Executor\ORMExecutor->Doctrine\Common\DataFixtures\Executor\{closure}()#12 call_user_func() called at [/var/www/html/crm/oro110/vendor/doctrine/orm/lib/Doctrine/ORM/EntityManager.php:233]#13 Doctrine\ORM\EntityManager->transactional() called at [/var/www/html/crm/oro110/vendor/doctrine/data-fixtures/lib/Doctrine/Common/DataFixtures/Executor/ORMExecutor.php:85]#14 Doctrine\Common\DataFixtures\Executor\ORMExecutor->execute() called at [/var/www/html/crm/oro110/vendor/oro/platform/src/Oro/Bundle/MigrationBundle/Command/LoadDataFixturesCommand.php:157]#15 Oro\Bundle\MigrationBundle\Command\LoadDataFixturesCommand->processFixtures() called at [/var/www/html/crm/oro110/vendor/oro/platform/src/Oro/Bundle/MigrationBundle/Command/LoadDataFixturesCommand.php:77]#16 Oro\Bundle\MigrationBundle\Command\LoadDataFixturesCommand->execute() called at [/var/www/html/crm/oro110/vendor/symfony/symfony/src/Symfony/Component/Console/Command/Command.php:259]#17 Symfony\Component\Console\Command\Command->run() called at [/var/www/html/crm/oro110/vendor/symfony/symfony/src/Symfony/Component/Console/Application.php:863]#18 Symfony\Component\Console\Application->doRunCommand() called at [/var/www/html/crm/oro110/vendor/symfony/symfony/src/Symfony/Component/Console/Application.php:192]#19 Symfony\Component\Console\Application->doRun() called at [/var/www/html/crm/oro110/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Console/Application.php:92]#20 Symfony\Bundle\FrameworkBundle\Console\Application->doRun() called at [/var/www/html/crm/oro110/vendor/jms/job-queue-bundle/JMS/JobQueueBundle/Console/Application.php:45]#21 JMS\JobQueueBundle\Console\Application->doRun() called at [/var/www/html/crm/oro110/vendor/symfony/symfony/src/Symfony/Component/Console/Application.php:123]#22 Symfony\Component\Console\Application->run() called at [/var/www/html/crm/oro110/app/console:23][InvalidArgumentException]Undefined mask: MASK_CREATE_SYSTEM.August 27, 2016 at 1:47 am #35357In order to work around this issue, I had to modify the following:
1. vendor/oro/platform/src/Oro/Bundle/EmailBundle/EventListener/RoleSubscriber.php
PHP1234567public function postFlush(PostFlushEventArgs $args){// . . .$maskBuilder = $aclManager->getMaskBuilder($oid)->add('VIEW_SYSTEM');// ->add('CREATE_SYSTEM')// ->add('EDIT_SYSTEM');2. vendor/oro/crm/src/OroCRM/Bundle/DemoDataBundle/Migrations/Data/ORM/UpdateEmailAccessLevels.php
PHP1234567protected function updateUserRole(AclManager $manager){// . . .$maskBuilder = $manager->getMaskBuilder($oid)->add('VIEW_BASIC');// ->add('CREATE_BASIC')// ->add('EDIT_BASIC');3. Not load demo data
Can this given any clue to root cause?
August 29, 2016 at 6:03 am #35358Hi,
Hard to say why this error appears. When i can reproduce it locally (you promised archive), i will analyze deeper.
Can you put there, something like this and show me the result?
PHP1var_dump($this->map);August 29, 2016 at 8:31 am #35359I have just sent the zip file for entire source used. Please see my email (from @gmail.com) – please also check in your mail’s spam folder and let me know if you haven’t received it.
There is a debug3.txt file in the folder that consists of all the terminal output.
Command used to run the install was:Shell1php app/console oro:install -vvv --timeout 600 --env=prod > debug3.txtAugust 30, 2016 at 5:50 am #35360Thank you for your archive, but unfortunately i can’t reproduce your issue.
Did you try to clearing your cache directory before installation?
Do you use opcache? If yes, disable it.
Can you show me the result of this sql?MySQL1select * from oro_security_permissionDid you try to install previous version, for example 1.9 ?
Did you try to install on other system?August 30, 2016 at 8:50 am #35361What is your configuration of OS & Database? What is the theoretical reason this would happen? Since the OP also has hit the issue, it seems a real issue right?
Yes, I have a clean install and directly to 1.10. I have not used opcache. I’m in virtual machines so I have tried a clean virtual machine as well. The most recent run I sent was from a clean VM with no other software except httpd.Shell12345678# id, name, label, description, is_apply_to_all, group_namesselect * from oro_security_permission'1', 'VIEW', 'VIEW', '', '1', 'YToxOntpOjA7czo3OiJkZWZhdWx0Ijt9''4', 'CREATE', 'CREATE', '', '1', 'YToxOntpOjA7czo3OiJkZWZhdWx0Ijt9''7', 'EDIT', 'EDIT', '', '1', 'YToxOntpOjA7czo3OiJkZWZhdWx0Ijt9''10', 'DELETE', 'DELETE', '', '1', 'YToxOntpOjA7czo3OiJkZWZhdWx0Ijt9''13', 'ASSIGN', 'ASSIGN', '', '1', 'YToxOntpOjA7czo3OiJkZWZhdWx0Ijt9''16', 'CONFIGURE', 'oro.user.permission.update_configuration.label', '', '0', 'YToxOntpOjA7czo3OiJkZWZhdWx0Ijt9'August 31, 2016 at 3:11 am #35362I’m sitting on macos 10.11, mysql 5.5.48, php 5.5.36, many of our developers is using ubuntu & mysql.
My hypothesis is that the permissions from oro_security_permission is loading from cache and cache contains only VIEW permission, but i’m not sure.
Let’s try to remove cache. Please find vendor/oro/platform/src/Oro/Bundle/SecurityBundle/Acl/Permission/PermissionManager.php file, delete ‘if’ statement inside findPermissions(), getCache() functions, without deleting function calls inside IF’s. Also write ‘var_dump($this->permissions);’ before return of findPermissions() function. In my case i got the following:XHTML1234567891011121314151617> loading Oro\Bundle\ImapBundle\Migrations\Data\ORM\ClearInactiveMailboxes> loading Oro\Bundle\OrganizationBundle\Migrations\Data\ORM\UpdateCustomEntitiesWithOrganization> loading Oro\Bundle\UserBundle\Migrations\Data\ORM\LoadRolesDataarray(6) {["VIEW"]=>int(1)["CREATE"]=>int(2)["EDIT"]=>int(3)["DELETE"]=>int(4)["ASSIGN"]=>int(5)["CONFIGURE"]=>int(6)}August 31, 2016 at 3:48 am #35363My OS is centos 7.2, MySQL 5.6.24, PHP 5.6.24. With the changes you requested its similar to your output. Except for the values are off – your CREATE = 2, my CREATE = 4. I ensured cache folder is deleted and database is clean before running. I also ensured Opcache is force disabled in php.ini.
permissions:
array(6) {
[“VIEW”]=>
int(1)
[“CREATE”]=>
int(4)
[“EDIT”]=>
int(7)
[“DELETE”]=>
int(10)
[“ASSIGN”]=>
int(13)
[“CONFIGURE”]=>
int(16)
}[InvalidArgumentException]
Undefined mask: MASK_CREATE_SYSTEM.Code changes:
PHP1234567891011121314151617181920protected function findPermissions(){// if (null === $this->permissions) {$this->permissions = $this->getCache(static::CACHE_PERMISSIONS);// }echo "permissions: \n";var_dump($this->permissions);return $this->permissions;}protected function getCache($key){// if (false === ($cache = $this->cache->fetch($key))) {$data = $this->buildCache();return !empty($data[$key]) ? $data[$key] : [];// }return $cache;}September 1, 2016 at 1:11 am #35364Hi @kirank,
I sent you the email. Please check it.
September 1, 2016 at 1:29 am #35365I’ve sent the details you’ve asked for.
- AuthorReplies
The forum ‘OroPlatform – Installation/Technical Issues or Problems’ is closed to new topics and replies.