-
-
Notifications
You must be signed in to change notification settings - Fork 85
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
crawler:buildQueue fails with Error at offset 0 of 92 bytes #1087
Comments
Your dataString looks totally fine, can be json_decoded and is an array afterwards which will be returned before I managed to see a convert call with an empty I'm not familiar with this whole process but maybe we should:
Steps to reproduce: Crawler log -> Log -> Reload List Should I prepare one or two pull requests? |
@ulrichmathes If you have a suggested fix in mind, I would be happy to review a PR. |
Fixes tomasnorre#1087 Return early on empty $dataString as this can't be an array in any case.
Fixes tomasnorre#1087 The intention of the try-catch block was to catch Throwables during the unserialization of $dataString. However, unserialize only throws exceptions when the initialization of objects fails. With 'allowed_classes' => false, no objects will be initialized. Since PHP 8.3, an E_WARNING is issued if the string is not unserializable. As we are not certain if the string contains serialized data, we only want to attempt to unserialize it. To prevent E_WARNINGS, we need to suppress errors instead of using try-catch.
Hello, i will check your fix on monday. I'm not sure if this will help in my case i described and had debugged. |
And what i remember now is that i tried to unserialize the string directly via unserialize() and could reproduce the error. Without any further code. |
Bug Report
Current Behavior
i execute the following command to build a queue and crawl the found pages.
"typo3cms crawler:buildQueue --depth 3 --mode exec 1 default"
After list of the found urls i get
Expected behavior/output
Execution should not fail
Steps to reproduce
Prepare a configuration
execute "typo3cms crawler:buildQueue --depth 3 --mode exec 1 default"
Environment
Possible Solution
The error appiers in JsonCompatibilityConverter line 39.
The dataString for unserialize in my behavior is
{"url":"https://www.domain.de/en/home.html","procInstructions":[""],"procInstrParams":[]}
This is not valid for unserialize. When i comment the lines 39-49 the execution works.
The text was updated successfully, but these errors were encountered: