An Error Occured

image

Hi Guys, like you I’ve been a invoiceninja warrior for several years and am really excited about version 5! I have just recently successfully installed it, and with zero data in the system i wanted to play with the features before i migrate anything from my live version.

Everything seemed to work fine until I got to the best part “Creating the invoice”.

  • Settings > Invoice Design, then i Selected Plain, then clicked “Customize and Preview”.

A few seconds passed then i received the message "An error occurred, 500: Internal Server Error. This happens for any invoice template i choose. Can any of you guys help me out? Thanks in advance.

quite possibly a bug, are there any errors in the logs?

Good question, how and where can i access the logs? Thanks.

Hi There, you can find the logs in.

storage/logs/

I found this…

Error Output:

Error: Failed to launch chrome!
[0716/152534.777943:FATAL:zygote_host_impl_linux.cc(116)] No usable sandbox! Update your kernel or see https://chromium.googlesource.com/chromium/src/+/master/docs/linux_suid_sandbox_development.md for more information on developing with the SUID sandbox. If you want to live dangerously and need an immediate workaround, you can try using --no-sandbox.
#0 0x55d631195879 base::debug::CollectStackTrace()
#1 0x55d6310f2c63 base::debug::StackTrace::StackTrace()
#2 0x55d631107013 logging::LogMessage::~LogMessage()
#3 0x55d6328a195e service_manager::ZygoteHostImpl::Init()
#4 0x55d630d36adc content::ContentMainRunnerImpl::Initialize()
#5 0x55d630d8272c service_manager::Main()
#6 0x55d630d350b1 content::ContentMain()
#7 0x55d630d8199d headless::(anonymous namespace)::RunContentMain()
#8 0x55d630d8170b headless::HeadlessShellMain()
#9 0x55d62eb121b8 ChromeMain
#10 0x2acb82157555 __libc_start_main
#11 0x55d62eb1202a _start

Received signal 6
#0 0x55d631195879 base::debug::CollectStackTrace()
#1 0x55d6310f2c63 base::debug::StackTrace::StackTrace()
#2 0x55d631195401 base::debug::(anonymous namespace)::StackDumpSignalHandler()
#3 0x2acb7c169630
#4 0x2acb8216b387 __GI_raise
#5 0x2acb8216ca78 __GI_abort
#6 0x55d631194265 base::debug::BreakDebugger()
#7 0x55d631107461 logging::LogMessage::~LogMessage()
#8 0x55d6328a195e service_manager::ZygoteHostImpl::Init()
#9 0x55d630d36adc content::ContentMainRunnerImpl::Initialize()
#10 0x55d630d8272c service_manager::Main()
#11 0x55d630d350b1 content::ContentMain()
#12 0x55d630d8199d headless::(anonymous namespace)::RunContentMain()
#13 0x55d630d8170b headless::HeadlessShellMain()
#14 0x55d62eb121b8 ChromeMain
#15 0x2acb82157555 __libc_start_main
#16 0x55d62eb1202a _start
r8: 0000000000000000 r9: 0000000000000000 r10: 0000000000000008 r11: 0000000000000206
r12: 00007ffc37b3d358 r13: 00007ffc37b3c338 r14: 00007ffc37b3c338 r15: 00007ffc37b3c350
di: 0000000000006835 si: 0000000000006835 bp: 00007ffc37b3c2e0 bx: 00002acb824fd868
dx: 0000000000000006 ax: 0000000000000000 cx: ffffffffffffffff sp: 00007ffc37b3c1a8
ip: 00002acb8216b387 efl: 0000000000000206 cgf: 0000000000000033 erf: 0000000000000000
trp: 0000000000000000 msk: 0000000000000000 cr2: 0000000000000000
[end of stack trace]
Calling _exit(1). Core file will not be generated.

This is an issue with puppeteer, you can read more here:

Assuming npm update gives you the error about chromium, this command should allow it to download install, only need run once, from project directory.

sudo npm update --unsafe-perm=true

Make sure to run composer update beforehand if you haven’t also.

Can you add env variable to pass --no-sandbox argument to chrome
browsershot allow to pass arguments to chrome
Browsershot::html(‘Foo’)
->addChromiumArguments([
‘some-argument-without-a-value’,
‘keyed-argument’ => ‘argument-value’,
]);

I tried above solution for centos not working properly. if you add env variable to set args for chrome that will solve above issue.