spatie / ignition

A beautiful error page for PHP apps
https://flareapp.io/ignition
MIT License
421 stars 53 forks source link

TypeError: Cannot read properties of undefined (reading 'code_snippet') #67

Closed splashsky closed 2 years ago

splashsky commented 2 years ago

Please include some context and the contents of the console in your browser's developer tools.

TypeError: Cannot read properties of undefined (reading 'code_snippet')
    at XE (http://localhost:2015/:72:249981)
    at mi (http://localhost:2015/:72:70706)
    at Ql (http://localhost:2015/:72:122308)
    at xc (http://localhost:2015/:72:109797)
    at _c (http://localhost:2015/:72:109725)
    at Cc (http://localhost:2015/:72:109588)
    at Nc (http://localhost:2015/:72:106582)
    at hc (http://localhost:2015/:72:103958)
    at nu (http://localhost:2015/:72:119816)
    at http://localhost:2015/:72:121187

User Agent

Mozilla/5.0 (Linux; Android 6.0; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/95.0.4638.54 Mobile Safari/537.36

Object Report

{
    "report": {
        "notifier": "Laravel Client",
        "language": "PHP",
        "framework_version": "9.3.0",
        "language_version": "8.1.3",
        "exception_class": "UnexpectedValueException",
        "seen_at": 1646248294,
        "message": "The stream or file \"/home/coco/Projects/loco/storage/logs/laravel.log\" could not be opened in append mode: Failed to open stream: Permission denied",
        "glows": [],
        "solutions": [],
        "documentation_links": [],
        "stacktrace": [
            {
                "file": "/home/coco/Projects/loco/vendor/monolog/monolog/src/Monolog/Handler/StreamHandler.php",
                "line_number": 146,
                "method": "write",
                "class": "Monolog\\Handler\\StreamHandler",
                "code_snippet": {
                    "131": "            $url = $this->url;",
                    "132": "            if (null === $url || '' === $url) {",
                    "133": "                throw new \\LogicException('Missing stream url, the stream can not be opened. This may be caused by a premature call to close().');",
                    "134": "            }",
                    "135": "            $this->createDir($url);",
                    "136": "            $this->errorMessage = null;",
                    "137": "            set_error_handler([$this, 'customErrorHandler']);",
                    "138": "            $stream = fopen($url, 'a');",
                    "139": "            if ($this->filePermission !== null) {",
                    "140": "                @chmod($url, $this->filePermission);",
                    "141": "            }",
                    "142": "            restore_error_handler();",
                    "143": "            if (!is_resource($stream)) {",
                    "144": "                $this->stream = null;",
                    "145": "",
                    "146": "                throw new \\UnexpectedValueException(sprintf('The stream or file \"%s\" could not be opened in append mode: '.$this->errorMessage, $url));",
                    "147": "            }",
                    "148": "            stream_set_chunk_size($stream, $this->streamChunkSize);",
                    "149": "            $this->stream = $stream;",
                    "150": "        }",
                    "151": "",
                    "152": "        $stream = $this->stream;",
                    "153": "        if (!is_resource($stream)) {",
                    "154": "            throw new \\LogicException('No stream was opened yet');",
                    "155": "        }",
                    "156": "",
                    "157": "        if ($this->useLocking) {",
                    "158": "            // ignoring errors here, there's not much we can do about them",
                    "159": "            flock($stream, LOCK_EX);",
                    "160": "        }"
                },
                "application_frame": false
            },
            {
                "file": "/home/coco/Projects/loco/vendor/monolog/monolog/src/Monolog/Handler/AbstractProcessingHandler.php",
                "line_number": 48,
                "method": "handle",
                "class": "Monolog\\Handler\\AbstractProcessingHandler",
                "code_snippet": {
                    "33": "     * {@inheritDoc}",
                    "34": "     */",
                    "35": "    public function handle(array $record): bool",
                    "36": "    {",
                    "37": "        if (!$this->isHandling($record)) {",
                    "38": "            return false;",
                    "39": "        }",
                    "40": "",
                    "41": "        if ($this->processors) {",
                    "42": "            /** @var Record $record */",
                    "43": "            $record = $this->processRecord($record);",
                    "44": "        }",
                    "45": "",
                    "46": "        $record['formatted'] = $this->getFormatter()->format($record);",
                    "47": "",
                    "48": "        $this->write($record);",
                    "49": "",
                    "50": "        return false === $this->bubble;",
                    "51": "    }",
                    "52": "",
                    "53": "    /**",
                    "54": "     * Writes the record down to the log of the implementing handler",
                    "55": "     *",
                    "56": "     * @phpstan-param FormattedRecord $record",
                    "57": "     */",
                    "58": "    abstract protected function write(array $record): void;",
                    "59": "",
                    "60": "    /**",
                    "61": "     * @return void",
                    "62": "     */"
                },
                "application_frame": false
            },
            {
                "file": "/home/coco/Projects/loco/vendor/monolog/monolog/src/Monolog/Logger.php",
                "line_number": 327,
                "method": "addRecord",
                "class": "Monolog\\Logger",
                "code_snippet": {
                    "312": "                ];",
                    "313": "",
                    "314": "                try {",
                    "315": "                    foreach ($this->processors as $processor) {",
                    "316": "                        $record = $processor($record);",
                    "317": "                    }",
                    "318": "                } catch (Throwable $e) {",
                    "319": "                    $this->handleException($e, $record);",
                    "320": "",
                    "321": "                    return true;",
                    "322": "                }",
                    "323": "            }",
                    "324": "",
                    "325": "            // once the record exists, send it to all handlers as long as the bubbling chain is not interrupted",
                    "326": "            try {",
                    "327": "                if (true === $handler->handle($record)) {",
                    "328": "                    break;",
                    "329": "                }",
                    "330": "            } catch (Throwable $e) {",
                    "331": "                $this->handleException($e, $record);",
                    "332": "",
                    "333": "                return true;",
                    "334": "            }",
                    "335": "        }",
                    "336": "",
                    "337": "        return null !== $record;",
                    "338": "    }",
                    "339": "",
                    "340": "    /**",
                    "341": "     * Ends a log cycle and frees all resources used by handlers."
                },
                "application_frame": false
            },
            {
                "file": "/home/coco/Projects/loco/vendor/monolog/monolog/src/Monolog/Logger.php",
                "line_number": 565,
                "method": "error",
                "class": "Monolog\\Logger",
                "code_snippet": {
                    "550": "    public function warning($message, array $context = []): void",
                    "551": "    {",
                    "552": "        $this->addRecord(static::WARNING, (string) $message, $context);",
                    "553": "    }",
                    "554": "",
                    "555": "    /**",
                    "556": "     * Adds a log record at the ERROR level.",
                    "557": "     *",
                    "558": "     * This method allows for compatibility with common interfaces.",
                    "559": "     *",
                    "560": "     * @param string|Stringable $message The log message",
                    "561": "     * @param mixed[]           $context The log context",
                    "562": "     */",
                    "563": "    public function error($message, array $context = []): void",
                    "564": "    {",
                    "565": "        $this->addRecord(static::ERROR, (string) $message, $context);",
                    "566": "    }",
                    "567": "",
                    "568": "    /**",
                    "569": "     * Adds a log record at the CRITICAL level.",
                    "570": "     *",
                    "571": "     * This method allows for compatibility with common interfaces.",
                    "572": "     *",
                    "573": "     * @param string|Stringable $message The log message",
                    "574": "     * @param mixed[]           $context The log context",
                    "575": "     */",
                    "576": "    public function critical($message, array $context = []): void",
                    "577": "    {",
                    "578": "        $this->addRecord(static::CRITICAL, (string) $message, $context);",
                    "579": "    }"
                },
                "application_frame": false
            },
            {
                "file": "/home/coco/Projects/loco/vendor/laravel/framework/src/Illuminate/Log/Logger.php",
                "line_number": 183,
                "method": "writeLog",
                "class": "Illuminate\\Log\\Logger",
                "code_snippet": {
                    "168": "        $this->writeLog($level, $message, $context);",
                    "169": "    }",
                    "170": "",
                    "171": "    /**",
                    "172": "     * Write a message to the log.",
                    "173": "     *",
                    "174": "     * @param  string  $level",
                    "175": "     * @param  \\Illuminate\\Contracts\\Support\\Arrayable|\\Illuminate\\Contracts\\Support\\Jsonable|\\Illuminate\\Support\\Stringable|array|string  $message",
                    "176": "     * @param  array  $context",
                    "177": "     * @return void",
                    "178": "     */",
                    "179": "    protected function writeLog($level, $message, $context): void",
                    "180": "    {",
                    "181": "        $this->logger->{$level}(",
                    "182": "            $message = $this->formatMessage($message),",
                    "183": "            $context = array_merge($this->context, $context)",
                    "184": "        );",
                    "185": "",
                    "186": "        $this->fireLogEvent($level, $message, $context);",
                    "187": "    }",
                    "188": "",
                    "189": "    /**",
                    "190": "     * Add context to all future logs.",
                    "191": "     *",
                    "192": "     * @param  array  $context",
                    "193": "     * @return $this",
                    "194": "     */",
                    "195": "    public function withContext(array $context = [])",
                    "196": "    {",
                    "197": "        $this->context = array_merge($this->context, $context);"
                },
                "application_frame": false
            },
            {
                "file": "/home/coco/Projects/loco/vendor/laravel/framework/src/Illuminate/Log/Logger.php",
                "line_number": 94,
                "method": "error",
                "class": "Illuminate\\Log\\Logger",
                "code_snippet": {
                    "79": "     */",
                    "80": "    public function critical($message, array $context = []): void",
                    "81": "    {",
                    "82": "        $this->writeLog(__FUNCTION__, $message, $context);",
                    "83": "    }",
                    "84": "",
                    "85": "    /**",
                    "86": "     * Log an error message to the logs.",
                    "87": "     *",
                    "88": "     * @param  \\Illuminate\\Contracts\\Support\\Arrayable|\\Illuminate\\Contracts\\Support\\Jsonable|\\Illuminate\\Support\\Stringable|array|string  $message",
                    "89": "     * @param  array  $context",
                    "90": "     * @return void",
                    "91": "     */",
                    "92": "    public function error($message, array $context = []): void",
                    "93": "    {",
                    "94": "        $this->writeLog(__FUNCTION__, $message, $context);",
                    "95": "    }",
                    "96": "",
                    "97": "    /**",
                    "98": "     * Log a warning message to the logs.",
                    "99": "     *",
                    "100": "     * @param  \\Illuminate\\Contracts\\Support\\Arrayable|\\Illuminate\\Contracts\\Support\\Jsonable|\\Illuminate\\Support\\Stringable|array|string  $message",
                    "101": "     * @param  array  $context",
                    "102": "     * @return void",
                    "103": "     */",
                    "104": "    public function warning($message, array $context = []): void",
                    "105": "    {",
                    "106": "        $this->writeLog(__FUNCTION__, $message, $context);",
                    "107": "    }",
                    "108": ""
                },
                "application_frame": false
            },
            {
                "file": "/home/coco/Projects/loco/vendor/laravel/framework/src/Illuminate/Log/LogManager.php",
                "line_number": 590,
                "method": "error",
                "class": "Illuminate\\Log\\LogManager",
                "code_snippet": {
                    "575": "    public function critical($message, array $context = []): void",
                    "576": "    {",
                    "577": "        $this->driver()->critical($message, $context);",
                    "578": "    }",
                    "579": "",
                    "580": "    /**",
                    "581": "     * Runtime errors that do not require immediate action but should typically",
                    "582": "     * be logged and monitored.",
                    "583": "     *",
                    "584": "     * @param  string  $message",
                    "585": "     * @param  array  $context",
                    "586": "     * @return void",
                    "587": "     */",
                    "588": "    public function error($message, array $context = []): void",
                    "589": "    {",
                    "590": "        $this->driver()->error($message, $context);",
                    "591": "    }",
                    "592": "",
                    "593": "    /**",
                    "594": "     * Exceptional occurrences that are not errors.",
                    "595": "     *",
                    "596": "     * Example: Use of deprecated APIs, poor use of an API, undesirable things",
                    "597": "     * that are not necessarily wrong.",
                    "598": "     *",
                    "599": "     * @param  string  $message",
                    "600": "     * @param  array  $context",
                    "601": "     * @return void",
                    "602": "     */",
                    "603": "    public function warning($message, array $context = []): void",
                    "604": "    {"
                },
                "application_frame": false
            },
            {
                "file": "/home/coco/Projects/loco/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/Handler.php",
                "line_number": 249,
                "method": "report",
                "class": "Illuminate\\Foundation\\Exceptions\\Handler",
                "code_snippet": {
                    "234": "                return;",
                    "235": "            }",
                    "236": "        }",
                    "237": "",
                    "238": "        try {",
                    "239": "            $logger = $this->container->make(LoggerInterface::class);",
                    "240": "        } catch (Exception $ex) {",
                    "241": "            throw $e;",
                    "242": "        }",
                    "243": "",
                    "244": "        $logger->error(",
                    "245": "            $e->getMessage(),",
                    "246": "            array_merge(",
                    "247": "                $this->exceptionContext($e),",
                    "248": "                $this->context(),",
                    "249": "                ['exception' => $e]",
                    "250": "            )",
                    "251": "        );",
                    "252": "    }",
                    "253": "",
                    "254": "    /**",
                    "255": "     * Determine if the exception should be reported.",
                    "256": "     *",
                    "257": "     * @param  \\Throwable  $e",
                    "258": "     * @return bool",
                    "259": "     */",
                    "260": "    public function shouldReport(Throwable $e)",
                    "261": "    {",
                    "262": "        return ! $this->shouldntReport($e);",
                    "263": "    }"
                },
                "application_frame": false
            },
            {
                "file": "/home/coco/Projects/loco/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/HandleExceptions.php",
                "line_number": 165,
                "method": "handleException",
                "class": "Illuminate\\Foundation\\Bootstrap\\HandleExceptions",
                "code_snippet": {
                    "150": "    /**",
                    "151": "     * Handle an uncaught exception from the application.",
                    "152": "     *",
                    "153": "     * Note: Most exceptions can be handled via the try / catch block in",
                    "154": "     * the HTTP and Console kernels. But, fatal error exceptions must",
                    "155": "     * be handled differently since they are not normal exceptions.",
                    "156": "     *",
                    "157": "     * @param  \\Throwable  $e",
                    "158": "     * @return void",
                    "159": "     */",
                    "160": "    public function handleException(Throwable $e)",
                    "161": "    {",
                    "162": "        try {",
                    "163": "            self::$reservedMemory = null;",
                    "164": "",
                    "165": "            $this->getExceptionHandler()->report($e);",
                    "166": "        } catch (Exception $e) {",
                    "167": "            //",
                    "168": "        }",
                    "169": "",
                    "170": "        if (static::$app->runningInConsole()) {",
                    "171": "            $this->renderForConsole($e);",
                    "172": "        } else {",
                    "173": "            $this->renderHttpResponse($e);",
                    "174": "        }",
                    "175": "    }",
                    "176": "",
                    "177": "    /**",
                    "178": "     * Render an exception to the console.",
                    "179": "     *"
                },
                "application_frame": false
            },
            {
                "file": "/home/coco/Projects/loco/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/HandleExceptions.php",
                "line_number": 231,
                "method": "Illuminate\\Foundation\\Bootstrap\\{closure}",
                "class": "Illuminate\\Foundation\\Bootstrap\\HandleExceptions",
                "code_snippet": {
                    "216": "     * @return \\Symfony\\Component\\ErrorHandler\\Error\\FatalError",
                    "217": "     */",
                    "218": "    protected function fatalErrorFromPhpError(array $error, $traceOffset = null)",
                    "219": "    {",
                    "220": "        return new FatalError($error['message'], 0, $error, $traceOffset);",
                    "221": "    }",
                    "222": "",
                    "223": "    /**",
                    "224": "     * Forward a method call to the given method if an application instance exists.",
                    "225": "     *",
                    "226": "     * @return callable",
                    "227": "     */",
                    "228": "    protected function forwardsTo($method)",
                    "229": "    {",
                    "230": "        return fn (...$arguments) => static::$app",
                    "231": "            ? $this->{$method}(...$arguments)",
                    "232": "            : false;",
                    "233": "    }",
                    "234": "",
                    "235": "    /**",
                    "236": "     * Determine if the error level is a deprecation.",
                    "237": "     *",
                    "238": "     * @param  int  $level",
                    "239": "     * @return bool",
                    "240": "     */",
                    "241": "    protected function isDeprecation($level)",
                    "242": "    {",
                    "243": "        return in_array($level, [E_DEPRECATED, E_USER_DEPRECATED]);",
                    "244": "    }",
                    "245": ""
                },
                "application_frame": false
            },
            {
                "file": "unknown",
                "line_number": 0,
                "method": "[top]",
                "class": null,
                "code_snippet": [],
                "application_frame": false
            }
        ],
        "context": {
            "request": {
                "url": "http://localhost:2015/",
                "ip": null,
                "method": "GET",
                "useragent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/95.0.4638.54 Safari/537.36"
            },
            "request_data": {
                "queryString": [],
                "body": [],
                "files": []
            },
            "headers": {
                "accept-language": [
                    "en-US,en;q=0.9"
                ],
                "sec-fetch-user": [
                    "?1"
                ],
                "sec-fetch-mode": [
                    "navigate"
                ],
                "cache-control": [
                    "max-age=0"
                ],
                "x-forwarded-for": [
                    "::1"
                ],
                "x-forwarded-proto": [
                    "http"
                ],
                "user-agent": [
                    "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/95.0.4638.54 Safari/537.36"
                ],
                "host": [
                    "localhost:2015"
                ],
                "content-length": [
                    "0"
                ],
                "sec-ch-ua-mobile": [
                    "?0"
                ],
                "accept-encoding": [
                    "gzip, deflate, br"
                ],
                "dnt": [
                    "1"
                ],
                "content-type": [
                    ""
                ],
                "sec-ch-ua-platform": [
                    "\"Linux\""
                ],
                "sec-fetch-dest": [
                    "document"
                ],
                "sec-fetch-site": [
                    "none"
                ],
                "sec-ch-ua": [
                    "\"Chromium\";v=\"95\", \";Not A Brand\";v=\"99\""
                ],
                "accept": [
                    "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9"
                ],
                "upgrade-insecure-requests": [
                    "1"
                ]
            },
            "cookies": [],
            "session": {
                "_token": "irbV1SdVq3Ws3uAaeMYaq6aesXHazZvDi2Ipcs0p"
            },
            "route": {
                "route": null,
                "routeParameters": [],
                "controllerAction": "Closure",
                "middleware": [
                    "web"
                ]
            },
            "env": {
                "laravel_version": "9.3.0",
                "laravel_locale": "en",
                "laravel_config_cached": false,
                "app_debug": true,
                "app_env": "local",
                "php_version": "8.1.3"
            },
            "dumps": [],
            "logs": [],
            "queries": []
        },
        "stage": "local",
        "message_level": null,
        "open_frame_index": null,
        "application_path": "/home/coco/Projects/loco",
        "application_version": null,
        "tracking_uuid": "55b2ba9f-f601-40fb-8cd7-7a270ec42f0c"
    },
    "shareableReport": {
        "notifier": "Laravel Client",
        "language": "PHP",
        "framework_version": "9.3.0",
        "language_version": "8.1.3",
        "exception_class": "UnexpectedValueException",
        "seen_at": 1646248294,
        "message": "The stream or file \"/home/coco/Projects/loco/storage/logs/laravel.log\" could not be opened in append mode: Failed to open stream: Permission denied",
        "glows": [],
        "solutions": [],
        "documentation_links": [],
        "stacktrace": [
            {
                "file": "/home/coco/Projects/loco/vendor/monolog/monolog/src/Monolog/Handler/StreamHandler.php",
                "line_number": 146,
                "method": "write",
                "class": "Monolog\\Handler\\StreamHandler",
                "code_snippet": {
                    "131": "            $url = $this->url;",
                    "132": "            if (null === $url || '' === $url) {",
                    "133": "                throw new \\LogicException('Missing stream url, the stream can not be opened. This may be caused by a premature call to close().');",
                    "134": "            }",
                    "135": "            $this->createDir($url);",
                    "136": "            $this->errorMessage = null;",
                    "137": "            set_error_handler([$this, 'customErrorHandler']);",
                    "138": "            $stream = fopen($url, 'a');",
                    "139": "            if ($this->filePermission !== null) {",
                    "140": "                @chmod($url, $this->filePermission);",
                    "141": "            }",
                    "142": "            restore_error_handler();",
                    "143": "            if (!is_resource($stream)) {",
                    "144": "                $this->stream = null;",
                    "145": "",
                    "146": "                throw new \\UnexpectedValueException(sprintf('The stream or file \"%s\" could not be opened in append mode: '.$this->errorMessage, $url));",
                    "147": "            }",
                    "148": "            stream_set_chunk_size($stream, $this->streamChunkSize);",
                    "149": "            $this->stream = $stream;",
                    "150": "        }",
                    "151": "",
                    "152": "        $stream = $this->stream;",
                    "153": "        if (!is_resource($stream)) {",
                    "154": "            throw new \\LogicException('No stream was opened yet');",
                    "155": "        }",
                    "156": "",
                    "157": "        if ($this->useLocking) {",
                    "158": "            // ignoring errors here, there's not much we can do about them",
                    "159": "            flock($stream, LOCK_EX);",
                    "160": "        }"
                },
                "application_frame": false
            },
            {
                "file": "/home/coco/Projects/loco/vendor/monolog/monolog/src/Monolog/Handler/AbstractProcessingHandler.php",
                "line_number": 48,
                "method": "handle",
                "class": "Monolog\\Handler\\AbstractProcessingHandler",
                "code_snippet": {
                    "33": "     * {@inheritDoc}",
                    "34": "     */",
                    "35": "    public function handle(array $record): bool",
                    "36": "    {",
                    "37": "        if (!$this->isHandling($record)) {",
                    "38": "            return false;",
                    "39": "        }",
                    "40": "",
                    "41": "        if ($this->processors) {",
                    "42": "            /** @var Record $record */",
                    "43": "            $record = $this->processRecord($record);",
                    "44": "        }",
                    "45": "",
                    "46": "        $record['formatted'] = $this->getFormatter()->format($record);",
                    "47": "",
                    "48": "        $this->write($record);",
                    "49": "",
                    "50": "        return false === $this->bubble;",
                    "51": "    }",
                    "52": "",
                    "53": "    /**",
                    "54": "     * Writes the record down to the log of the implementing handler",
                    "55": "     *",
                    "56": "     * @phpstan-param FormattedRecord $record",
                    "57": "     */",
                    "58": "    abstract protected function write(array $record): void;",
                    "59": "",
                    "60": "    /**",
                    "61": "     * @return void",
                    "62": "     */"
                },
                "application_frame": false
            },
            {
                "file": "/home/coco/Projects/loco/vendor/monolog/monolog/src/Monolog/Logger.php",
                "line_number": 327,
                "method": "addRecord",
                "class": "Monolog\\Logger",
                "code_snippet": {
                    "312": "                ];",
                    "313": "",
                    "314": "                try {",
                    "315": "                    foreach ($this->processors as $processor) {",
                    "316": "                        $record = $processor($record);",
                    "317": "                    }",
                    "318": "                } catch (Throwable $e) {",
                    "319": "                    $this->handleException($e, $record);",
                    "320": "",
                    "321": "                    return true;",
                    "322": "                }",
                    "323": "            }",
                    "324": "",
                    "325": "            // once the record exists, send it to all handlers as long as the bubbling chain is not interrupted",
                    "326": "            try {",
                    "327": "                if (true === $handler->handle($record)) {",
                    "328": "                    break;",
                    "329": "                }",
                    "330": "            } catch (Throwable $e) {",
                    "331": "                $this->handleException($e, $record);",
                    "332": "",
                    "333": "                return true;",
                    "334": "            }",
                    "335": "        }",
                    "336": "",
                    "337": "        return null !== $record;",
                    "338": "    }",
                    "339": "",
                    "340": "    /**",
                    "341": "     * Ends a log cycle and frees all resources used by handlers."
                },
                "application_frame": false
            },
            {
                "file": "/home/coco/Projects/loco/vendor/monolog/monolog/src/Monolog/Logger.php",
                "line_number": 565,
                "method": "error",
                "class": "Monolog\\Logger",
                "code_snippet": {
                    "550": "    public function warning($message, array $context = []): void",
                    "551": "    {",
                    "552": "        $this->addRecord(static::WARNING, (string) $message, $context);",
                    "553": "    }",
                    "554": "",
                    "555": "    /**",
                    "556": "     * Adds a log record at the ERROR level.",
                    "557": "     *",
                    "558": "     * This method allows for compatibility with common interfaces.",
                    "559": "     *",
                    "560": "     * @param string|Stringable $message The log message",
                    "561": "     * @param mixed[]           $context The log context",
                    "562": "     */",
                    "563": "    public function error($message, array $context = []): void",
                    "564": "    {",
                    "565": "        $this->addRecord(static::ERROR, (string) $message, $context);",
                    "566": "    }",
                    "567": "",
                    "568": "    /**",
                    "569": "     * Adds a log record at the CRITICAL level.",
                    "570": "     *",
                    "571": "     * This method allows for compatibility with common interfaces.",
                    "572": "     *",
                    "573": "     * @param string|Stringable $message The log message",
                    "574": "     * @param mixed[]           $context The log context",
                    "575": "     */",
                    "576": "    public function critical($message, array $context = []): void",
                    "577": "    {",
                    "578": "        $this->addRecord(static::CRITICAL, (string) $message, $context);",
                    "579": "    }"
                },
                "application_frame": false
            },
            {
                "file": "/home/coco/Projects/loco/vendor/laravel/framework/src/Illuminate/Log/Logger.php",
                "line_number": 183,
                "method": "writeLog",
                "class": "Illuminate\\Log\\Logger",
                "code_snippet": {
                    "168": "        $this->writeLog($level, $message, $context);",
                    "169": "    }",
                    "170": "",
                    "171": "    /**",
                    "172": "     * Write a message to the log.",
                    "173": "     *",
                    "174": "     * @param  string  $level",
                    "175": "     * @param  \\Illuminate\\Contracts\\Support\\Arrayable|\\Illuminate\\Contracts\\Support\\Jsonable|\\Illuminate\\Support\\Stringable|array|string  $message",
                    "176": "     * @param  array  $context",
                    "177": "     * @return void",
                    "178": "     */",
                    "179": "    protected function writeLog($level, $message, $context): void",
                    "180": "    {",
                    "181": "        $this->logger->{$level}(",
                    "182": "            $message = $this->formatMessage($message),",
                    "183": "            $context = array_merge($this->context, $context)",
                    "184": "        );",
                    "185": "",
                    "186": "        $this->fireLogEvent($level, $message, $context);",
                    "187": "    }",
                    "188": "",
                    "189": "    /**",
                    "190": "     * Add context to all future logs.",
                    "191": "     *",
                    "192": "     * @param  array  $context",
                    "193": "     * @return $this",
                    "194": "     */",
                    "195": "    public function withContext(array $context = [])",
                    "196": "    {",
                    "197": "        $this->context = array_merge($this->context, $context);"
                },
                "application_frame": false
            },
            {
                "file": "/home/coco/Projects/loco/vendor/laravel/framework/src/Illuminate/Log/Logger.php",
                "line_number": 94,
                "method": "error",
                "class": "Illuminate\\Log\\Logger",
                "code_snippet": {
                    "79": "     */",
                    "80": "    public function critical($message, array $context = []): void",
                    "81": "    {",
                    "82": "        $this->writeLog(__FUNCTION__, $message, $context);",
                    "83": "    }",
                    "84": "",
                    "85": "    /**",
                    "86": "     * Log an error message to the logs.",
                    "87": "     *",
                    "88": "     * @param  \\Illuminate\\Contracts\\Support\\Arrayable|\\Illuminate\\Contracts\\Support\\Jsonable|\\Illuminate\\Support\\Stringable|array|string  $message",
                    "89": "     * @param  array  $context",
                    "90": "     * @return void",
                    "91": "     */",
                    "92": "    public function error($message, array $context = []): void",
                    "93": "    {",
                    "94": "        $this->writeLog(__FUNCTION__, $message, $context);",
                    "95": "    }",
                    "96": "",
                    "97": "    /**",
                    "98": "     * Log a warning message to the logs.",
                    "99": "     *",
                    "100": "     * @param  \\Illuminate\\Contracts\\Support\\Arrayable|\\Illuminate\\Contracts\\Support\\Jsonable|\\Illuminate\\Support\\Stringable|array|string  $message",
                    "101": "     * @param  array  $context",
                    "102": "     * @return void",
                    "103": "     */",
                    "104": "    public function warning($message, array $context = []): void",
                    "105": "    {",
                    "106": "        $this->writeLog(__FUNCTION__, $message, $context);",
                    "107": "    }",
                    "108": ""
                },
                "application_frame": false
            },
            {
                "file": "/home/coco/Projects/loco/vendor/laravel/framework/src/Illuminate/Log/LogManager.php",
                "line_number": 590,
                "method": "error",
                "class": "Illuminate\\Log\\LogManager",
                "code_snippet": {
                    "575": "    public function critical($message, array $context = []): void",
                    "576": "    {",
                    "577": "        $this->driver()->critical($message, $context);",
                    "578": "    }",
                    "579": "",
                    "580": "    /**",
                    "581": "     * Runtime errors that do not require immediate action but should typically",
                    "582": "     * be logged and monitored.",
                    "583": "     *",
                    "584": "     * @param  string  $message",
                    "585": "     * @param  array  $context",
                    "586": "     * @return void",
                    "587": "     */",
                    "588": "    public function error($message, array $context = []): void",
                    "589": "    {",
                    "590": "        $this->driver()->error($message, $context);",
                    "591": "    }",
                    "592": "",
                    "593": "    /**",
                    "594": "     * Exceptional occurrences that are not errors.",
                    "595": "     *",
                    "596": "     * Example: Use of deprecated APIs, poor use of an API, undesirable things",
                    "597": "     * that are not necessarily wrong.",
                    "598": "     *",
                    "599": "     * @param  string  $message",
                    "600": "     * @param  array  $context",
                    "601": "     * @return void",
                    "602": "     */",
                    "603": "    public function warning($message, array $context = []): void",
                    "604": "    {"
                },
                "application_frame": false
            },
            {
                "file": "/home/coco/Projects/loco/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/Handler.php",
                "line_number": 249,
                "method": "report",
                "class": "Illuminate\\Foundation\\Exceptions\\Handler",
                "code_snippet": {
                    "234": "                return;",
                    "235": "            }",
                    "236": "        }",
                    "237": "",
                    "238": "        try {",
                    "239": "            $logger = $this->container->make(LoggerInterface::class);",
                    "240": "        } catch (Exception $ex) {",
                    "241": "            throw $e;",
                    "242": "        }",
                    "243": "",
                    "244": "        $logger->error(",
                    "245": "            $e->getMessage(),",
                    "246": "            array_merge(",
                    "247": "                $this->exceptionContext($e),",
                    "248": "                $this->context(),",
                    "249": "                ['exception' => $e]",
                    "250": "            )",
                    "251": "        );",
                    "252": "    }",
                    "253": "",
                    "254": "    /**",
                    "255": "     * Determine if the exception should be reported.",
                    "256": "     *",
                    "257": "     * @param  \\Throwable  $e",
                    "258": "     * @return bool",
                    "259": "     */",
                    "260": "    public function shouldReport(Throwable $e)",
                    "261": "    {",
                    "262": "        return ! $this->shouldntReport($e);",
                    "263": "    }"
                },
                "application_frame": false
            },
            {
                "file": "/home/coco/Projects/loco/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/HandleExceptions.php",
                "line_number": 165,
                "method": "handleException",
                "class": "Illuminate\\Foundation\\Bootstrap\\HandleExceptions",
                "code_snippet": {
                    "150": "    /**",
                    "151": "     * Handle an uncaught exception from the application.",
                    "152": "     *",
                    "153": "     * Note: Most exceptions can be handled via the try / catch block in",
                    "154": "     * the HTTP and Console kernels. But, fatal error exceptions must",
                    "155": "     * be handled differently since they are not normal exceptions.",
                    "156": "     *",
                    "157": "     * @param  \\Throwable  $e",
                    "158": "     * @return void",
                    "159": "     */",
                    "160": "    public function handleException(Throwable $e)",
                    "161": "    {",
                    "162": "        try {",
                    "163": "            self::$reservedMemory = null;",
                    "164": "",
                    "165": "            $this->getExceptionHandler()->report($e);",
                    "166": "        } catch (Exception $e) {",
                    "167": "            //",
                    "168": "        }",
                    "169": "",
                    "170": "        if (static::$app->runningInConsole()) {",
                    "171": "            $this->renderForConsole($e);",
                    "172": "        } else {",
                    "173": "            $this->renderHttpResponse($e);",
                    "174": "        }",
                    "175": "    }",
                    "176": "",
                    "177": "    /**",
                    "178": "     * Render an exception to the console.",
                    "179": "     *"
                },
                "application_frame": false
            },
            {
                "file": "/home/coco/Projects/loco/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/HandleExceptions.php",
                "line_number": 231,
                "method": "Illuminate\\Foundation\\Bootstrap\\{closure}",
                "class": "Illuminate\\Foundation\\Bootstrap\\HandleExceptions",
                "code_snippet": {
                    "216": "     * @return \\Symfony\\Component\\ErrorHandler\\Error\\FatalError",
                    "217": "     */",
                    "218": "    protected function fatalErrorFromPhpError(array $error, $traceOffset = null)",
                    "219": "    {",
                    "220": "        return new FatalError($error['message'], 0, $error, $traceOffset);",
                    "221": "    }",
                    "222": "",
                    "223": "    /**",
                    "224": "     * Forward a method call to the given method if an application instance exists.",
                    "225": "     *",
                    "226": "     * @return callable",
                    "227": "     */",
                    "228": "    protected function forwardsTo($method)",
                    "229": "    {",
                    "230": "        return fn (...$arguments) => static::$app",
                    "231": "            ? $this->{$method}(...$arguments)",
                    "232": "            : false;",
                    "233": "    }",
                    "234": "",
                    "235": "    /**",
                    "236": "     * Determine if the error level is a deprecation.",
                    "237": "     *",
                    "238": "     * @param  int  $level",
                    "239": "     * @return bool",
                    "240": "     */",
                    "241": "    protected function isDeprecation($level)",
                    "242": "    {",
                    "243": "        return in_array($level, [E_DEPRECATED, E_USER_DEPRECATED]);",
                    "244": "    }",
                    "245": ""
                },
                "application_frame": false
            },
            {
                "file": "unknown",
                "line_number": 0,
                "method": "[top]",
                "class": null,
                "code_snippet": [],
                "application_frame": false
            }
        ],
        "context": {
            "request": {
                "url": "http://localhost:2015/",
                "ip": null,
                "method": "GET",
                "useragent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/95.0.4638.54 Safari/537.36"
            },
            "request_data": {
                "queryString": [],
                "body": [],
                "files": []
            },
            "headers": {
                "accept-language": [
                    "en-US,en;q=0.9"
                ],
                "sec-fetch-user": [
                    "?1"
                ],
                "sec-fetch-mode": [
                    "navigate"
                ],
                "cache-control": [
                    "max-age=0"
                ],
                "x-forwarded-for": [
                    "::1"
                ],
                "x-forwarded-proto": [
                    "http"
                ],
                "user-agent": [
                    "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/95.0.4638.54 Safari/537.36"
                ],
                "host": [
                    "localhost:2015"
                ],
                "content-length": [
                    "0"
                ],
                "sec-ch-ua-mobile": [
                    "?0"
                ],
                "accept-encoding": [
                    "gzip, deflate, br"
                ],
                "dnt": [
                    "1"
                ],
                "content-type": [
                    ""
                ],
                "sec-ch-ua-platform": [
                    "\"Linux\""
                ],
                "sec-fetch-dest": [
                    "document"
                ],
                "sec-fetch-site": [
                    "none"
                ],
                "sec-ch-ua": [
                    "\"Chromium\";v=\"95\", \";Not A Brand\";v=\"99\""
                ],
                "accept": [
                    "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9"
                ],
                "upgrade-insecure-requests": [
                    "1"
                ]
            },
            "cookies": [],
            "session": {
                "_token": "irbV1SdVq3Ws3uAaeMYaq6aesXHazZvDi2Ipcs0p"
            },
            "route": {
                "route": null,
                "routeParameters": [],
                "controllerAction": "Closure",
                "middleware": [
                    "web"
                ]
            },
            "env": {
                "laravel_version": "9.3.0",
                "laravel_locale": "en",
                "laravel_config_cached": false,
                "app_debug": true,
                "app_env": "local",
                "php_version": "8.1.3"
            },
            "dumps": [],
            "logs": [],
            "queries": []
        },
        "stage": "local",
        "message_level": null,
        "open_frame_index": null,
        "application_path": "/home/coco/Projects/loco",
        "application_version": null,
        "tracking_uuid": "55b2ba9f-f601-40fb-8cd7-7a270ec42f0c"
    },
    "config": {
        "editor": "phpstorm",
        "theme": "auto",
        "hideSolutions": false,
        "remoteSitesPath": "/home/coco/Projects/loco",
        "localSitesPath": "",
        "enableShareButton": true,
        "enableRunnableSolutions": true,
        "directorySeparator": "/",
        "editorOptions": {
            "sublime": {
                "label": "Sublime",
                "url": "subl://open?url=file://%path&line=%line"
            },
            "textmate": {
                "label": "TextMate",
                "url": "txmt://open?url=file://%path&line=%line"
            },
            "emacs": {
                "label": "Emacs",
                "url": "emacs://open?url=file://%path&line=%line"
            },
            "macvim": {
                "label": "MacVim",
                "url": "mvim://open/?url=file://%path&line=%line"
            },
            "phpstorm": {
                "label": "PhpStorm",
                "url": "phpstorm://open?file=%path&line=%line"
            },
            "idea": {
                "label": "Idea",
                "url": "idea://open?file=%path&line=%line"
            },
            "vscode": {
                "label": "VS Code",
                "url": "vscode://file/%path:%line"
            },
            "vscode-insiders": {
                "label": "VS Code Insiders",
                "url": "vscode-insiders://file/%path:%line"
            },
            "vscode-remote": {
                "label": "VS Code Remote",
                "url": "vscode://vscode-remote/%path:%line"
            },
            "vscode-insiders-remote": {
                "label": "VS Code Insiders Remote",
                "url": "vscode-insiders://vscode-remote/%path:%line"
            },
            "atom": {
                "label": "Atom",
                "url": "atom://core/open/file?filename=%path&line=%line"
            },
            "nova": {
                "label": "Nova",
                "url": "nova://core/open/file?filename=%path&line=%line"
            },
            "netbeans": {
                "label": "NetBeans",
                "url": "netbeans://open/?f=%path:%line"
            },
            "xdebug": {
                "label": "Xdebug",
                "url": "xdebug://%path@%line"
            }
        },
        "shareEndpoint": "https://flareapp.io/api/public-reports"
    },
    "solutions": [],
    "updateConfigEndpoint": "/_ignition/update-config"
}
splashsky commented 2 years ago

In my case this seems to have been resolved by ensuring the correct permissions on the /storage and /bootstrap/cache directories. Since fixing the permissions, this issue hasn't reoccured.