Giter Site home page Giter Site logo

Comments (19)

arukompas avatar arukompas commented on June 3, 2024 2

hey @1YalcinSahin1 , @beard7 , your issue has been fixed in latest update, v3.1.7. You can now use database driver for cache and the contents should be UTF8-safe.

Still working on mail logs with attachments

from log-viewer.

arukompas avatar arukompas commented on June 3, 2024 1

hey @ale1981 , mail previews have been fixed in v3.1.8 :) hope this helps!

that's all from this bug report, I think. Let me know if anyone's still experiencing "Malformed UTF8 characters" error after v3.1.8

from log-viewer.

1YalcinSahin1 avatar 1YalcinSahin1 commented on June 3, 2024 1

Thanks @arukompas You solved our problem quickly :)

from log-viewer.

ale1981 avatar ale1981 commented on June 3, 2024 1

hey @ale1981 , mail previews have been fixed in v3.1.8 :) hope this helps!

that's all from this bug report, I think. Let me know if anyone's still experiencing "Malformed UTF8 characters" error after v3.1.8

Thanks, working now!

from log-viewer.

arukompas avatar arukompas commented on June 3, 2024

@beard7 Most likely something went wrong with the extraction of JSON context. Could you please post the log file that cannot be opened, and I'll try and debug it locally.

from log-viewer.

beard7 avatar beard7 commented on June 3, 2024

Hi,

It's the same result on every log I try to open, including one with a single entry:

[2023-08-31 11:28:13] local.WARNING: str_split(): Passing null to parameter #1 ($string) of type string is deprecated in C:\Code\insight\storage\framework\views\15dc66de37f3339832bf7117ec8a0120.php on line 80  

Not sure is this will help with debugging.

from log-viewer.

arukompas avatar arukompas commented on June 3, 2024

That is weird @beard7 , can't see anything that would break Log Viewer... I assume this is a Windows log file, which might have a different line ending encoding. Could you upload the file as-is, as an attachment?

from log-viewer.

beard7 avatar beard7 commented on June 3, 2024

Sure. Here's an example.
laravel-2023-09-21.log

from log-viewer.

beard7 avatar beard7 commented on June 3, 2024

Hi,

After a bit more digging, this error is only happening when using the 'database' cache driver. My databaseis MS SQL and this error occures when writing to the cache:

SQLSTATE[IMSSP]: An error occurred translating string for input param 1 to UCS-2: No mapping for the Unicode character exists in the target multi-byte code page.
 (Connection: sqlsrv, SQL: update [cache] set [value] = s:69:"x�K?2??δ24?4?40422?N?2??.?2?R
w???sW?�eZ�X?pm-\???1�?@?F??@
?wF�?";, [expiration] = 1696848458 where [key] = laravellv:v3.1.4:file:0ae1da0b-laravel-2023-09-28.log:ecf8427e:chunk:0) {"userId":1,"exception":"[object] (Illuminate\\Database\\QueryException(code: IMSSP): SQLSTATE[IMSSP]: An error occurred translating string for input param 1 to UCS-2: No mapping for the Unicode character exists in the target multi-byte code page.

 (Connection: sqlsrv, SQL: update [cache] set [value] = s:69:\"x\u0001K�2��δ24�4�40422�N�2��.�2�R
w\f���sW�\beZ\u0019X�pm-\\���1\u001e�@�F��@
�\u0000wF\u001b�\";, [expiration] = 1696848458 where [key] = laravellv:v3.1.4:file:0ae1da0b-laravel-2023-09-28.log:ecf8427e:chunk:0) at C:\\[path]\\vendor\\laravel\\framework\\src\\Illuminate\\Database\\Connection.php:795)

After switching to the 'file' cache driver, all is good.

from log-viewer.

arukompas avatar arukompas commented on June 3, 2024

Hey @beard7 , great find!

Yes, the cached value is first compressed with gzip, hence the use of multi-byte characters. I guess with SQL databases it does make a difference, in case the selected database charset does not support some of the symbols used by gzip. There was also another problem with SQL as cache driver, from another user.

I'll have a look at SQL as the cache driver for Log Viewer this weekend.

from log-viewer.

ale1981 avatar ale1981 commented on June 3, 2024

Sorry to bump an existing post but this is also an issue when logging mail to the log file, especially if the mail has attachments.

from log-viewer.

1YalcinSahin1 avatar 1YalcinSahin1 commented on June 3, 2024

I have the same problem often

from log-viewer.

1YalcinSahin1 avatar 1YalcinSahin1 commented on June 3, 2024

hey @ale1981. I experienced the same problem again. I am sending the images.

LOG_VIEWER_CACHE_DRIVER=database

Database character format: utf8mb4_turkish_ci

Ekran görüntüsü 2023-11-24 101610

Ekran görüntüsü 2023-11-24 101625

from log-viewer.

arukompas avatar arukompas commented on June 3, 2024

hey @1YalcinSahin1 , could you share the error from your second screenshot? Preferably the entry from your laravel log, not browser console.

from log-viewer.

1YalcinSahin1 avatar 1YalcinSahin1 commented on June 3, 2024

@arukompas I expect to repeat the mistake. I am reporting another situation that occurred at that time.I will write the error as soon as I get it.

Kayit.2023-11-24.142153.mp4

from log-viewer.

arukompas avatar arukompas commented on June 3, 2024

@1YalcinSahin1 I just tried the utf8mb4_turkish_ci collation and it still works as expected.

What does your cache table structure look like?
Screenshot 2023-11-24 at 14 41 59

from log-viewer.

1YalcinSahin1 avatar 1YalcinSahin1 commented on June 3, 2024

Our database table structure is the same.

500 error came. I am attaching the file.

laravel.log

from log-viewer.

1YalcinSahin1 avatar 1YalcinSahin1 commented on June 3, 2024

@arukompas I found the string expression causing the error.

[2023-12-18 16:15:19] production.ERROR: SQLSTATE[22001]: String data, right truncated: 1406 Data too long for column 'barcode' at row 1 (Connection: mysql, SQL: update customer_1setproductID= 5881,productPrice= 9.975,productName= TL 084CN,productSalePrice= 9.975,productStock= 0,productStatus= 0,productInfoMD5= 25b39f0b71c310706d10ba4aaf486bb5,productStockPriceMD5= deb54e44f5ddaf4879440b8b24ce98a4,productImageMD5= d2253e3f51a945bdbfe113888f6456cf,imageErrorStatus= 0,infoUpdateDate= 2023-12-18 16:15:18,stockPriceUpdateDate= 2023-12-18 16:15:18,statusUpdateDate= 2023-12-18 16:15:18,imageUpdateDate= 2023-12-18 16:15:18,barcode= 33583 126 2100000114665 1424340 TL 084CN 126 Transistör Diğ,brand= Customer1,categories= "Elektronik Malzeme > Elektronik Devre Elemanlar\u0131 > Entegre, Soketleri > ",productText= <p><strong>Ürün Adı: </strong>TL 084CN</p><p></p><p><strong>Ürün Bilgisi</strong></p><p>Ürün AdıTL084CN</p><p>Ürün KategorisiAmplifikatör ve Komparatörler</p><p>Ürün Alt KategorisiOp-Amp</p><p>Paket TipiDIP-14</p><p>Pin Sayısı14</p><p>Giriş Gerilimi7 - 36</p><p>Bant Genişliği3MHz</p><p>Slew Rate (Tepki Hızı)13V/µs</p><p>Amplifikatör Sayısı4</p><p> </p>,productImages= ["https:\/\/domain.com\/Images\/org\/69057-tl-084cn-tl-084cn-14421.jpg"] whereid= 10321) {"exception":"[object] (Illuminate\\Database\\QueryException(code: 22001): SQLSTATE[22001]: String data, right truncated: 1406 Data too long for column 'barcode' at row 1 (Connection: mysql, SQL: updatecustomer_1setproductID= 5881,productPrice= 9.975,productName= TL 084CN,productSalePrice= 9.975,productStock= 0,productStatus= 0,productInfoMD5= 25b39f0b71c310706d10ba4aaf486bb5,productStockPriceMD5= deb54e44f5ddaf4879440b8b24ce98a4,productImageMD5= d2253e3f51a945bdbfe113888f6456cf,imageErrorStatus= 0,infoUpdateDate= 2023-12-18 16:15:18,stockPriceUpdateDate= 2023-12-18 16:15:18,statusUpdateDate= 2023-12-18 16:15:18,imageUpdateDate= 2023-12-18 16:15:18,barcode= 33583\t126\t2100000114665\t1424340\tTL 084CN\t\t\t\t126\t\tTransistör\t\tDiğ,brand= Customer1,categories= \"Elektronik Malzeme > Elektronik Devre Elemanlar\\u0131 > Entegre, Soketleri > \",productText= <p><strong>Ürün Adı: </strong>TL 084CN</p><p></p><p><strong>Ürün Bilgisi</strong></p><p>Ürün AdıTL084CN</p><p>Ürün KategorisiAmplifikatör ve Komparatörler</p><p>Ürün Alt KategorisiOp-Amp</p><p>Paket TipiDIP-14</p><p>Pin Sayısı14</p><p>Giriş Gerilimi7 - 36</p><p>Bant Genişliği3MHz</p><p>Slew Rate (Tepki Hızı)13V/µs</p><p>Amplifikatör Sayısı4</p><p> </p>,productImages= [\"https:\\/\\/domain\\/UserFiles\\/Images\\/org\\/69057-tl-084cn-tl-084cn-14421.jpg\"] whereid = 10321) at /var/www/vhosts/domain/httpdocs/Project/vendor/laravel/framework/src/Illuminate/Database/Connection.php:801)

productImages = ["https:\/\/domain\/UserFiles\/Images\/org\/69057-tl-084cn-tl-084cn-14421.jpg"]

When I delete this line, the error goes away.

from log-viewer.

arukompas avatar arukompas commented on June 3, 2024

hey @1YalcinSahin1 , another user recently pointed out a bug with multi-byte characters in logs not being processed correctly. A fix was made recently in v3.1.12

Could you try updating the Log Viewer to see if it worked for you?

Thanks 🙏

from log-viewer.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.