Invoice generation error

error: PlatformEXCEPTION(error, promise was rejected with a vlue of ‘undefined’ .,null , null)
BRAND NEW INSTALL of v5.3.22 on debian 9, nginx 1.10. when i click save on any invoice, it takes long to save and the editing screen stays even after the notification “successfully updated invoice”

any advise?

Are there any errors in storage/logs?

Note: in the latest version of the app you remain on the edit screen after saving an invoice.

okay good to know. …how about the tax addition? when I add a product, and quantity, the price dont populate with tax automatically added until i select to add tax.

here is the error i found

[2021-10-11 07:35:57] production.INFO: https://example.com/phantom/invoice/2TknH679N4nwNmsyI1Fycipngn6bA4O32TEtCPLbhgsnFv670ccpXEna07Y4rt4o?phantomjs_secret=secret
[2021-10-11 07:36:01] production.ERROR: There was an error generating the PDF with Phantom JS {“userId”:2,“exception”:"[object] (App\Exceptions\PhantomPDFFailure(code: 0): There was an error generating the PDF with Phantom JS at /opt/$
[stacktrace]
#0 /work/app/Utils/PhantomJS/Phantom.php(100): App\Utils\PhantomJS\Phantom->checkMime()
#1 /work/app/Jobs/Entity/CreateEntityPdf.php(108): App\Utils\PhantomJS\Phantom->generate()
#2 /work/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(36): App\Jobs\Entity\CreateEntityPdf->handle()
#3 /work/vendor/laravel/framework/src/Illuminate/Container/Util.php(40): Illuminate\Container\BoundMethod::Illuminate\Container\{closure}()
#4 /work/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(93): Illuminate\Container\Util::unwrapIfClosure()
#5 /work/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(37): Illuminate\Container\BoundMethod::callBoundMethod()
#6 /work/vendor/laravel/framework/src/Illuminate/Container/Container.php(653): Illuminate\Container\BoundMethod::call()
#7 /work/vendor/laravel/framework/src/Illuminate/Bus/Dispatcher.php(128): Illuminate\Container\Container->call()
#8 /work/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(128): Illuminate\Bus\Dispatcher->Illuminate\Bus\{closure}()
#9 /work/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(103): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#10 /work/vendor/laravel/framework/src/Illuminate/Bus/Dispatcher.php(132): Illuminate\Pipeline\Pipeline->then()
#11 /work/vendor/laravel/framework/src/Illuminate/Foundation/Bus/Dispatchable.php(69): Illuminate\Bus\Dispatcher->dispatchNow()
#12 /work/app/Services/Invoice/GetInvoicePdf.php(48): App\Jobs\Entity\CreateEntityPdf::dispatchNow()
#13 /work/app/Services/Invoice/InvoiceService.php(173): App\Services\Invoice\GetInvoicePdf->run()
#14 /work/app/Http/Controllers/ClientPortal/InvoiceController.php(179): App\Services\Invoice\InvoiceService->getInvoicePdf()
#15 /work/app/Http/Controllers/ClientPortal/InvoiceController.php(83): App\Http\Controllers\ClientPortal\InvoiceController->downloadInvoicePDF()
#16 /work/vendor/laravel/framework/src/Illuminate/Routing/Controller.php(54): App\Http\Controllers\ClientPortal\InvoiceController->bulk()
#17 /work/vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php(45): Illuminate\Routing\Controller->callAction()
#18 /work/vendor/laravel/framework/src/Illuminate/Routing/Route.php(262): Illuminate\Routing\ControllerDispatcher->dispatch()
#19 /work/vendor/laravel/framework/src/Illuminate/Routing/Route.php(205): Illuminate\Routing\Route->runController()
#20 /work/vendor/laravel/framework/src/Illuminate/Routing/Router.php(695): Illuminate\Routing\Route->run()
#21 /work/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(128): Illuminate\Routing\Router->Illuminate\Routing\{closure}()
#22 /work/app/Http/Middleware/QueryLogging.php(40): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#23 /work/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): App\Http\Middleware\QueryLogging->handle()
#24 /work/vendor/laravel/framework/src/Illuminate/Routing/Middleware/SubstituteBindings.php(50): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#25 /work/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Illuminate\Routing\Middleware\SubstituteBindings->handle()
#26 /work/app/Http/Middleware/Locale.php(34): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#27 /work/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): App\Http\Middleware\Locale->handle()
#28 /work/app/Http/Middleware/CheckClientExistence.php(60): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#29 /work/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): App\Http\Middleware\CheckClientExistence->handle()
#30 /work/vendor/laravel/framework/src/Illuminate/Auth/Middleware/Authenticate.php(44): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#31 /work/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Illuminate\Auth\Middleware\Authenticate->handle()
#32 /work/app/Http/Middleware/SetDomainNameDb.php(39): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#33 /work/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): App\Http\Middleware\SetDomainNameDb->handle()
#34 /work/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/VerifyCsrfToken.php(78): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#35 /work/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Illuminate\Foundation\Http\Middleware\VerifyCsrfToken->handle()
#36 /work/vendor/laravel/framework/src/Illuminate/View/Middleware/ShareErrorsFromSession.php(49): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#37 /work/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Illuminate\View\Middleware\ShareErrorsFromSession->handle()
#38 /work/vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php(121): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#39 /work/vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php(64): Illuminate\Session\Middleware\StartSession->handleStatefulRequest()
#40 /work/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Illuminate\Session\Middleware\StartSession->handle()
#41 /work/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/AddQueuedCookiesToResponse.php(37): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#42 /work/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse->handle()
#43 /work/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/EncryptCookies.php(67): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#44 /work/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Illuminate\Cookie\Middleware\EncryptCookies->handle()#37 /work/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Illumina$
#38 /work/vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php(121): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#39 /work/vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php(64): Illuminate\Session\Middleware\StartSession->handleStatefulRequest()
#40 /work/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Illuminate\Session\Middleware\StartSession->handle()
#41 /work/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/AddQueuedCookiesToResponse.php(37): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#42 /work/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse->handle()
#43 /work/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/EncryptCookies.php(67): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#44 /work/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Illuminate\Cookie\Middleware\EncryptCookies->handle()

#45 /work/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(103): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#46 /work/vendor/laravel/framework/src/Illuminate/Routing/Router.php(697): Illuminate\Pipeline\Pipeline->then()
#47 /work/vendor/laravel/framework/src/Illuminate/Routing/Router.php(672): Illuminate\Routing\Router->runRouteWithinStack()
#48 /work/vendor/laravel/framework/src/Illuminate/Routing/Router.php(636): Illuminate\Routing\Router->runRoute()
#49 /work/vendor/laravel/framework/src/Illuminate/Routing/Router.php(625): Illuminate\Routing\Router->dispatchToRoute()
#50 /work/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(166): Illuminate\Routing\Router->dispatch()
#51 /work/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(128): Illuminate\Foundation\Http\Kernel->Illuminate\Foundation\Http\{closure}()
#52 /work/vendor/sentry/sentry-laravel/src/Sentry/Laravel/Http/SetRequestIpMiddleware.php(55): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#53 /work/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Sentry\Laravel\Http\SetRequestIpMiddleware->handle()
#54 /work/vendor/sentry/sentry-laravel/src/Sentry/Laravel/Http/SetRequestMiddleware.php(52): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#55 /work/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Sentry\Laravel\Http\SetRequestMiddleware->handle()
#56 /work/vendor/livewire/livewire/src/DisableBrowserCache.php(19): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#57 /work/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Livewire\DisableBrowserCache->handle()
#58 /work/app/Http/Middleware/Cors.php(25): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#59 /work/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): App\Http\Middleware\Cors->handle()
#60 /work/vendor/fideloper/proxy/src/TrustProxies.php(57): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#61 /work/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Fideloper\Proxy\TrustProxies->handle()
#62 /work/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php(21): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#63 /work/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ConvertEmptyStringsToNull.php(31): Illuminate\Foundation\Http\Middleware\TransformsRequest->handle()
#64 /work/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Illuminate\Foundation\Http\Middleware\ConvertEmptyStringsToNull->handle()
#65 /work/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php(21): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#66 /work/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TrimStrings.php(40): Illuminate\Foundation\Http\Middleware\TransformsRequest->handle()
#67 /work/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Illuminate\Foundation\Http\Middleware\TrimStrings->handle()
#68 /work/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ValidatePostSize.php(27): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#69 /work/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Illuminate\Foundation\Http\Middleware\ValidatePostSize->handle()
#70 /work/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/PreventRequestsDuringMaintenance.php(86): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#71 /work/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Illuminate\Foundation\Http\Middleware\PreventRequestsDuringMaintenance->handle()
#72 /work/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(103): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#73 /work/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(141): Illuminate\Pipeline\Pipeline->then()
#74 /work/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(110): Illuminate\Foundation\Http\Kernel->sendRequestThroughRouter()
#75 /work/public/index.php(57): Illuminate\Foundation\Http\Kernel->handle()
#76 {main}
"}
[2021-10-11 07:40:32] production.INFO: https://example.com/phantom/invoice/2TknH679N4nwNmsyI1Fycipngn6bA4O32TEtCPLbhgsnFv670ccpXEna07Y4rt4o?phantomjs_secret=secret
[2021-10-11 07:41:57] production.INFO: https://example.com/phantom/invoice/2TknH679N4nwNmsyI1Fycipngn6bA4O32TEtCPLbhgsnFv670ccpXEna07Y4rt4o?phantomjs_secret=secret
[2021-10-11 07:58:03] production.INFO: https://example.com/phantom/invoice/tFs6SJEDWg6iuUx5HlCsMl7SoWYpiA5HaMEUrRryvysWyOB3Nh9pJHTkQCV2Bu7P?phantomjs_secret=secret
[2021-10-11 07:59:51] production.INFO: https://example.com/phantom/invoice/tFs6SJEDWg6iuUx5HlCsMl7SoWYpiA5HaMEUrRryvysWyOB3Nh9pJHTkQCV2Bu7P?phantomjs_secret=secret
[2021-10-11 08:07:07] production.INFO: https://example.com/phantom/invoice/tFs6SJEDWg6iuUx5HlCsMl7SoWYpiA5HaMEUrRryvysWyOB3Nh9pJHTkQCV2Bu7P?phantomjs_secret=secret
[2021-10-11 08:13:37] production.INFO: https://example.com/phantom/invoice/tFs6SJEDWg6iuUx5HlCsMl7SoWYpiA5HaMEUrRryvysWyOB3Nh9pJHTkQCV2Bu7P?phantomjs_secret=secret
[2021-10-11 08:23:44] production.INFO: https://example.com/phantom/invoice/tFs6SJEDWg6iuUx5HlCsMl7SoWYpiA5HaMEUrRryvysWyOB3Nh9pJHTkQCV2Bu7P?phantomjs_secret=secret
[2021-10-11 08:30:41] production.INFO: https://example.com/phantom/invoice/2TknH679N4nwNmsyI1Fycipngn6bA4O32TEtCPLbhgsnFv670ccpXEna07Y4rt4o?phantomjs_secret=secret
[2021-10-11 08:31:25] production.INFO: https://example.com/phantom/invoice/2TknH679N4nwNmsyI1Fycipngn6bA4O32TEtCPLbhgsnFv670ccpXEna07Y4rt4o?phantomjs_secret=secret

invoice is emailed alright but the client does not get the link to access portal

i have done the php artisan optimize etc

https://example.com/phantom/invoice/2TknH679N4nwNmsyI1Fycipngn6bA4O32TEtCPLbhgsnFv670ccpXEna07Y4rt4o?phantomjs_secret=secret

I can see the invoice using the above link with actual domain by the way

Is the tax rate set on the product?

There’s info here about the PDF problem: Free Source Available Invoicing, Expenses & Time-Tracking | Invoice Ninja

You may need to add $view_link or $view_button in the email template on Settings > Templates & Reminders.

ok i will try that solution thank you

question: why is it that, when you create a new company, you have to add a user name and then that name will replace all the same names of any existing company?

Each company is not suppose to have its own unique user name? that user name does not appear in the user management section…meaning it is just a first and last name for the company. same names can be used for user account but the same email wont be allowed.

is this a bug Mr. Hillel?

Yes, it’s a bug. We should only show the user details for the first company since it’s shared with the rest. To be fixed…

good…and also, i just discovered right now, that when you click on Add Company and then you change your mind and cancel, the system still adds the company under name New Company and every page refresh or login, you are asked to add user name for the company…until you find the account in the database of companies and delete

also, i found you have more options for the list of industry in the database side than what appears on the list in the dashboard
can you look into that and even add more industries or allow manual entry. maybe exclude (REMOVE the following): government, life science, Aerospace, other, Energy, lol…and you can replace Defense with Law Firm…and now you should add Driving school, Daycare, Hair Salon, Barber shop, Electrician, Plumbing, Cleaning and house keeping, IT Solutions, Party rentals, property management, Decor, Security, Painting, auto detailing, auto mechanic, Web Developer / Web Design, Makeup Artist, etc…or if you can allow individuals to add their own industry to the list

I still have issues generating invoice previews…when I click on view pdf, it spins like it is opening, then it stays blank…both accessing via a computer or the android app over https. I have disabled phantom pdf generation and using snappdf mode. and this time, now error is shown.

Are there any errors in the logs?