diff --git a/app/Http/Controllers/SetupController.php b/app/Http/Controllers/SetupController.php index 043056ae5049..a4a18129e870 100644 --- a/app/Http/Controllers/SetupController.php +++ b/app/Http/Controllers/SetupController.php @@ -1,4 +1,5 @@ input('url'); - if (substr($url, -1) != '/') { - $url = $url.'/'; - } + if (substr($url, -1) != '/') + $url = $url . '/'; $_ENV['APP_KEY'] = config('app.key'); $_ENV['APP_URL'] = $url; @@ -107,7 +102,7 @@ class SetupController extends Controller } /* Write the .env file */ - $filePath = base_path().'/.env'; + $filePath = base_path() . '/.env'; $fp = fopen($filePath, 'w'); fwrite($fp, $config); fclose($fp); @@ -196,10 +191,11 @@ class SetupController extends Controller return $this->testPhantom(); } - Browsershot::url('https://www.invoiceninja.com')->savePdf( - // Browsershot::html('If you see this text, generating PDF works! Thanks for using Invoice Ninja!')->savePdf( - public_path('test.pdf') - ); + Browsershot::url('https://www.invoiceninja.com') + ->noSandbox() + ->savePdf( + public_path('test.pdf') + ); return response(['url' => asset('test.pdf')], 200); } catch (\Exception $e) { diff --git a/app/Utils/Traits/Pdf/PdfMaker.php b/app/Utils/Traits/Pdf/PdfMaker.php index 8cbcc409273c..25fd6ef59437 100644 --- a/app/Utils/Traits/Pdf/PdfMaker.php +++ b/app/Utils/Traits/Pdf/PdfMaker.php @@ -40,6 +40,7 @@ trait PdfMaker ->showBackground() ->deviceScaleFactor(1) ->waitUntilNetworkIdle(true) + ->noSandbox() ->pdf(); } } diff --git a/resources/views/setup/_issues.blade.php b/resources/views/setup/_issues.blade.php index 896648389ca5..7baf3165456e 100644 --- a/resources/views/setup/_issues.blade.php +++ b/resources/views/setup/_issues.blade.php @@ -61,42 +61,6 @@ @endif -
-
- {{ ctrans('texts.npm_status') }} -
-
- @if($check['npm_status']) - - {{ $check['npm_status'] }} => {{ strtoupper(ctrans('texts.ok')) }} - - - @else - - {{ ctrans('texts.npm_status_not_found') }} - - - @endif -
-
-
-
- {{ ctrans('texts.node_status') }} -
-
- @if($check['node_status']) - - {{ $check['node_status'] }} => {{ strtoupper(ctrans('texts.ok')) }} - - - @else - - {{ ctrans('texts.node_status_not_found') }} - - - @endif -
-
\ No newline at end of file diff --git a/tests/Pdf/PdfGenerationTest.php b/tests/Pdf/PdfGenerationTest.php index 8fa6b21a83c4..b9d0f2c3a570 100644 --- a/tests/Pdf/PdfGenerationTest.php +++ b/tests/Pdf/PdfGenerationTest.php @@ -25,6 +25,7 @@ class PdfGenerationTest extends TestCase //->footerHtml($footer) ->waitUntilNetworkIdle() //->margins(10,10,10,10) + ->noSandbox() ->savePdf($pdf); }