- 🇧🇪Belgium wim leers Ghent 🇧🇪🇪🇺
This still needs tests — once those exist, I'll be happy to RTBC 😊
- 🇨🇦Canada joseph.olstad
Not sure how I'd write a test for this, basically I assume, load the test site web links via javascript with random links and some ?getparam=timestamp to break cache would probably do it.
Here's the module I wrote and used that exposed the problem in BigPipe.
basically using the https://www.drupal.org/project/linkchecker → module to create a list of links to crawl
from there rather than using Drupal to crawl, using javascript to crawl, the javascript is included in this module.
basically you'll need heavy loads to expose the bug.
- 🇩🇪Germany jurgenhaas Gottmadingen
This should pad for an empty string and not for NULL, because at the end of the method, there is a call to
$this->sendChunk($scripts_bottom);
where the given argument is asserted for being a string or HtmlResponse. I.e. if we passed NULL, this would throw an exception there.As for #24, here is a stack trace of what actually has happened in our case:
AssertionError: assert(is_string($chunk) || $chunk instanceof HtmlResponse) in assert() (Zeile 259 in /var/www/html/web/core/modules/big_pipe/src/Render/BigPipe.php) #0 /var/www/html/web/core/modules/big_pipe/src/Render/BigPipe.php(259): assert() #1 /var/www/html/web/core/modules/big_pipe/src/Render/BigPipe.php(370): Drupal\big_pipe\Render\BigPipe->sendChunk() #2 /var/www/html/web/core/modules/big_pipe/src/Render/BigPipe.php(304): Drupal\big_pipe\Render\BigPipe->sendPreBody() #3 /var/www/html/web/core/modules/big_pipe/src/Render/BigPipeResponse.php(112): Drupal\big_pipe\Render\BigPipe->sendContent() #4 /var/www/html/vendor/symfony/http-foundation/Response.php(381): Drupal\big_pipe\Render\BigPipeResponse->sendContent() #5 /var/www/html/web/index.php(20): Symfony\Component\HttpFoundation\Response->send() #6 {main}
- 🇫🇷France andypost
I find #24 is a good idea about test and still not clear how server load affects chunks
- First commit to issue fork.
- 🇩🇪Germany sleitner
@wim leers : I have this PHP warning in my logs:
Warning: Undefined array key 2 in Drupal\big_pipe\Render\BigPipe->sendPreBody() (line 311 in /www/web/core/modules/big_pipe/src/Render/BigPipe.php)
Created a MR for this issues, but tests are still needed.