Open GuyPaddock opened 1 year ago
May be related to https://github.com/lando/pantheon/issues/153 and https://github.com/lando/pantheon/issues/154.
This is happening to me and my colleagues on another project are reporting the same issue.
I want to let you know this is happening to me as well on only 1 site on Pantheon. All the other sites we have work fine. Not sure why it is only the once site. If I download the database and import it manually it imports fine.
I am currently using lando v3.18.0, php 8.1.18 on POP_OS LINUX 22.04 and Docker 24.0.2 because I am also running DDEV on some projects (but never at the same time).
This also happened to me, on a Pantheon Drupal 10.1.1 site. As @GuyPaddock commented, manually creating a backup on Pantheon and using lando db-import
works fine.
Any updates to this? I'm getting it right now. Will try the workaround.
@seanr and another user on the Lando Slack reported issues that sounds similar/same. In their case, the problem was limited to a single site; other sites were able to be pulled down fine. I personally haven't been able to replicate, but do believe there's an issue somewhere based on these reports and the excellent sleuthing done on this ticket (thanks all!).
Lando uses this command to pull the DB:
We also have a fallback command, which would run if the first command fails:
https://github.com/lando/pantheon/blob/7c30cfbba933035b7a0ce56a87e6cd35d60157b7/scripts/pull.sh#L129
If someone who has experienced this issue consistently could try running those two commands, it would be interesting to see if one of them fails/works. I can help you configure the commands with the correct variables if you need help there (DM me on the Lando Slack).
I've also been running into this issue recently. I only noticed it on projects after we migrated from D9 to D10. It does not occur on all projects. Thankfully I found this issue today and @GuyPaddock's suggestion of using lando db-import
is now allowing me to work around it.
Same error, same place.
Insufficient data for unserializing - 1188 required, 1180 present RouteProvider.php:382
PHP Fatal error: Uncaught TypeError: Argument 2 passed to Symfony\Component\Routing\RouteCollection::add() must be an instance of Symfony\Component\Routing\Route, bool given, called in /app/web/core/lib/Drupal/Core/Routing/RouteProvider.php on line 382 and defined in /app/vendor/symfony/routing/RouteCollection.php:75
This has been going on for a while now. To reproduce (using Lando 3.x, php 8.1, Pantheon):
This has been an ongoing issue for a while now (well over a year). And the work around really sucks considering easy it is to normally use Lando and Pantheon together. I hope we get to the bottom of this. Here is to fingers-crossed!!
I see this when specific kinds of configuration appear in a sites db. Example line 6 of this configuration https://github.com/az-digital/az_quickstart/blob/main/modules/custom/az_publication/config/install/az_publication.az_citation_style.az_bluebook.yml#L6
This is easy to reproduce on pantheon using our custom upstream, which I think may be public "3162cc4c-2f75-40cb-8487-0c69bda99f39".
terminus site:upstream:set <site_name> <upstream_id>
I also have this effecting some sites I look after - but not every site, as others have noted.
This also effects manually running the terminus command and then running the db-import command:
terminus remote:drush <site>.<env> -- sql-dump --structure-tables-list="cache,cache_*" > test.sql
PHP versions both on pantheon and lando are 8.2.18. Mariadb has slightly different versions: 10.4.25 on pantheon and 10.4.17 on lando. Not sure if slight difference could be the cause effecting some sites.
However, the workaround of importing a backup works fine.
FYI There is a related closed issue on Drupal.org, where some users mentioned it was effecting the pantheon plugin: https://www.drupal.org/project/drupal/issues/3152660
Running in debug mode I see the following errors repeated a number of times:
lando ERROR RangeError: Invalid string length
at Socket.<anonymous> (/snapshot/cli/node_modules/@lando/core/lib/shell.js)
at Socket.emit (node:events:517:28)
at addChunk (node:internal/streams/readable:368:12)
at readableAddChunk (node:internal/streams/readable:341:9)
at Readable.push (node:internal/streams/readable:278:10)
at Pipe.onStreamRead (node:internal/stream_base_commons:190:23) +109ms
From a search of that error message it suggests the output data is too big to parse.
@reynoldsalec - the fallback works fine but from my read of the code it'll never be executed - the initial pull is piped (into pv and onwards) so the exit status of that pipeline is zero even if the first step fails: https://github.com/lando/pantheon/blob/eeaa28ee99335a0db2d1c4df3e753883decba5fc/scripts/pull.sh#L160
I ran into this issue when I recently enabled the Devel module on my Pantheon site and pulled the db. Not sure why, but when I disabled Devel again, it worked. I could re-enable the module locally and it worked fine.
Just thought I'd leave this here in case someone finds this useful.
Lando drush un devel work for me. We have a split configuration for devel but it should not be enabled in production. Need to figure why is this failing on cim
Over the last few hours, I've been debugging the following error, which only appears when running a copy of a Drupal site locally but does not appear with the same site on Pantheon:
At first, I thought maybe this was an issue with PHP version or something strange with Symfony or Drupal, but the version of PHP I am running locally in Lando is identical to the one on Pantheon. Eventually, I discovered the root cause of the issue -- it appears that some records containing serialized data are getting corrupted/modified in transit.
Here's what the serialized data looks like on Pantheon for the record that's causing the error above:
Here's what the same data looks like locally in Lando:
There's a lot to compare, so it might not be obvious what the issue is. Here's a graphical diff (look at the part highlighted in gray):![image](https://user-images.githubusercontent.com/2631799/212570017-b4a3b7e7-d460-43c5-9d94-75167c1a473a.png)
It seems that
<comment>
is getting stripped out of the regular expression in the serialized string, leading to the string being28
characters instead of37
characters. This is what is causing the deserialization failure:This only seems to happen if I use the
lando pull
command to get the database. If I create a backup on Pantheon, download it, and then uselando db-import
, the database imports correctly without the corruption.