Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ErrorException: Undefined array key 1 #84

Closed
CreateWithCoding opened this issue Sep 5, 2022 · 3 comments
Closed

ErrorException: Undefined array key 1 #84

CreateWithCoding opened this issue Sep 5, 2022 · 3 comments
Labels
needs more info This issue needs more information to reproduce or fix

Comments

@CreateWithCoding
Copy link

This looks promising for cleaning up my logs to view quickly. Thank you.

But I'm having a couple issues below.

ErrorException: Undefined array key 1

PHP 8.1.2
9.20.0

I can read the Laravel.log just fine, but randomly I get the ErrorException above.

But I can't read the Schedule logs coming from Kernel. They are empty.

And not sure if it matters, but Composer said tgalopin/html-sanistizer is abandoned below.

C:\laragon\www\appinsta>composer require opcodesio/log-viewer
Info from https://repo.packagist.org: #StandWithUkraine
Using version ^1.2 for opcodesio/log-viewer
./composer.json has been updated
Running composer update opcodesio/log-viewer
Loading composer repositories with package information
Updating dependencies
Lock file operations: 1 install, 0 updates, 0 removals

  • Locking opcodesio/log-viewer (v1.2.9)
    Writing lock file
    Installing dependencies from lock file (including require-dev)
    Package operations: 1 install, 0 updates, 0 removals
  • Downloading opcodesio/log-viewer (v1.2.9)
  • Installing opcodesio/log-viewer (v1.2.9): Extracting archive
    Package tgalopin/html-sanitizer is abandoned, you should avoid using it. Use symfony/html-sanitizer instead.
    Generating optimized autoload files

Screenshot 2022-09-05 131144

@arukompas
Copy link
Contributor

Hey @CreateWithCoding

thanks for the report. Let's break it into 2 problems.

1. ErrorException: Undefined array key 1 when reading Laravel logs

Can you please share the full laravel.log file that you were browsing when the exception occurred? I just want to make sure there's no weird edge cases that aren't yet covered. If you don't feel comfortable sharing it here in public, please send it to me via arunas@belltastic.com

2. can't read the Schedule logs coming from Kernel

That's because currently this package only supports Laravel logs. Those created by calling Log::xxxx() in your app. It does not understand other log formats, unfortunately, which is why your log comes empty - it can't find any Laravel logs inside it 🤷‍♂️

Hope this makes sense. Looking forward to the log file for the first problem!

@arukompas arukompas added the needs more info This issue needs more information to reproduce or fix label Sep 5, 2022
@arukompas
Copy link
Contributor

bump @CreateWithCoding

Hey, are you still experiencing issues with the latest version? v1.4.0

@arukompas arukompas closed this as not planned Won't fix, can't repro, duplicate, stale Sep 14, 2022
@CreateWithCoding
Copy link
Author

This is working fine now. Sorry for the delay. as of now I'm on latest version: v1.4.5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs more info This issue needs more information to reproduce or fix
Projects
None yet
Development

No branches or pull requests

2 participants