Attempted to install a clean version of D8 today, and I'm getting a fatal error on the 2nd step of the install (right after selecting an install profile). Here are the fatal errors...
SQLSTATE[42S02]: Base table or view not found: 1146 Table 'd8mappingdev.users'
Drupal\Core\Database\IntegrityConstraintViolationException: SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'uid' cannot be null: INSERT INTO {sessions} (sid, ssid, uid, hostname, session, timestamp) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2, :db_insert_placeholder_3, :db_insert_placeholder_4, :db_insert_placeholder_5); Array ( [:db_insert_placeholder_0] => NLUw1Bvu4ra30CJkNaZNxVvWcsjG4U9ASUkPmkqzihY [:db_insert_placeholder_1] => [:db_insert_placeholder_2] => [:db_insert_placeholder_3] => 127.0.0.1 [:db_insert_placeholder_4] => [:db_insert_placeholder_5] => 1362021900 ) in Drupal\Core\Database\Connection->query() (line 551 of /Users/bmorrison/htdocs/d8mappingdev/core/lib/Drupal/Core/Database/Connection.php).
I was able to install a clean version of D8 a few days ago, so the error has probably been introduced since then. It doesn't make a difference which install profile I chose.
I didn't bump the priority up to critical, but if somebody else can verify, then it probably should be pushed up.
Comment | File | Size | Author |
---|---|---|---|
#14 | install-request-service-woes-1929812-14.patch | 3.8 KB | effulgentsia |
Comments
Comment #1
larowlanOthers reported this in irc, creating a new database seemed to fix it. Ie with a new database name too.
Comment #2
Brandonian CreditAttribution: Brandonian commentedWas able to get it working based on @larowlan's advice. Marking as fixed.
Comment #3
jenlamptonChanging this back to active. And bumping up priority.
We should be able to install Drupal without a fatal if a database already exists. No?
Here's how to reproduce:
1) take a working drupal 8 site
2) drop the database in MySQL by typing
drop databsse whatever;
3) create a new databse in MySQL by typing
create databsse whatever;
4) sudo rm -rf sites/default/files/*
Now run the installer.
On step 3 of the installer you get:
Uncaught exception thrown in session handler.
And since you asked... I also tried adding a step 5:
5) delete sites/default/settings.php
When I do this then the installer gets to the next step, 'Database configuration'
and then fatals with the same error when you hit 'save and continue' at the bottom.
Comment #4
ParisLiakos CreditAttribution: ParisLiakos commentedfor any folks that having this one..settings.php contains
$config_directories
, so should be removed before reinstallingComment #5
ParisLiakos CreditAttribution: ParisLiakos commentedoops..x-post..seems there is sth else there for jenlampton..restoring status while troubleshooting with chx on irc
Comment #6
chx CreditAttribution: chx commentedI can't reproduce this. I am running PHP 5.4.11 and MySQL 5.5.30 on Linux 3.5.6.
Comment #7
jenlamptonI am running PHP 5.3.6 and MySQL 5.5.9 on MAMP 2.0.2.
Comment #8
ParisLiakos CreditAttribution: ParisLiakos commentedCant reproduce this either:
PHP 5.4.4 MySQL 5.5.29 Linux 3.7.0
Comment #9
jenlamptonClosing since apparently my computer likes to play tricks on me.
With a sudo rm -rf on my whole drupal 8 directory, and a fresh download, things seems to be working fine now.
Sorry for the false alarm.
Comment #10
jenlamptonJust confirmed this error with 5 computers at exactly the same time, see https://twitter.com/jenlampton/status/344600938486566912/photo/1
Uncaught exception thrown in session handler.
All machines are running:
- latest version of MAMP 2.1.3
- php.5.3.20
- mysql 5.5.29
This was the first time 4 of the 5 machines installed drupal - ever.
Fresh checkouts from 8.x branch for all involved.
New Databases created via mysql command line.
Credentials plugged in to installer via UI.
Comment #11
adamcowboy CreditAttribution: adamcowboy commentedI just got this error:
"The service definition "request" does not exist."
We changed the mysql permissions to grant all on this database and tried to reinstall and got this error instead.
Comment #12
echoz CreditAttribution: echoz commentedI too just got same error as #10, with a recent git pull, doing the same - drop database, delete settings.php, install fresh - that I've been doing since last year.
Comment #13
ekl1773Yep, #10, me too. Using MAMP, fresh install, new db, wiped php files etc. You're not alone!
Comment #14
effulgentsia CreditAttribution: effulgentsia commentedI'm also getting this error, on MAMP, PHP 5.4.10, whenever doing a fresh web-based install (i.e., no sites/default/files, no sites/default/settings.php), regardless whether I have an empty db or no db at all. That seems like critical priority to me.
Via git bisect, I found that this error started as a result of #1623114-34: Remove drupal_exit(). I suspect due to the lack of exiting where we used to exit, and therefore, the writing of session in places we didn't used to.
However, that's not the bug itself, just the surfacing of it. The underlying bug is that Drupal::request() sometimes returns a request object that's incomplete (e.g., doesn't have client IP info in it, triggering the error in #10), and that needs to be fixed in #2004086: The Request service must be synthetic.
In the meantime, here's a patch that preserves a valid $request object, at least throughout installation. I don't really know if this moves us closer to a real solution for #2004086: The Request service must be synthetic or is just more band-aids, so I'll leave comments on the other issues to solicit that feedback.
Comment #15
chx CreditAttribution: chx commentedAdding reviewers to the issue. I only assigned it to @katbailey for review, feel free to unassign.
Comment #16
effulgentsia CreditAttribution: effulgentsia commentedBy the way, the RTBC stopgap patch in #2004086: The Request service must be synthetic also solves this problem, so if that's committed first, then #14 doesn't need to be, though the code in it will likely make its way into the final patch of that issue in any case.
Comment #17
jenlamptonConfirming, the patch in #2004086: The Request service must be synthetic fixed the problem for me.
Comment #18
alexpottSo I'm closing as #2004086: The Request service must be synthetic has landed