alexbelgium / hassio-addons

My homeassistant addons
MIT License
1.55k stars 221 forks source link

[Fireflyiii] No ui in 5.7.5 #316

Closed tbaumann closed 2 years ago

tbaumann commented 2 years ago

Which addon?

Firefly

Describe the bug

The newly updated version doesn't work out of the box. It seems to be this error https://github.com/firefly-iii/firefly-iii/issues/6058

To Reproduce

Update to latest version I guess

Full addon log

Password grant client created successfully.
Client ID: 14
Client secret: hyJA8vzPP86rOJiyQMdJa9uuVsE1wnkithpAni8t
Updated version.
+------------------------------------------------------------------------------+
|                                                                              |
| Thank you for installing Firefly III, v5.7.5!                                |
|                                                                              |
|                                                                              |
+------------------------------------------------------------------------------+
Go!
[Fri May 06 21:01:00.031536 2022] [mpm_prefork:notice] [pid 224] AH00163: Apache/2.4.38 (Debian) configured -- resuming normal operations
[Fri May 06 21:01:00.031846 2022] [core:notice] [pid 224] AH00094: Command line: 'apache2 -D FOREGROUND'
[2022-05-06T21:01:12.804152+00:00] local.INFO: AUDIT: User visits homepage. (192.168.100.68 (tilman@baumann.name) -> GET:http://homeassistant.local:3473) [] []
[2022-05-06 21:01:12] local.INFO: Update check is not enabled.  
[2022-05-06 21:01:13] local.ERROR: Exception is: {"class":"TypeError","errorMessage":"bcadd(): Argument #2 ($num2) must be of type string, float given","time":"Fri, 06 May 2022 21:01:13 +0000","file":"\/var\/www\/html\/app\/Support\/Steam.php","line":102,"code":0,"version":"5.7.5","url":"http:\/\/homeassistant.local:3473","userAgent":"Mozilla\/5.0 (X11; Linux x86_64; rv:100.0) Gecko\/20100101 Firefox\/100.0","json":true,"method":"GET"}  
[2022-05-06 21:01:13] local.ERROR: bcadd(): Argument #2 ($num2) must be of type string, float given {"userId":1,"exception":"[object] (TypeError(code: 0): bcadd(): Argument #2 ($num2) must be of type string, float given at /var/www/html/app/Support/Steam.php:102)
[stacktrace]
#0 /var/www/html/app/Support/Steam.php(102): bcadd()
#1 /var/www/html/app/Support/Steam.php(231): FireflyIII\\Support\\Steam->sumTransactions()
#2 /var/www/html/app/Support/Twig/General.php(72): FireflyIII\\Support\\Steam->balance()
#3 /var/www/html/storage/framework/views/twig/f7/f7862c4c87f78f94af80270f9d96fbfe.php(262): FireflyIII\\Support\\Twig\\General::FireflyIII\\Support\\Twig\\{closure}()
#4 /var/www/html/vendor/twig/twig/src/Template.php(171): __TwigTemplate_d9b61c450b6373d17f53a3c82c3c44ee->block_content()
#5 /var/www/html/storage/framework/views/twig/51/5196fbc4950297fb2d8ae79d5c75baf3.php(306): Twig\\Template->displayBlock()
#6 /var/www/html/vendor/twig/twig/src/Template.php(394): __TwigTemplate_af06cec3c1baf37b229ab03531436705->doDisplay()
#7 /var/www/html/vendor/twig/twig/src/Template.php(367): Twig\\Template->displayWithErrorHandling()
#8 /var/www/html/storage/framework/views/twig/f7/f7862c4c87f78f94af80270f9d96fbfe.php(46): Twig\\Template->display()
#9 /var/www/html/vendor/twig/twig/src/Template.php(394): __TwigTemplate_d9b61c450b6373d17f53a3c82c3c44ee->doDisplay()
#10 /var/www/html/vendor/twig/twig/src/Template.php(367): Twig\\Template->displayWithErrorHandling()
#11 /var/www/html/vendor/twig/twig/src/Template.php(379): Twig\\Template->display()
#12 /var/www/html/vendor/twig/twig/src/TemplateWrapper.php(40): Twig\\Template->render()
#13 /var/www/html/vendor/rcrowe/twigbridge/src/Engine/Twig.php(92): Twig\\TemplateWrapper->render()
#14 /var/www/html/vendor/laravel/framework/src/Illuminate/View/View.php(139): TwigBridge\\Engine\\Twig->get()
#15 /var/www/html/vendor/laravel/framework/src/Illuminate/View/View.php(122): Illuminate\\View\\View->getContents()
#16 /var/www/html/vendor/laravel/framework/src/Illuminate/View/View.php(91): Illuminate\\View\\View->renderContents()
#17 /var/www/html/vendor/laravel/framework/src/Illuminate/Http/Response.php(69): Illuminate\\View\\View->render()
#18 /var/www/html/vendor/laravel/framework/src/Illuminate/Http/Response.php(35): Illuminate\\Http\\Response->setContent()
#19 /var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Router.php(833): Illuminate\\Http\\Response->__construct()
#20 /var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Router.php(802): Illuminate\\Routing\\Router::toResponse()
#21 /var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Router.php(725): Illuminate\\Routing\\Router->prepareResponse()
#22 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(141): Illuminate\\Routing\\Router->Illuminate\\Routing\\{closure}()
#23 /var/www/html/app/Http/Middleware/Installer.php(79): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#24 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): FireflyIII\\Http\\Middleware\\Installer->handle()
#25 /var/www/html/app/Http/Controllers/Controller.php(112): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#26 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(162): FireflyIII\\Http\\Controllers\\Controller->FireflyIII\\Http\\Controllers\\{closure}()
#27 /var/www/html/app/Http/Middleware/InterestingMessage.php(67): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#28 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): FireflyIII\\Http\\Middleware\\InterestingMessage->handle()
#29 /var/www/html/app/Http/Middleware/Binder.php(78): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#30 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): FireflyIII\\Http\\Middleware\\Binder->handle()
#31 /var/www/html/app/Http/Middleware/Range.php(62): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#32 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): FireflyIII\\Http\\Middleware\\Range->handle()
#33 /var/www/html/vendor/jc5/google2fa-laravel/src/Middleware.php(29): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#34 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): PragmaRX\\Google2FALaravel\\Middleware->handle()
#35 /var/www/html/app/Http/Middleware/Authenticate.php(75): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#36 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): FireflyIII\\Http\\Middleware\\Authenticate->handle()

#37 /var/www/html/vendor/laravel/passport/src/Http/Middleware/CreateFreshApiToken.php(50): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#38 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Laravel\\Passport\\Http\\Middleware\\CreateFreshApiToken->handle()
#39 /var/www/html/vendor/laravel/framework/src/Illuminate/Session/Middleware/AuthenticateSession.php(59): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#40 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Illuminate\\Session\\Middleware\\AuthenticateSession->handle()
#41 /var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/VerifyCsrfToken.php(78): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#42 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Illuminate\\Foundation\\Http\\Middleware\\VerifyCsrfToken->handle()
#43 /var/www/html/vendor/laravel/framework/src/Illuminate/View/Middleware/ShareErrorsFromSession.php(49): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#44 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Illuminate\\View\\Middleware\\ShareErrorsFromSession->handle()
#45 /var/www/html/vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php(121): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#46 /var/www/html/vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php(64): Illuminate\\Session\\Middleware\\StartSession->handleStatefulRequest()
#47 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Illuminate\\Session\\Middleware\\StartSession->handle()
#48 /var/www/html/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/AddQueuedCookiesToResponse.php(37): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#49 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Illuminate\\Cookie\\Middleware\\AddQueuedCookiesToResponse->handle()
#50 /var/www/html/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/EncryptCookies.php(67): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#51 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Illuminate\\Cookie\\Middleware\\EncryptCookies->handle()
#52 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(116): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#53 /var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Router.php(726): Illuminate\\Pipeline\\Pipeline->then()
#54 /var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Router.php(703): Illuminate\\Routing\\Router->runRouteWithinStack()
#55 /var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Router.php(667): Illuminate\\Routing\\Router->runRoute()
#56 /var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Router.php(656): Illuminate\\Routing\\Router->dispatchToRoute()
#57 /var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(167): Illuminate\\Routing\\Router->dispatch()
#58 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(141): Illuminate\\Foundation\\Http\\Kernel->Illuminate\\Foundation\\Http\\{closure}()
#59 /var/www/html/app/Http/Middleware/InstallationId.php(52): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#60 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): FireflyIII\\Http\\Middleware\\InstallationId->handle()
#61 /var/www/html/vendor/laravel/framework/src/Illuminate/Http/Middleware/TrustProxies.php(39): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#62 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Illuminate\\Http\\Middleware\\TrustProxies->handle()
#63 /var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php(21): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#64 /var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ConvertEmptyStringsToNull.php(31): Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest->handle()
#65 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Illuminate\\Foundation\\Http\\Middleware\\ConvertEmptyStringsToNull->handle()
#66 /var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php(21): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#67 /var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TrimStrings.php(40): Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest->handle()
#68 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Illuminate\\Foundation\\Http\\Middleware\\TrimStrings->handle()
#69 /var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ValidatePostSize.php(27): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#70 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Illuminate\\Foundation\\Http\\Middleware\\ValidatePostSize->handle()
#71 /var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/PreventRequestsDuringMaintenance.php(86): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#72 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Illuminate\\Foundation\\Http\\Middleware\\PreventRequestsDuringMaintenance->handle()
#73 /var/www/html/app/Http/Middleware/SecureHeaders.php(51): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#74 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): FireflyIII\\Http\\Middleware\\SecureHeaders->handle()
#75 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(116): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#76 /var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(142): Illuminate\\Pipeline\\Pipeline->then()
#77 /var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(111): Illuminate\\Foundation\\Http\\Kernel->sendRequestThroughRouter()
#78 /var/www/html/public/index.php(76): Illuminate\\Foundation\\Http\\Kernel->handle()
#79 {main}
"} 
192.168.100.68 - - [06/May/2022:21:01:11 +0000] "GET / HTTP/1.1" 500 6729 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:100.0) Gecko/20100101 Firefox/100.0"

Full addon config defaults, sqlite

System

tbaumann commented 2 years ago

Error message:

Whoops! An error occurred.

Unfortunately, this error was not recoverable :(. Firefly III broke. The error is:

bcadd(): Argument #2 ($num2) must be of type string, float given

alexbelgium commented 2 years ago

Thanks, indeed as you noted a new version of firefly iii is scheduled to be released ASAP with a bug fix, I'll align the addon as soon as this is done

github-actions[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

alexbelgium commented 2 years ago

Corrected in latest version

diamant-x commented 2 years ago

Hi, Sorry to post in this existing issue. I went ahead and updated to this latest release (without doing a backup of the previous one unfortunately) and now I'm facing with error https://github.com/firefly-iii/firefly-iii/issues/6080 . I thought it might be an original code issue, but their developer says no main changes have been done in that code so far.. Not sure if there's a database optimisation script that has occurred and now even restoring an old version just has the same issue for me now.

Does the error on that log message in the commented link is anything familiar?

diamant-x commented 2 years ago

@alexbelgium Apparently the author has found the bug in the latest release for HA addon. Could you please take a look and fix it? Thanks!

https://github.com/firefly-iii/firefly-iii/issues/6080#issuecomment-1128620751

michelebossa commented 2 years ago

I have the same trouble

image

:(

alexbelgium commented 2 years ago

I can replicate - I'll correct that this evening. Typo in my correction for the absence of ui bug ;-)

alexbelgium commented 2 years ago

Sorry guys. It's crazy I had tested it on my system and it worked, and now it doesn't anymore and I can replicate your error message. It seems an issue with sed escaping special characters. I'll look at it this evening

Restoring doesn't work as I was so sure of myself that I stopped tagging the build to a specific release and put it back in latest tag

diamant-x commented 2 years ago

Take your time, as long as there's not data loss in firefly it's fine :) (corrupting the transactions database would be bad though haha).

michelebossa commented 2 years ago

@alexbelgium i have removed an extra ')' into file GroupCollector.php to fix the issue i assume the problem it is on this replace on docker file can you check?

image

I hope will help to fix.

Thanks

alexbelgium commented 2 years ago

Hi, it was a wrong escaping in sed due to the very complex string. I cheated by using this tool to create the escape code and it worked great! I'm rebuilding and if it works I'll issue a new version in a minute. EDIT : version 5.7.5-issuesolvedreally works on my system

There is no database loss that I know of - it's just a continuation of the initial issue reported at top of the thread

However please take the habit of doing backups when updating my addons :-) as update is automated based on upstream releases, if there is an issue in upstream release (like for 5.7.5) then my addon will stop working :-) I myself have set an automation to do a full backup of my installation every week or 2 weeks to limit the potential of data loss including in case of sd card failure (that would lose all your date)

diamant-x commented 2 years ago

EDIT : version 5.7.5-issuesolvedreally works on my system

Working here too. Thanks!

alexbelgium commented 2 years ago

Thanks all!