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

Tagging recurring transactions #4070

Closed
zeitwidrig opened this issue Nov 18, 2020 · 3 comments
Closed

Tagging recurring transactions #4070

zeitwidrig opened this issue Nov 18, 2020 · 3 comments
Labels
bug Verified and replicated bugs and issues. fixed Bugs that are fixed (in a coming release).

Comments

@zeitwidrig
Copy link

zeitwidrig commented Nov 18, 2020

I am running Firefly III version 5.4.6.

Description
I create various recurring transactions which are triggered through a cron job that runs daily at 3am. Some of these transactions have a tag and sometimes multiple transactions are triggered on the same day. I get a mail after the job ran with minimal debug information. When a transaction is triggered through the cron job I get the following error message:

In TagRepository.php line 269:
                                                                               
  Typed property FireflyIII\Repositories\Tag\TagRepository::$user must not be accessed before initialization

The thing is: the transaction is created successfully anyway - along with the tag.
But: when there should be 2 transactions only 1 is created. This might be pure coincidence, but maybe it is related.

This can be fixed by calling the cron job manually.

So I'm not sure if this is actually a bug.

Extra info

Debug information generated at 2020-11-18 12:23:04 Europe/Amsterdam for Firefly III version 5.4.6.

Scope Version
Firefly III 5.4.6
Firefly III API 1.4.0
PHP 7.4.12
Host Linux
System info Value
Installation ID 331d3307-21c0-4406-b6ea-47146cf5c578
Using docker? false
Telemetry false
Layout
App environment local
App debug mode false
App cache driver file
App logging notice, daily
Display errors Off
Error reporting ALL errors
Interface fpm-fcgi
Default language en_US
Default locale equal
BCscale 12
DB drivers mysql, pgsql, sqlite
Current driver mysql
DB version 15 (exp. 15)
Login provider eloquent
Trusted proxies (.env)
User info Value
Session start 2020-11-01 00:00:00
Session end 2020-11-30 23:59:59
Session first 2019-06-01 00:00:00
User ID 1
User language en_US
User locale en_US
Attempt at "en_US.utf8" 'en_US.utf8'
Attempt at "en_US.UTF-8" 'en_US.UTF-8'
User agent Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:83.0) Gecko/20100101 Firefox/83.0
@JC5
Copy link
Member

JC5 commented Nov 18, 2020

That's a bug! I'll pick it up 👍

@JC5 JC5 added the bug Verified and replicated bugs and issues. label Nov 18, 2020
@Ettemlevest
Copy link

Having the same issue (5.4.6 Docker). Manually visiting the cron job url is a workaround for now.

stack trace for more info
[2020-12-01 05:53:06] local.ERROR: Typed property FireflyIII\Repositories\Tag\TagRepository::$user must not be accessed before initialization {"exception":"[object] (Error(code: 0): Typed property FireflyIII\\Repositories\\Tag\\TagRepository::$user must not be accessed before initialization at /var/www/html/app/Repositories/Tag/TagRepository.php:269)
[stacktrace]
#0 /var/www/html/app/Support/Search/OperatorQuerySearch.php(471): FireflyIII\\Repositories\\Tag\\TagRepository->searchTag()
#1 /var/www/html/app/Support/Search/OperatorQuerySearch.php(252): FireflyIII\\Support\\Search\\OperatorQuerySearch->updateCollector()
#2 /var/www/html/app/Support/Search/OperatorQuerySearch.php(174): FireflyIII\\Support\\Search\\OperatorQuerySearch->handleSearchNode()
#3 /var/www/html/app/TransactionRules/Engine/SearchRuleEngine.php(258): FireflyIII\\Support\\Search\\OperatorQuerySearch->parseQuery()
#4 /var/www/html/app/TransactionRules/Engine/SearchRuleEngine.php(205): FireflyIII\\TransactionRules\\Engine\\SearchRuleEngine->findStrictRule()
#5 /var/www/html/app/TransactionRules/Engine/SearchRuleEngine.php(129): FireflyIII\\TransactionRules\\Engine\\SearchRuleEngine->fireStrictRule()
#6 /var/www/html/app/TransactionRules/Engine/SearchRuleEngine.php(97): FireflyIII\\TransactionRules\\Engine\\SearchRuleEngine->fireRule()
#7 /var/www/html/app/Handlers/Events/StoredGroupEventHandler.php(70): FireflyIII\\TransactionRules\\Engine\\SearchRuleEngine->fire()
#8 [internal function]: FireflyIII\\Handlers\\Events\\StoredGroupEventHandler->processRules()
#9 /var/www/html/vendor/laravel/framework/src/Illuminate/Events/Dispatcher.php(400): call_user_func_array()
#10 /var/www/html/vendor/laravel/framework/src/Illuminate/Events/Dispatcher.php(226): Illuminate\\Events\\Dispatcher->Illuminate\\Events\\{closure}()
#11 /var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/helpers.php(476): Illuminate\\Events\\Dispatcher->dispatch()
#12 /var/www/html/app/Jobs/CreateRecurringTransactions.php(298): event()
#13 /var/www/html/app/Jobs/CreateRecurringTransactions.php(321): FireflyIII\\Jobs\\CreateRecurringTransactions->handleOccurrence()
#14 /var/www/html/app/Jobs/CreateRecurringTransactions.php(370): FireflyIII\\Jobs\\CreateRecurringTransactions->handleOccurrences()
#15 /var/www/html/app/Jobs/CreateRecurringTransactions.php(114): FireflyIII\\Jobs\\CreateRecurringTransactions->handleRepetitions()
#16 /var/www/html/app/Support/Cronjobs/RecurringCronjob.php(87): FireflyIII\\Jobs\\CreateRecurringTransactions->handle()
#17 /var/www/html/app/Support/Cronjobs/RecurringCronjob.php(70): FireflyIII\\Support\\Cronjobs\\RecurringCronjob->fireRecurring()
#18 /var/www/html/app/Support/Http/Controllers/CronRunner.php(44): FireflyIII\\Support\\Cronjobs\\RecurringCronjob->fire()
#19 /var/www/html/app/Http/Controllers/System/CronController.php(41): FireflyIII\\Http\\Controllers\\System\\CronController->runRecurring()
#20 /var/www/html/vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php(48): FireflyIII\\Http\\Controllers\\System\\CronController->cron()
#21 /var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Route.php(239): Illuminate\\Routing\\ControllerDispatcher->dispatch()
#22 /var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Route.php(196): Illuminate\\Routing\\Route->runController()
#23 /var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Router.php(685): Illuminate\\Routing\\Route->run()
#24 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(128): Illuminate\\Routing\\Router->Illuminate\\Routing\\{closure}()
#25 /var/www/html/app/Http/Middleware/Binder.php(79): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#26 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): FireflyIII\\Http\\Middleware\\Binder->handle()
#27 /var/www/html/app/Http/Middleware/Installer.php(81): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#28 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): FireflyIII\\Http\\Middleware\\Installer->handle()
#29 /var/www/html/vendor/laravel/passport/src/Http/Middleware/CreateFreshApiToken.php(50): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#30 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Laravel\\Passport\\Http\\Middleware\\CreateFreshApiToken->handle()
#31 /var/www/html/vendor/laravel/framework/src/Illuminate/Session/Middleware/AuthenticateSession.php(39): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#32 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Illuminate\\Session\\Middleware\\AuthenticateSession->handle()
#33 /var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/VerifyCsrfToken.php(77): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#34 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Illuminate\\Foundation\\Http\\Middleware\\VerifyCsrfToken->handle()
#35 /var/www/html/vendor/laravel/framework/src/Illuminate/View/Middleware/ShareErrorsFromSession.php(49): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#36 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Illuminate\\View\\Middleware\\ShareErrorsFromSession->handle()
#37 /var/www/html/vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php(116): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#38 /var/www/html/vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php(62): Illuminate\\Session\\Middleware\\StartSession->handleStatefulRequest()
#39 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Illuminate\\Session\\Middleware\\StartSession->handle()
#40 /var/www/html/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/AddQueuedCookiesToResponse.php(37): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#41 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Illuminate\\Cookie\\Middleware\\AddQueuedCookiesToResponse->handle()
#42 /var/www/html/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/EncryptCookies.php(67): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#43 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Illuminate\\Cookie\\Middleware\\EncryptCookies->handle()
#44 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(103): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#45 /var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Router.php(687): Illuminate\\Pipeline\\Pipeline->then()
#46 /var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Router.php(662): Illuminate\\Routing\\Router->runRouteWithinStack()
#47 /var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Router.php(628): Illuminate\\Routing\\Router->runRoute()
#48 /var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Router.php(617): Illuminate\\Routing\\Router->dispatchToRoute()
#49 /var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(165): Illuminate\\Routing\\Router->dispatch()
#50 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(128): Illuminate\\Foundation\\Http\\Kernel->Illuminate\\Foundation\\Http\\{closure}()
#51 /var/www/html/app/Http/Middleware/InstallationId.php(53): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#52 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): FireflyIII\\Http\\Middleware\\InstallationId->handle()
#53 /var/www/html/vendor/fideloper/proxy/src/TrustProxies.php(57): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#54 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Fideloper\\Proxy\\TrustProxies->handle()
#55 /var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php(21): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#56 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest->handle()
#57 /var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php(21): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#58 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest->handle()
#59 /var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ValidatePostSize.php(27): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#60 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Illuminate\\Foundation\\Http\\Middleware\\ValidatePostSize->handle()
#61 /var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/CheckForMaintenanceMode.php(63): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#62 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Illuminate\\Foundation\\Http\\Middleware\\CheckForMaintenanceMode->handle()
#63 /var/www/html/app/Http/Middleware/SecureHeaders.php(51): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#64 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): FireflyIII\\Http\\Middleware\\SecureHeaders->handle()
#65 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(103): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#66 /var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(140): Illuminate\\Pipeline\\Pipeline->then()
#67 /var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(109): Illuminate\\Foundation\\Http\\Kernel->sendRequestThroughRouter()
#68 /var/www/html/public/index.php(76): Illuminate\\Foundation\\Http\\Kernel->handle()
#69 {main}

@JC5
Copy link
Member

JC5 commented Dec 1, 2020

Thanks. A fix will be included in the next release.

@JC5 JC5 added the fixed Bugs that are fixed (in a coming release). label Dec 1, 2020
@JC5 JC5 closed this as completed in d66b031 Jan 29, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 2, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Verified and replicated bugs and issues. fixed Bugs that are fixed (in a coming release).
Projects
None yet
Development

No branches or pull requests

3 participants