snipe-it icon indicating copy to clipboard operation
snipe-it copied to clipboard

Issue log-in into the app

Open rnovo-carecloud opened this issue 11 years ago • 23 comments

Installed on ubuntu, was working fine but now im trying login and I got this Exception. Using an Admin Account previously created.

image

rnovo-carecloud avatar Mar 16 '15 14:03 rnovo-carecloud

I created 3 SuperUsers for the three guys on our IT department but we are getting this error when loggin in with users we created.

rnovo-carecloud avatar Mar 16 '15 19:03 rnovo-carecloud

getting this :+1:

Symfony \ Component \ Debug \ Exception \ FatalErrorException (E_ERROR) Call to a member function fullName() on a non-object Open: /var/www/html/app/storage/views/d5c9c980ae1b12ed26eed4124b94dc77 0): ?> created_at))); ?> adminlog->fullName()); ?>

               <td>

Server/Request Data HTTP_HOST assets.carecloud.com HTTP_CONNECTION keep-alive HTTP_CACHE_CONTROL max-age=0 HTTP_ACCEPT text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,/;q=0.8 HTTP_USER_AGENT Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2272.89 Safari/537.36 HTTP_ACCEPT_ENCODING gzip, deflate, sdch HTTP_ACCEPT_LANGUAGE en-US,en;q=0.8 HTTP_COOKIE __qca=P0-246190778-1422969438889; km_ai=dt%2Bt2Z4CQybex74JTqIlz%2Bb9S64%3D; __cdrop=.D6RR3V.; _mkto_trk=id:403-KYL-804&token:_mch-carecloud.com-1422969438757-89046; km_lv=x; km_uq=; _ga=GA1.2.1037859684.1422966587; __CT_Data=gpv=14&apv_16363_www03=14; WRUID=0; laravel_session=eyJpdiI6IkQ2SXVBYVB4ckVhT3lpdTcxYytyUVNIWEk4NDcxTEJHMGNTTjFxeE4rcjA9IiwidmFsdWUiOiJlVzEyZG9RaWFcL2YxSVRiaXdoem14XC81TVNxRlJyV004YUZHVW1UQzVKM1lIT1BnNmVcL2lrTTVXcVRMeHAzb0FzSkxXU2crZ05PWDZkODlLUFZnbzZoQT09IiwibWFjIjoiNjkxZGU0NmM4YmIyMmQ0ZGU0ZWM0NjVhMWUzMTQzZTNhY2NmMDgyMzkxOGE0ZjQzYWE2YmVhNWExMzhhYjgwMSJ9 PATH /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin SERVER_SIGNATURE

Apache/2.4.7 (Ubuntu) Server at assets.carecloud.com Port 80
SERVER_SOFTWARE Apache/2.4.7 (Ubuntu) SERVER_NAME assets.carecloud.com SERVER_ADDR 192.168.123.20 SERVER_PORT 80 REMOTE_ADDR 192.168.123.57 DOCUMENT_ROOT /var/www/html/public REQUEST_SCHEME http CONTEXT_PREFIX
CONTEXT_DOCUMENT_ROOT /var/www/html/public SERVER_ADMIN [no address given] SCRIPT_FILENAME /var/www/html/public/index.php REMOTE_PORT 24702 GATEWAY_INTERFACE CGI/1.1 SERVER_PROTOCOL HTTP/1.1 REQUEST_METHOD GET QUERY_STRING
REQUEST_URI / SCRIPT_NAME /index.php PHP_SELF /index.php REQUEST_TIME_FLOAT 1426531014.098 REQUEST_TIME 1426531014 GET Data empty POST Data empty Files empty Cookies __qca P0-246190778-1422969438889 km_ai dt+t2Z4CQybex74JTqIlz+b9S64= __cdrop .D6RR3V. _mkto_trk id:403-KYL-804&token:_mch-carecloud.com-1422969438757-89046 km_lv x km_uq
_ga GA1.2.1037859684.1422966587 __CT_Data gpv=14&apv_16363_www03=14 WRUID 0 laravel_session eyJpdiI6IkQ2SXVBYVB4ckVhT3lpdTcxYytyUVNIWEk4NDcxTEJHMGNTTjFxeE4rcjA9IiwidmFsdWUiOiJlVzEyZG9RaWFcL2YxSVRiaXdoem14XC81TVNxRlJyV004YUZHVW1UQzVKM1lIT1BnNmVcL2lrTTVXcVRMeHAzb0FzSkxXU2crZ05PWDZkODlLUFZnbzZoQT09IiwibWFjIjoiNjkxZGU0NmM4YmIyMmQ0ZGU0ZWM0NjVhMWUzMTQzZTNhY2NmMDgyMzkxOGE0ZjQzYWE2YmVhNWExMzhhYjgwMSJ9 Session empty Environment Variables empty Registered Handlers 0. Whoops\Handler\PrettyPageHandler

rnovo-carecloud avatar Mar 16 '15 19:03 rnovo-carecloud

from /app/storage/logs

root@cc-bl-snipe:/var/www/html/app/storage/logs# vim log-apache2handler-2015-03-16.txt [2015-03-16 14:29:42] local.ERROR: exception 'Symfony\Component\Debug\Exception\FatalErrorException' with message 'Call to a member function fullName() on a non-object' in /var/www/html/app/storage/views/d5c9c980ae1b12ed26eed4124b94dc77:46 Stack trace: #0 [internal function]: Illuminate\Exception\Handler->handleShutdown() #1 {main} [] [] [2015-03-16 14:29:56] local.ERROR: exception 'Symfony\Component\Debug\Exception\FatalErrorException' with message 'Call to a member function fullName() on a non-object' in /var/www/html/app/storage/views/d5c9c980ae1b12ed26eed4124b94dc77:46 Stack trace: #0 [internal function]: Illuminate\Exception\Handler->handleShutdown() #1 {main} [] [] [2015-03-16 14:30:13] local.ERROR: exception 'Symfony\Component\Debug\Exception\FatalErrorException' with message 'Call to a member function fullName() on a non-object' in /var/www/html/app/storage/views/d5c9c980ae1b12ed26eed4124b94dc77:46 Stack trace: #0 [internal function]: Illuminate\Exception\Handler->handleShutdown() #1 {main} [] [] [2015-03-16 14:30:39] local.ERROR: exception 'Symfony\Component\Debug\Exception\FatalErrorException' with message 'Call to a member function fullName() on a non-object' in /var/www/html/app/storage/views/d5c9c980ae1b12ed26eed4124b94dc77:46 Stack trace: #0 [internal function]: Illuminate\Exception\Handler->handleShutdown() #1 {main} [] [] [2015-03-16 14:33:07] local.ERROR: exception 'Symfony\Component\Debug\Exception\FatalErrorException' with message 'Call to a member function fullName() on a non-object' in /var/www/html/app/storage/views/d5c9c980ae1b12ed26eed4124b94dc77:46 Stack trace: #0 [internal function]: Illuminate\Exception\Handler->handleShutdown() #1 {main} [] [] [2015-03-16 14:33:48] local.ERROR: exception 'Symfony\Component\Debug\Exception\FatalErrorException' with message 'Call to a member function fullName() on a non-object' in /var/www/html/app/storage/views/d5c9c980ae1b12ed26eed4124b94dc77:46 Stack trace: #0 [internal function]: Illuminate\Exception\Handler->handleShutdown() #1 {main} [] [] [2015-03-16 14:36:37] local.ERROR: exception 'Symfony\Component\Debug\Exception\FatalErrorException' with message 'Call to a member function fullName() on a non-object' in /var/www/html/app/storage/views/d5c9c980ae1b12ed26eed4124b94dc77:46 Stack trace: #0 [internal function]: Illuminate\Exception\Handler->handleShutdown() #1 {main} [] [] [2015-03-16 14:46:37] local.ERROR: exception 'Symfony\Component\Debug\Exception\FatalErrorException' with message 'Call to a member function fullName() on a non-object' in /var/www/html/app/storage/views/d5c9c980ae1b12ed26eed4124b94dc77:46 Stack trace: #0 [internal function]: Illuminate\Exception\Handler->handleShutdown() #1 {main} [] [] [2015-03-16 14:55:39] local.ERROR: exception 'Symfony\Component\HttpKernel\Exception\NotFoundHttpException' in /var/www/html/vendor/laravel/framework/src/Illuminate/Routing/RouteCollection.php:148 Stack trace: #0 /var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Router.php(1049): Illuminate\Routing\RouteCollection->match(Object(Illuminate\Http\Request)) #1 /var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Router.php(1017): Illuminate\Routing\Router->findRoute(Object(Illuminate\Http\Request)) #2 /var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Router.php(996): Illuminate\Routing\Router->dispatchToRoute(Object(Illuminate\Http\Request)) #3 /var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(777): Illuminate\Routing\Router->dispatch(Object(Illuminate\Http\Request)) #4 /var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(747): Illuminate\Foundation\Application->dispatch(Object(Illuminate\Http\Request)) #5 /var/www/html/vendor/barryvdh/laravel-debugbar/src/Middleware/Stack.php(34): Illuminate\Foundation\Application->handle(Object(Illuminate\Http\Request), 1, true) #6 /var/www/html/vendor/laravel/framework/src/Illuminate/Session/Middleware.php(72): Barryvdh\Debugbar\Middleware\Stack->handle(Object(Illuminate\Http\Request), 1, true) #7 /var/www/html/vendor/laravel/framework/src/Illuminate/Cookie/Queue.php(47): Illuminate\Session\Middleware->handle(Object(Illuminate\Http\Request), 1, true) #8 /var/www/html/vendor/laravel/framework/src/Illuminate/Cookie/Guard.php(51): Illuminate\Cookie\Queue->handle(Object(Illuminate\Http\Request), 1, true) #9 /var/www/html/vendor/stack/builder/src/Stack/StackedHttpKernel.php(23): Illuminate\Cookie\Guard->handle(Object(Illuminate\Http\Request), 1, true) #10 /var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(643): Stack\StackedHttpKernel->handle(Object(Illuminate\Http\Request)) #11 /var/www/html/public/index.php(49): Illuminate\Foundation\Application->run() #12 {main} [] [] [2015-03-16 17:36:12] local.ERROR: exception 'Symfony\Component\HttpKernel\Exception\NotFoundHttpException' in /var/www/html/vendor/laravel/framework/src/Illuminate/Routing/RouteCollection.php:148 Stack trace: #0 /var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Router.php(1049): Illuminate\Routing\RouteCollection->match(Object(Illuminate\Http\Request)) #1 /var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Router.php(1017): Illuminate\Routing\Router->findRoute(Object(Illuminate\Http\Request)) #2 /var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Router.php(996): Illuminate\Routing\Router->dispatchToRoute(Object(Illuminate\Http\Request)) #3 /var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(777): Illuminate\Routing\Router->dispatch(Object(Illuminate\Http\Request)) #4 /var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(747): Illuminate\Foundation\Application->dispatch(Object(Illuminate\Http\Request)) #5 /var/www/html/vendor/barryvdh/laravel-debugbar/src/Middleware/Stack.php(34): Illuminate\Foundation\Application->handle(Object(Illuminate\Http\Request), 1, true) #6 /var/www/html/vendor/laravel/framework/src/Illuminate/Session/Middleware.php(72): Barryvdh\Debugbar\Middleware\Stack->handle(Object(Illuminate\Http\Request), 1, true) #7 /var/www/html/vendor/laravel/framework/src/Illuminate/Cookie/Queue.php(47): Illuminate\Session\Middleware->handle(Object(Illuminate\Http\Request), 1, true) #8 /var/www/html/vendor/laravel/framework/src/Illuminate/Cookie/Guard.php(51): Illuminate\Cookie\Queue->handle(Object(Illuminate\Http\Request), 1, true) #9 /var/www/html/vendor/stack/builder/src/Stack/StackedHttpKernel.php(23): Illuminate\Cookie\Guard->handle(Object(Illuminate\Http\Request), 1, true) #10 /var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(643): Stack\StackedHttpKernel->handle(Object(Illuminate\Http\Request)) #11 /var/www/html/public/index.php(49): Illuminate\Foundation\Application->run() #12 {main} [] [] [2015-03-16 17:44:29] local.ERROR: exception 'Symfony\Component\Debug\Exception\FatalErrorException' with message 'Call to a member function fullName() on a non-object' in /var/www/html/app/storage/views/d5c9c980ae1b12ed26eed4124b94dc77:46 "log-apache2handler-2015-03-16.txt" 101L, 10922C

rnovo-carecloud avatar Mar 16 '15 19:03 rnovo-carecloud

Which version of PHP is this on?

dbiers avatar Mar 16 '15 21:03 dbiers

root@cc-bl-snipe:~# php -v PHP 5.5.9-1ubuntu4.6 (cli) (built: Feb 13 2015 19:17:11) Copyright (c) 1997-2014 The PHP Group Zend Engine v2.5.0, Copyright (c) 1998-2014 Zend Technologies with Zend OPcache v7.0.3, Copyright (c) 1999-2014, by Zend Technologies root@cc-bl-snipe:~#

On Mon, Mar 16, 2015 at 5:35 PM, Dave [email protected] wrote:

Which version of PHP is this on?

— Reply to this email directly or view it on GitHub https://github.com/snipe/snipe-it/issues/664#issuecomment-81951923.

Thank you, Roberto Novo Cruz

CARECLOUD I.T Specialist

rnovo-carecloud avatar Mar 16 '15 22:03 rnovo-carecloud

I just noticed if I press back im able to get in and takes me to the edition of my profile. I have been trying creating new profiles but same result. It was no happening before start happening since created this profiles.

rnovo-carecloud avatar Mar 16 '15 22:03 rnovo-carecloud

@rnovo1983 are you able to attempt it with PHP 5.4.x? I am running it on a CentOS 6.6 VM:

[21:55:06] [root@asset ~]$ php -v
PHP 5.4.38 (cli) (built: Feb 18 2015 16:46:56)
Copyright (c) 1997-2014 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2014 Zend Technologies

dbiers avatar Mar 17 '15 02:03 dbiers

Snipe-IT should run fine on any version of PHP higher than the required one. I test here with 5.4.34, 5.5.18, and 5.6.2.

Can you tell me anything about your data? We typically see that error when an entry (or user) has been deleted. Are there any deleted users in your data?

snipe avatar Mar 17 '15 03:03 snipe

[image: Inline image 1]

On Mon, Mar 16, 2015 at 11:03 PM, snipe [email protected] wrote:

Snipe-IT should run fine on any version of PHP higher than the required one. I test here with 5.4.34, 5.5.18, and 5.6.2.

Can you tell me anything about your data? We typically see that error when an entry (or user) has been deleted. Are there any deleted users in your data?

— Reply to this email directly or view it on GitHub https://github.com/snipe/snipe-it/issues/664#issuecomment-82064365.

Thank you, Roberto Novo Cruz

CARECLOUD I.T Specialist

rnovo-carecloud avatar Mar 17 '15 03:03 rnovo-carecloud

@rnovo1983 image did not come through.

snipe avatar Mar 17 '15 03:03 snipe

have 3 users on user table

rnovo-carecloud avatar Mar 17 '15 03:03 rnovo-carecloud

In the database table? Are any of them deleted?

snipe avatar Mar 17 '15 03:03 snipe

untitled

rnovo-carecloud avatar Mar 17 '15 03:03 rnovo-carecloud

No, all of them are active users

rnovo-carecloud avatar Mar 17 '15 03:03 rnovo-carecloud

Please try deleting the contents (NOT the directories, just the contents) of app/storage/cache and app/storage/views and try reloading

snipe avatar Mar 17 '15 03:03 snipe

You're logging in as yourself when you see this? It looks like the second user is not actually a superadmin. Looks like a -1 there instead of a 1 in that column

snipe avatar Mar 17 '15 03:03 snipe

Is this only happening on the homepage? (Which would really be the dashboard). If you browse to other pages manually, do you still see errors?

snipe avatar Mar 17 '15 03:03 snipe

Same issue here. Happens only at dashboard page.

jotafurtado avatar Mar 30 '15 19:03 jotafurtado

@jotafurtado Can I see the data for your deleted_at, and permissions for your users?

snipe avatar Mar 30 '15 19:03 snipe

I found the problem. At my asset_log I had some records without user. I ran this query and got some null users.

SELECT users.id, asset_logs.user_id FROM asset_logs LEFT JOIN users ON users.id = asset_logs.user_id

Then I deleted the relationships and voilà! Thank you. I hope this help others!

jotafurtado avatar Mar 30 '15 19:03 jotafurtado