KoolReport's Forum

Official Support Area, Q&As, Discussions, Suggestions and Bug reports.
Forum's Guidelines

Uncaught error on dashboard #2149

Closed Vincent opened this topic on on Jun 18, 2021 - 13 comments

Vincent commented on Jun 18, 2021

Hi Guys,

I'm getting the following error on dashboard (PHP 7.2). I tried the quick start and the full demo as well. Both having the same issue:

Fatal error: Uncaught Error: Call to a member function route() on null in vendor/koolreport/dashboard/Application.php:144 Stack trace: #0 index.php(7): koolreport\dashboard\Application->run() #1 {main} thrown in vendor/koolreport/dashboard/Application.php on line 144

KoolReport commented on Jun 18, 2021

Could you please post me the full trace

Vincent commented on Jun 18, 2021

This is the full trace?

KoolReport commented on Jun 18, 2021

Could you please give me the screenshoot of quickstart

Vincent commented on Jun 18, 2021

You mean this? or could you be more specific?

KoolReport commented on Jun 18, 2021

I mean the screenshot of browser when you run the quickstart example. The screen that shows error

Vincent commented on Jun 18, 2021

KoolReport commented on Jun 18, 2021

Dashboard requires php session to be enabled. It could be the deep cause of this issue. Could you please check if session in your php is enabled.

Vincent commented on Jun 18, 2021

KoolReport commented on Jun 18, 2021

That's strange. Let try to debug to see what cause issue. Could you please go to comment out line 136-153 of vendor\koolreport\dashboard\Application.php

        try {
            $this->init();
            if ($this->fireEvent("Running")===false) {
                return;
            }
            $response = $this->handle($this->request);
            $this->fireEvent("Run");
        } catch (\Throwable $exception) {
            $this->request->route("App/Exception")->params([
                "exception"=>$exception
            ]);
            $response = Response::create();
            if ($this->request->isFirstRequest()) {
                $response->html($this->view());
            } else {
                $response->merge($this->pages["Exception"]->handle($this->request));
            }
        }

and put only:

            $this->init();
            if ($this->fireEvent("Running")===false) {
                return;
            }
            $response = $this->handle($this->request);
            $this->fireEvent("Run");

Let see if the real error is showing.

Vincent commented on Jun 18, 2021

Thanks for the help. It was a permission error on sessions folder.

KoolReport commented on Jun 18, 2021

That's great to find out what went wrong. Is it solved now?

Vincent commented on Jun 18, 2021

Yes it's solved, thanks for quick support!

KoolReport commented on Jun 18, 2021

You are welcome :)

Build Your Excellent Data Report

Let KoolReport help you to make great reports. It's free & open-source released under MIT license.

Download KoolReport View demo
solved

None