oroinc / crm

Main OroCRM package with core functionality.
Other
647 stars 212 forks source link

Error after login #228

Closed noder123 closed 7 years ago

noder123 commented 7 years ago

Just installed OroCRM. Installation was smooth and I reached the login screen. After login, when I click on any link nothing happens. On refreshing the page I'm getting the following errors (happens in a fresh installation on Oro-platform as well):

Notice: Undefined property: Symfony\Component\Security\Acl\Domain\Entry::$securityIdentity in orocrm/vendor/symfony/security-acl/Domain/Entry.php on line 87

Notice: Undefined property: Symfony\Component\Security\Acl\Domain\Entry::$securityIdentity in orocrm/vendor/symfony/security-acl/Domain/Entry.php on line 87

Notice: Undefined property: Symfony\Component\Security\Acl\Domain\Entry::$securityIdentity in orocrm/vendor/symfony/security-acl/Domain/Entry.php on line 87

Notice: Undefined property: Symfony\Component\Security\Acl\Domain\Entry::$securityIdentity in orocrm/vendor/symfony/security-acl/Domain/Entry.php on line 87

Fatal error: Uncaught TypeError: Argument 1 passed to Symfony\Component\Security\Acl\Domain\UserSecurityIdentity::equals() must implement interface Symfony\Component\Security\Acl\Model\SecurityIdentityInterface, null given, called in orocrm/vendor/oro/platform/src/Oro/Bundle/SecurityBundle/Acl/Domain/PermissionGrantingStrategy.php on line 185 and defined in orocrm/vendor/symfony/security-acl/Domain/UserSecurityIdentity.php:103 Stack trace: #0 orocrm/vendor/oro/platform/src/Oro/Bundle/SecurityBundle/Acl/Domain/PermissionGrantingStrategy.php(185): Symfony\Component\Security\Acl\Domain\UserSecurityIdentity->equals(NULL) #1 orocrm/vendor/oro/platform/src/Oro/Bundle/SecurityBundle/Acl/Domain/PermissionGrantingStrategy.php(87): Oro\Bundle\SecurityBundle\Acl\Domain\PermissionGrantingStrategy->hasSufficientPermissions(Object(Oro\Bundle\SecurityBundle\Acl\Domain\RootBasedAclWrapper), Array, Array, Array, false) #2 orocrm/vendor/oro/platf in orocrm/vendor/symfony/security-acl/Domain/UserSecurityIdentity.php on line 103

I searched on the Internet and on Github repo too but couldn't find a solution, hence creating this issue. PS: Thanks for the great work put together by an awesome team!

mkudelya commented 7 years ago

Hi @noder123

I would like to know, what version of orocrm are you using? Do you use this instructions to install ?

noder123 commented 7 years ago

Hi @mkudelya

I cloned the repo and changed the branch to 1.10. After that, I did $composer install --prefer-dist --no-dev and used install.php on the web browser to complete the installation instead of running $php app/console oro:install --env prod. I've not run websocket and crontab commands though. Should I run those commands too? Edit: I used the following command to clone the repo: $ git clone -b 1.10 https://github.com/orocrm/crm-application.git orocrm

mkudelya commented 7 years ago

@noder123 It is not necessary For now i'm installing 1.10.9 version of orocrm and try your case.

mkudelya commented 7 years ago

Please remove your /app/cache/prod and dev directories and cookies and try again.

noder123 commented 7 years ago

I removed the directories and opened login page in incognito mode in Chrome, still getting the same errors.

mkudelya commented 7 years ago

I have tested 1.10 branch in these php version: 5.5.36, 7.0.9. What is your php version ? Just for test, can you change php to another version and try again ?

noder123 commented 7 years ago

I'm currently running it on my Mac with PHP 7.0.0RC7 and I don't have any other PHP version right now. Let me install PHP 5.6 and try again. Thanks for your time & support!

mkudelya commented 7 years ago

I suppose that this variable don't right unserialize. Hope that is php bug.

mkudelya commented 7 years ago

@noder123 one question about

Notice: Undefined property: Symfony\Component\Security\Acl\Domain\Entry::$securityIdentity in orocrm/vendor/symfony/security-acl/Domain/Entry.php on line 87

Do you have this property in vendor/symfony/security-acl/Domain/Entry.php (28 line) ?

noder123 commented 7 years ago

Updating to PHP 7.0.12 fixed the issue. Thanks for your time!