Skip to content
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

Error after successful login #1079

Closed
AndreiGavriliu opened this issue Dec 30, 2017 · 13 comments
Closed

Error after successful login #1079

AndreiGavriliu opened this issue Dec 30, 2017 · 13 comments
Assignees
Labels
fixed Bugs that are fixed (in a coming release).
Milestone

Comments

@AndreiGavriliu
Copy link

I am using tve latest pull (on my mobile, sorry for not using the template)

Did the following:
Git pull
Composer update
Cache clear

Get following error on dashboard after logging in:
"An exception has been thrown during the rendering of a template ("Undefined property: stdClass::$last (View: /var/www/firefly-iii/vendor/davejamesmiller/laravel ▶"

Please let me know if there’s anything else i can get you

@JC5
Copy link
Member

JC5 commented Dec 30, 2017

Many packages have been updated to the latest major version. Your vendor directory might be lagging behind.

Try this:

rm -rf vendor
rm composer.lock
composer update --no-dev

Should do the trick.

@AndreiGavriliu
Copy link
Author

I just did all that. Now the error page looks different and the error is:

(3/3) Twig_Error_Runtime
An exception has been thrown during the rendering of a template ("Undefined property: stdClass::$last (View: /var/www/firefly-iii/vendor/davejamesmiller/laravel-breadcrumbs/views/bootstrap3.blade.php)") in "/var/www/firefly-iii/resources/views/index.twig" at line 4.

@JC5
Copy link
Member

JC5 commented Dec 30, 2017

Sorry, I've not been able to reproduce this all day. Any other changes in your environment?

@AndreiGavriliu
Copy link
Author

No changes, no updates, nothing. No worries, I’ll do a fresh install and change the database. I’m on vacation now so it’ll have to wait another week or so.

@Findus23
Copy link
Contributor

Hi,
I just got the same Error after updating. The exact error was (I reformatted it a bit to make it readable)

[2017-12-31 09:27:23] production.ERROR: An exception has been thrown during the rendering of a template 
("Undefined property: stdClass::$last (View: /var/www/firefly-iii/vendor/davejamesmiller/laravel-breadcrumbs/views/bootstrap3.blade.php)")
in "/var/www/firefly-iii/resources/views/index.twig" at line 4. 
{
    "userId":1,
    "email":"myemail@example.com",
    "exception":"[object] (Twig_Error_Runtime(code: 0): 
        An exception has been thrown during the rendering of a template 
            (\"Undefined property: stdClass::$last (View: /var/www/firefly-iii/vendor/davejamesmiller/laravel-breadcrumbs/views/bootstrap3.blade.php)\")
            in \"/var/www/firefly-iii/resources/views/index.twig\" at line 4. 
            at /var/www/firefly-iii/vendor/twig/twig/lib/Twig/Template.php:230, 
        ErrorException(code: 0): 
            Undefined property: stdClass::$last 
            (View: /var/www/firefly-iii/vendor/davejamesmiller/laravel-breadcrumbs/views/bootstrap3.blade.php)
            at /var/www/firefly-iii/storage/framework/views/f4236e9b3730a3728e9710f329a07c821cfa2f3c.php:4,
        ErrorException(code: 0):
        Undefined property: stdClass::$last at /var/www/firefly-iii/storage/framework/views/f4236e9b3730a3728e9710f329a07c821cfa2f3c.php:4)
    "
} 

The mentioned file looks like this:

@if (count($breadcrumbs))

    <ol class="breadcrumb">
        @foreach ($breadcrumbs as $breadcrumb)

            @if ($breadcrumb->url && !$loop->last)
                <li><a href="{{ $breadcrumb->url }}">{{ $breadcrumb->title }}</a></li>
            @else
                <li class="active">{{ $breadcrumb->title }}</li>
            @endif

        @endforeach
    </ol>

@endif

I simply removed the && !$loop->last and then firefly loaded without an issue.
Even when I reverted it by deleting the vendor folder and doing an composer install --no-dev it still works.

@JC5
Copy link
Member

JC5 commented Dec 31, 2017

Could you share the info from URL firefly.app/debug with me?

@Findus23
Copy link
Contributor

Debug information generated at 2017-12-31 09:44:50 UTC for Firefly III version 4.6.12.

Variable Content
FF version 4.6.12
PHP version 7.2.0-1+0~20171201111333.14+stretch~1.gbp47ee8a
Host Linux vServer 4.13.0-0.bpo.1-amd64 #1 SMP Debian 4.13.13-1~bpo9+1 (2017-11-22) x86_64
Interface fpm-fcgi
Loaded extensions Core, date, libxml, openssl, pcre, zlib, filter, hash, Reflection, SPL, session, sodium, standard, cgi-fcgi, mysqlnd, PDO, xml, bcmath, calendar, ctype, curl, dom, mbstring, fileinfo, ftp, gd, geoip, gettext, iconv, intl, json, exif, mysqli, pdo_mysql, pdo_sqlite, Phar, posix, readline, shmop, SimpleXML, sockets, sqlite3, sysvmsg, sysvsem, sysvshm, tokenizer, wddx, xmlreader, xmlwriter, xsl, zip, Zend OPcache
UserID 1
DB drivers mysql, sqlite
Current driver mysql
Using Sandstorm? no
Is Sandstorm (.env) 'unknown'
Is Docker (.env) 'unknown'
Trusted proxies (.env) (none)
User agent Mozilla/5.0 (X11; Linux x86_64; rv:57.0) Gecko/20100101 Firefox/57.0

@JC5
Copy link
Member

JC5 commented Dec 31, 2017

7.2? That explains at least something, it's not something I test against and it's a major version up. I'll check it out.

JC5 added a commit that referenced this issue Dec 31, 2017
@JC5
Copy link
Member

JC5 commented Dec 31, 2017

OK I still get no errors in PHP7.2. My dev-machine is Ubuntu, not debian. No idea what it could be. I've pushed a fix that will use Twig instead of Laravel Blade which might help.

@JC5 JC5 self-assigned this Dec 31, 2017
@JC5 JC5 added this to the 4.7.0 milestone Dec 31, 2017
@Findus23
Copy link
Contributor

I am also not able to reproduce it anymore after I fixed it the first time. Even deleting the cache doesn't change anything.

@AndreiGavriliu
Copy link
Author

It works again. Thanks for the quick fix

@AndreiGavriliu
Copy link
Author

Here’s mu debug info:

Debug information generated at 2017-12-31 11:21:58 UTC for Firefly III version 4.7.0.

Variable Content
FF version 4.7.0
PHP version 7.1.8-1
Host Linux budget 4.9.41+ #1023 Tue Aug 8 15:47:12 BST 2017 armv6l
Interface apache2handler
Loaded extensions Core, date, libxml, openssl, pcre, zlib, filter, hash, Reflection, SPL, session, standard, apache2handler, mysqlnd, PDO, xml, bcmath, calendar, ctype, curl, dom, mbstring, fileinfo, ftp, gd, gettext, iconv, intl, json, exif, mysqli, pdo_mysql, Phar, posix, readline, shmop, SimpleXML, sockets, sysvmsg, sysvsem, sysvshm, tokenizer, wddx, xmlreader, xmlwriter, xsl, zip, Zend OPcache
UserID 1
DB drivers mysql
Current driver mysql
Using Sandstorm? no
Is Sandstorm (.env) 'unknown'
Is Docker (.env) 'unknown'
Trusted proxies (.env)
User agent Mozilla/5.0 (iPhone; CPU iPhone OS 11_2_1 like Mac OS X) AppleWebKit/604.4.7 (KHTML, like Gecko) Version/11.0 Mobile/15C153 Safari/604.1

@JC5 JC5 added the fixed Bugs that are fixed (in a coming release). label Jan 2, 2018
@JC5 JC5 modified the milestones: 4.7.0, 4.6.13 Jan 6, 2018
@JC5
Copy link
Member

JC5 commented Jan 7, 2018

Release is live, issue will be closed.

@JC5 JC5 closed this as completed Jan 7, 2018
@lock lock bot locked as resolved and limited conversation to collaborators Jan 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
fixed Bugs that are fixed (in a coming release).
Projects
None yet
Development

No branches or pull requests

3 participants