[SOLVED] Migrated to v5: Nothing shows in app

I have migrated to v5, it said it was successful. Noticed when using the browser it was so slow & just tried to load. So I installed the app & that was faster, but still nothing loaded. I can see my clients, but invoices and payments have nothing. They are in the mysql database. I’m close to getting this done. No more errors in laravel.log. These are the errors in my nginx error log (any & all guidance is greatly appreciated!):

2023/02/01 13:01:02 [error] 788#788: *222 FastCGI sent in stderr: "PHP message: PHP Deprecated:  Return type of League\Fractal\ParamBag::offsetExists($key) should either be compatible with ArrayAccess::offsetExists(mixed $offset): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/html/invoiceninja/vendor/league/fractal/src/ParamBag.php on line 108" while reading response header from upstream, client: 192.168.1.146, server: wolverine.local, request: "GET /api/v1/clients?per_page=5000&page=1&t=1675278061956 HTTP/1.1", upstream: "fastcgi://unix:/var/run/php/php8.1-fpm.sock:", host: "192.168.1.129"
2023/02/01 13:01:02 [error] 788#788: *224 FastCGI sent in stderr: "PHP message: PHP Deprecated:  Return type of League\Fractal\ParamBag::offsetExists($key) should either be compatible with ArrayAccess::offsetExists(mixed $offset): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/html/invoiceninja/vendor/league/fractal/src/ParamBag.php on line 108" while reading response header from upstream, client: 192.168.1.146, server: wolverine.local, request: "GET /api/v1/products?per_page=5000&page=1&t=1675278062164 HTTP/1.1", upstream: "fastcgi://unix:/var/run/php/php8.1-fpm.sock:", host: "192.168.1.129"
2023/02/01 13:01:02 [error] 788#788: *226 FastCGI sent in stderr: "PHP message: PHP Deprecated:  Return type of League\Fractal\ParamBag::offsetExists($key) should either be compatible with ArrayAccess::offsetExists(mixed $offset): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/html/invoiceninja/vendor/league/fractal/src/ParamBag.php on line 108" while reading response header from upstream, client: 192.168.1.146, server: wolverine.local, request: "GET /api/v1/invoices?per_page=5000&page=1&created_at=1580670062&filter_deleted_clients=true&t=1675278062209 HTTP/1.1", upstream: "fastcgi://unix:/var/run/php/php8.1-fpm.sock:", host: "192.168.1.129"
2023/02/01 13:01:02 [error] 788#788: *228 FastCGI sent in stderr: "PHP message: PHP Deprecated:  Return type of League\Fractal\ParamBag::offsetExists($key) should either be compatible with ArrayAccess::offsetExists(mixed $offset): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/html/invoiceninja/vendor/league/fractal/src/ParamBag.php on line 108" while reading response header from upstream, client: 192.168.1.146, server: wolverine.local, request: "GET /api/v1/recurring_invoices?&filter_deleted_clients=true&per_page=999999&t=1675278062292 HTTP/1.1", upstream: "fastcgi://unix:/var/run/php/php8.1-fpm.sock:", host: "192.168.1.129"
2023/02/01 13:01:02 [error] 788#788: *230 FastCGI sent in stderr: "PHP message: PHP Deprecated:  Return type of League\Fractal\ParamBag::offsetExists($key) should either be compatible with ArrayAccess::offsetExists(mixed $offset): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/html/invoiceninja/vendor/league/fractal/src/ParamBag.php on line 108" while reading response header from upstream, client: 192.168.1.146, server: wolverine.local, request: "GET /api/v1/payments?per_page=5000&page=1&created_at=1580670062&filter_deleted_clients=true&t=1675278062337 HTTP/1.1", upstream: "fastcgi://unix:/var/run/php/php8.1-fpm.sock:", host: "192.168.1.129"
2023/02/01 13:01:02 [error] 788#788: *232 FastCGI sent in stderr: "PHP message: PHP Deprecated:  Return type of League\Fractal\ParamBag::offsetExists($key) should either be compatible with ArrayAccess::offsetExists(mixed $offset): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/html/invoiceninja/vendor/league/fractal/src/ParamBag.php on line 108" while reading response header from upstream, client: 192.168.1.146, server: wolverine.local, request: "GET /api/v1/quotes?per_page=5000&page=1&created_at=1580670062&filter_deleted_clients=true&t=1675278062443 HTTP/1.1", upstream: "fastcgi://unix:/var/run/php/php8.1-fpm.sock:", host: "192.168.1.129"
2023/02/01 13:01:02 [error] 788#788: *234 FastCGI sent in stderr: "PHP message: PHP Deprecated:  Return type of League\Fractal\ParamBag::offsetExists($key) should either be compatible with ArrayAccess::offsetExists(mixed $offset): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/html/invoiceninja/vendor/league/fractal/src/ParamBag.php on line 108" while reading response header from upstream, client: 192.168.1.146, server: wolverine.local, request: "GET /api/v1/credits?created_at=1580670063&filter_deleted_clients=true&per_page=999999&t=1675278062500 HTTP/1.1", upstream: "fastcgi://unix:/var/run/php/php8.1-fpm.sock:", host: "192.168.1.129"
2023/02/01 13:01:02 [error] 788#788: *236 FastCGI sent in stderr: "PHP message: PHP Deprecated:  Return type of League\Fractal\ParamBag::offsetExists($key) should either be compatible with ArrayAccess::offsetExists(mixed $offset): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/html/invoiceninja/vendor/league/fractal/src/ParamBag.php on line 108" while reading response header from upstream, client: 192.168.1.146, server: wolverine.local, request: "GET /api/v1/projects?created_at=1580670063&filter_deleted_clients=true&per_page=999999&t=1675278062542 HTTP/1.1", upstream: "fastcgi://unix:/var/run/php/php8.1-fpm.sock:", host: "192.168.1.129"
2023/02/01 13:01:02 [error] 788#788: *238 FastCGI sent in stderr: "PHP message: PHP Deprecated:  Return type of League\Fractal\ParamBag::offsetExists($key) should either be compatible with ArrayAccess::offsetExists(mixed $offset): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/html/invoiceninja/vendor/league/fractal/src/ParamBag.php on line 108" while reading response header from upstream, client: 192.168.1.146, server: wolverine.local, request: "GET /api/v1/tasks?created_at=1580670063&per_page=999999&t=1675278062598 HTTP/1.1", upstream: "fastcgi://unix:/var/run/php/php8.1-fpm.sock:", host: "192.168.1.129"
2023/02/01 13:01:02 [error] 788#788: *240 FastCGI sent in stderr: "PHP message: PHP Deprecated:  Return type of League\Fractal\ParamBag::offsetExists($key) should either be compatible with ArrayAccess::offsetExists(mixed $offset): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/html/invoiceninja/vendor/league/fractal/src/ParamBag.php on line 108" while reading response header from upstream, client: 192.168.1.146, server: wolverine.local, request: "GET /api/v1/vendors?per_page=5000&page=1&t=1675278062643 HTTP/1.1", upstream: "fastcgi://unix:/var/run/php/php8.1-fpm.sock:", host: "192.168.1.129"
2023/02/01 13:01:02 [error] 788#788: *242 FastCGI sent in stderr: "PHP message: PHP Deprecated:  Return type of League\Fractal\ParamBag::offsetExists($key) should either be compatible with ArrayAccess::offsetExists(mixed $offset): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/html/invoiceninja/vendor/league/fractal/src/ParamBag.php on line 108" while reading response header from upstream, client: 192.168.1.146, server: wolverine.local, request: "GET /api/v1/purchase_orders?per_page=5000&page=1&created_at=1580670063&t=1675278062716 HTTP/1.1", upstream: "fastcgi://unix:/var/run/php/php8.1-fpm.sock:", host: "192.168.1.129"
2023/02/01 13:01:02 [error] 788#788: *244 FastCGI sent in stderr: "PHP message: PHP Deprecated:  Return type of League\Fractal\ParamBag::offsetExists($key) should either be compatible with ArrayAccess::offsetExists(mixed $offset): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/html/invoiceninja/vendor/league/fractal/src/ParamBag.php on line 108" while reading response header from upstream, client: 192.168.1.146, server: wolverine.local, request: "GET /api/v1/expenses?created_at=1580670063&per_page=999999&t=1675278062750 HTTP/1.1", upstream: "fastcgi://unix:/var/run/php/php8.1-fpm.sock:", host: "192.168.1.129"
2023/02/01 13:01:02 [error] 788#788: *246 FastCGI sent in stderr: "PHP message: PHP Deprecated:  Return type of League\Fractal\ParamBag::offsetExists($key) should either be compatible with ArrayAccess::offsetExists(mixed $offset): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/html/invoiceninja/vendor/league/fractal/src/ParamBag.php on line 108" while reading response header from upstream, client: 192.168.1.146, server: wolverine.local, request: "GET /api/v1/recurring_expenses?&per_page=999999&t=1675278062788 HTTP/1.1", upstream: "fastcgi://unix:/var/run/php/php8.1-fpm.sock:", host: "192.168.1.129"
2023/02/01 13:01:02 [error] 788#788: *248 FastCGI sent in stderr: "PHP message: PHP Deprecated:  Return type of League\Fractal\ParamBag::offsetExists($key) should either be compatible with ArrayAccess::offsetExists(mixed $offset): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/html/invoiceninja/vendor/league/fractal/src/ParamBag.php on line 108" while reading response header from upstream, client: 192.168.1.146, server: wolverine.local, request: "GET /api/v1/bank_transactions?&per_page=999999&t=1675278062849 HTTP/1.1", upstream: "fastcgi://unix:/var/run/php/php8.1-fpm.sock:", host: "192.168.1.129"

Hi,

Did you setup v5 as a clean install, the error looks similar to this issue.

Yes, clean install. It was on the same machine as V4 was, however after upgrading from 18.04->22.04, yeah that didn’t work any more, so I went down the rabbit hole. Yesterday was worse, today I’m close. So, I deleted v4 from that machine and dropped the table after backing it up. On a VM I setup my v4 instance so I could migrate to my main server instance that now has v5 on it. I’m reading through that other issue you linked to see if it helps. Thanks!

EDIT: I’ve definitely installed v5 according to VERSIONS.txt & it looks totally different.

OK, I did a FRESH FRESH install in a VM and migrated & it worked!

Only issue I see is that when I created my fresh v5 install & filled out the info when you first fire up the page, went to my v4 install & migrated, and when I went back to v5 after the migration…There are 2 companies with the same name to select from at the top. One has no info and the other has everything.

How do I fix the double company issue now? Not a show stopper by any means. That was easy. Select the company you want to get rid of, go in to settings, & delete it. That was easy. OK, so instead of using my current server setup, I think it is time to migrate it to new hardware anyways.

Thanks!

Well, I fixed it on my server. I still get all of those error messages on my old server, but not on the new server. The fix on my old server you ask?

I was using the nginx config I had for v4. Yeah, I copied it as the Ubuntu/Arch install docs show. Also made my php.ini file look like the one in the Arch install docs, even though I am using Ubuntu 22.04 on the server.

So, it is up & running, however those messages I posted initially are still being logged every time I do something in the app or the browser.

Here is my working nginx invoiceninja config:

server {
    listen 80;
    server_name 192.168.1.129;
    client_max_body_size 20M;

    if ($host != $server_name) {
            return 301 http://$server_name$request_uri;
    }

    root /var/www/html/invoiceninja/public;

    gzip on;
    gzip_types application/javascript application/x-javascript text/javascript text/plain application/xml application/json;
    gzip_proxied no-cache no-store private expired auth;
    gzip_min_length 1000;

    index index.html index.html index.php;

    charset utf-8;

    include /etc/nginx/default.d/*.conf;

    location / {
        try_files $uri $uri/ /index.php?query_string;
    }

    if (!-e $request_filename) {
            rewrite ^(.+)$ /index.php?q= last;
    }

    location ~ \.php$ {
        fastcgi_split_path_info ^(.+\.php)(/.+)$;
        fastcgi_pass unix:/run/php/php8.1-fpm.sock;
        fastcgi_index index.php;
        include fastcgi_params;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        fastcgi_intercept_errors off;
        fastcgi_buffer_size 16k;
        fastcgi_buffers 4 16k;
    }

    location ~ /\.ht {
        deny all;
    }

    location = /favicon.ico { access_log off; log_not_found off; }
    location = /robots.txt { access_log off; log_not_found off; }

    access_log /var/log/nginx/invoiceninja.access.log;
    error_log /var/log/nginx/invoiceninja.error.log;

    sendfile off;
}