firefly-iii/firefly-iii · error · FireflyException

Could not render report view: %s

Error message

Could not render report view: %s

What it means

The Budget month report generator renders reports.budget.month with budgets and accounts data; any Throwable during rendering is logged (note: the log text says 'reports.account.report' — a copy-paste label inside the catch, the failing view is reports.budget.month) and rethrown as 'Could not render report view: <original message>'.

Source

Thrown at app/Generator/Report/Budget/MonthReportGenerator.php:70

    public function generate(): string
    {
        $accountIds = implode(',', $this->accounts->pluck('id')->toArray());
        $budgetIds  = implode(',', $this->budgets->pluck('id')->toArray());

        try {
            $result = view('reports.budget.month', ['accountIds' => $accountIds, 'budgetIds' => $budgetIds])
                ->with('start', $this->start)
                ->with('end', $this->end)
                ->with('budgets', $this->budgets)
                ->with('accounts', $this->accounts)
                ->render()
            ;
        } catch (Throwable $e) {
            Log::error(sprintf('Cannot render reports.account.report: %s', $e->getMessage()));
            Log::error($e->getTraceAsString());
            $result = sprintf('Could not render report view: %s', $e->getMessage());

            throw new FireflyException($result, 0, $e);
        }

        return $result;
    }

    /**
     * Set the involved accounts.
     */
    public function setAccounts(Collection $accounts): ReportGeneratorInterface
    {
        $this->accounts = $accounts;

        return $this;
    }

    /**
     * Set the involved budgets.
     */

View on GitHub (pinned to fd8791d08d)

Solutions

  1. Read the full log entry — despite the mislabeled prefix, the message and trace show the actual failure.
  2. Run php artisan view:clear and retry the report.
  3. Ensure resources/views/reports/budget/month.blade.php and partials exist.
  4. Remove or update local overrides of the budget report views.
Defensive patterns

Strategy: try-catch

Validate before calling

if (!view()->exists('reports.budget.month')) {
    abort(500, 'Budget report view missing');
}

Try / catch

try {
    $html = $generator->generate();
} catch (FireflyException $e) {
    if (str_starts_with($e->getMessage(), 'Could not render report view')) {
        // degrade gracefully; real cause is in the chained previous exception / log
        $html = '';
    } else {
        throw $e;
    }
}

Prevention

When it happens

Trigger: Missing budget report template or partial; customized views referencing variables not passed by this generator; errors inside Blade loops when the budget or account collection is empty; stale compiled view cache.

Common situations: Theme overrides that lag an upgrade; deployments missing view files; budget report requested with zero selectable budgets in modified templates.

Related errors


AI-assisted analysis of firefly-iii/firefly-iii@fd8791d08d (2026-08-17). Data as JSON: /api/errors/68a13b73be8984c5. Report an issue: GitHub.