Jazz
May 16, 2022, 10:56pm
1
I just ran into another 500 Internal Error issue after upgrading automatically from Softaculous. I’ve noticed several reports and tried a few solutions, but it didn’t work. Is there a known way to resolve this quickly? Very last lines of the logs below:
[2022-05-16 22:33:10] production.INFO: db fails
[2022-05-16 22:38:04] production.ERROR: include(): read of 10476 bytes failed with errno=14 Bad address {"exception":"[object] (ErrorException(code: 0): include(): read of 10476 bytes failed with errno=14 Bad address at /home/mysite/mydomain.in/vendor/composer/ClassLoader.php:571)
[stacktrace]
#0 /home/mysite/mydomain.in/vendor/composer/ClassLoader.php(571): Illuminate\\Foundation\\Bootstrap\\HandleExceptions->handleError(8, 'include(): read...', '/home/mysite/...', 571, Array)
#1 /home/mysite/mydomain.in/vendor/composer/ClassLoader.php(571): include()
#2 /home/mysite/mydomain.in/vendor/composer/ClassLoader.php(428): Composer\\Autoload\\includeFile('/home/mysite/...')
#3 [internal function]: Composer\\Autoload\\ClassLoader->loadClass('App\\\\Models\\\\Acco...')
#4 /home/mysite/mydomain.in/app/Providers/EventServiceProvider.php(580): spl_autoload_call('App\\\\Models\\\\Acco...')
#5 /home/mysite/mydomain.in/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(36): App\\Providers\\EventServiceProvider->boot()
#6 /home/mysite/mydomain.in/vendor/laravel/framework/src/Illuminate/Container/Util.php(40): Illuminate\\Container\\BoundMethod::Illuminate\\Container\\{closure}()
#7 /home/mysite/mydomain.in/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(93): Illuminate\\Container\\Util::unwrapIfClosure(Object(Closure))
#8 /home/mysite/mydomain.in/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(37): Illuminate\\Container\\BoundMethod::callBoundMethod(Object(Illuminate\\Foundation\\Application), Array, Object(Closure))
#9 /home/mysite/mydomain.in/vendor/laravel/framework/src/Illuminate/Container/Container.php(653): Illuminate\\Container\\BoundMethod::call(Object(Illuminate\\Foundation\\Application), Array, Array, NULL)
#10 /home/mysite/mydomain.in/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(924): Illuminate\\Container\\Container->call(Array)
#11 /home/mysite/mydomain.in/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(905): Illuminate\\Foundation\\Application->bootProvider(Object(App\\Providers\\EventServiceProvider))
#12 [internal function]: Illuminate\\Foundation\\Application->Illuminate\\Foundation\\{closure}(Object(App\\Providers\\EventServiceProvider), 34)
#13 /home/mysite/mydomain.in/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(906): array_walk(Array, Object(Closure))
#14 /home/mysite/mydomain.in/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/BootProviders.php(17): Illuminate\\Foundation\\Application->boot()
#15 /home/mysite/mydomain.in/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(237): Illuminate\\Foundation\\Bootstrap\\BootProviders->bootstrap(Object(Illuminate\\Foundation\\Application))
#16 /home/mysite/mydomain.in/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(153): Illuminate\\Foundation\\Application->bootstrapWith(Array)
#17 /home/mysite/mydomain.in/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(137): Illuminate\\Foundation\\Http\\Kernel->bootstrap()
#18 /home/mysite/mydomain.in/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(111): Illuminate\\Foundation\\Http\\Kernel->sendRequestThroughRouter(Object(Illuminate\\Http\\Request))
#19 /home/mysite/mydomain.in/public/index.php(57): Illuminate\\Foundation\\Http\\Kernel->handle(Object(Illuminate\\Http\\Request))
#20 {main}
"}
[2022-05-16 22:44:28] production.INFO: db fails
[2022-05-16 22:44:29] production.INFO: db fails
Hi,
@david do you have any suggestions?
Jazz
June 3, 2022, 8:29pm
3
Can I provide you with any additional input for this?
david
June 3, 2022, 10:44pm
4
Jazz
June 4, 2022, 3:39am
5
@david : No, I haven’t tried it… I relied on automatic updates from Softaculous. I’ll give it a try.
I’m curious to know - what’s the difference between an automated update vs. manually copying over the root project directory?
david
June 4, 2022, 5:03am
6
@Jazz
Softaculous typically handles all the heavy lifting with the upgrade and we rarely see any upgrades go wrong as a result. I’m not sure exactly what has happened here in your case.
One option you may also want to consider is creating a fresh install with softaculous and then pointing it to your old database.
Jazz
November 8, 2022, 12:59pm
7
I intentionally skipped a few updates via Softaculous and now I updated it just fine to v5.5.32-C98. It works great, but I spotted a new issue:
I need to send an invoice cancellation (an invoice with negative values) and the application handles negative item values well, it previews the correct numbers, but when I generate the PDF the numbers are NOT negative anymore - they mistakenly became positive. What could cause that and how to fix it?
david
November 10, 2022, 6:43am
9
@Jazz
Can you advise what steps to recreate this, we’ll take a look.
Jazz
November 10, 2022, 2:16pm
10
Create an Invoice with a single item that has a negative value, keep it as a Draft, or mark it as Sent.
Go to Invoices > check it displays correctly in a preview HTML (Image 1) > now download it as PDF and check the numbers. (Image 2)
Image 1:
Image 2:
Jazz
November 10, 2022, 2:39pm
11
I just noticed another issue after this update:
When I clicked the “Change to the React web app”, it just threw the WSOD and from that point onward I couldn’t use the InvoiceNinja anymore. I had to restore from the last backup to recover from it.
david
November 11, 2022, 12:12am
12
I can’t seem to recreate this at all.
My steps were to create a invoice with a negative value, mark as sent, and then view PDF.
Jazz
November 11, 2022, 7:03am
13
I use the default Phantom JS Cloud for generating PDFs.
What more data could I send you to help you unwrap this issue? Thanks.
david
November 12, 2022, 1:07am
14
@Jazz
Can you try using hosted_ninja for the PDF generator… i wonder if the PDf is just caching.
Jazz
November 12, 2022, 2:50am
15
Unfortunately, I was no able to install the local PDF generator, possibly due my shared hosting’s restrictions, but I’m pretty confident it has nothing to do with the caching since I created the invoice approx. 24h after the update and it was a brand new invoice.
Is there a way to check the source of that particular PDF only? I tried to follow the docs and all I can find is this :
<div id="table-totals" cellspacing="0"><div style="display: flex; flex-direction: column;"><p data-state="encoded-html" data-ref="total_table-public_notes" style="text-align: left;"><p>1 euro - 7.53450 kn
157,60 euro</p>
</p><p style="text-align: left; display: flex; flex-direction: column; page-break-inside: auto;"><span data-state="encoded-html" data-ref="total_table-terms-label" style="font-weight: bold; text-align: left; margin-top: 1rem;"><p>Napomena:</p>
</span><span data-state="encoded-html" data-ref="total_table-terms" style="text-align: left;"><p>U slučaju da navedeni iznos još niste podmirili, molimo Vas da to učinite do naznačenog datuma dospijeća plaćanja.</p>
</span></p><img style="max-width: 50%; height: auto;" src="" id="contact-signature"><div style="margin-top: 1.5rem; display: flex; align-items: flex-start; page-break-inside: auto;"><img src="https://raw.githubusercontent.com/invoiceninja/invoiceninja/v5-develop/public/images/new_logo.png" style="height: 2.5rem;" id="invoiceninja-whitelabel-logo"></div></div><div class="totals-table-right-side" dir="ltr"><div><span data-state="encoded-html" data-ref="totals_table-subtotal-label"><p>Osnovica</p>
</span><span data-state="encoded-html" data-ref="totals_table-subtotal"><p>950,00 HRK</p>
</span></div><div><span data-state="encoded-html" data-ref="totals-table-total_tax_0-label"><p>PDV 25%</p>
</span><span data-state="encoded-html" data-ref="totals-table-total_tax_0"><p>237,50 HRK</p>
</span></div><div><span data-state="encoded-html" data-ref="totals_table-total-label"><p>Sveukupno</p>
</span><span data-state="encoded-html" data-ref="totals_table-total"><p>1.187,50 HRK</p>
</span></div><div><span data-state="encoded-html" hidden="1" data-ref="totals_table-custom_surcharge1-label"><p></p>
</span><span data-state="encoded-html" hidden="1" data-ref="totals_table-custom_surcharge1"><p>0,00 HRK</p>
</span></div><div><span data-state="encoded-html" hidden="1" data-ref="totals_table-custom_surcharge2-label"><p></p>
</span><span data-state="encoded-html" hidden="1" data-ref="totals_table-custom_surcharge2"><p>0,00 HRK</p>
</span></div><div><span data-state="encoded-html" hidden="1" data-ref="totals_table-custom_surcharge3-label"><p></p>
</span><span data-state="encoded-html" hidden="1" data-ref="totals_table-custom_surcharge3"><p>0,00 HRK</p>
</span></div><div><span data-state="encoded-html" hidden="1" data-ref="totals_table-custom_surcharge4-label"><p></p>
</span><span data-state="encoded-html" hidden="1" data-ref="totals_table-custom_surcharge4"><p>0,00 HRK</p>
</span></div><div><span data-state="encoded-html" data-ref="totals_table-outstanding-label"><p>Stanje duga</p>
</span><span data-state="encoded-html" data-ref="totals_table-outstanding"><p>1.187,50 HRK</p>
</span></div><div><span data-state="encoded-html" data-ref="totals_table-paid_to_date-label"><p>Do sada plaćeno</p>
</span><span data-state="encoded-html" data-ref="totals_table-paid_to_date"><p>0,00 HRK</p>
</span></div><div><span></span><span></span></div></div></div>
But it contains the numbers only from the last invoice and the one with negative values was created a few days ago.
david
November 12, 2022, 4:33am
16
hosted_ninja doesn’t require any third party libraries and works like phantoms, but we host the servers.
It would be good to exclude Phantom js as the cause in of this issue.
Jazz
November 12, 2022, 3:15pm
17
For some reason I read “hosted_ninja” and assumed “snappdf”, I didn’t know about “hosted_ninja” as a valid option until now.
Ok, now I set the “hosted_ninja” as a PDF generator in the .env
file, then I ran php artisan optimize
, previewed the same PDF Invoice with negative values about 10 minutes ago (then I previewed another one a minute after that) and the same issue appeared - there are still no negative values on the first PDF Invoice. Could you please take a look?
david
November 12, 2022, 11:47pm
18
@Jazz
I am stumped on this, I also tried converting the invoice into the same currency, no matter what I did, i was unable to get the negative invoice to display positive.
Jazz
November 12, 2022, 11:50pm
19
Thanks for the feedback.
Did you find my PDF generated by hosted_ninja
, nothing super obvious there?
Is there any other hint I could provide from my side in order to help debugging this?