Skip to content
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

[5.x]: OperationAbortedException isn't shown during a codeception run, causing much confusion #15519

Open
jaspertandy opened this issue Aug 12, 2024 · 1 comment
Assignees
Labels

Comments

@jaspertandy
Copy link

What happened?

Description

This might be a little niche but it's just cost me an hour of chasing non-existent bugs so even if it's something Google picks up somehow it might be useful.

I'm adding codeception to an existing project. Followed all instructions, but keep getting this sort of error:

SQLSTATE[42S02]: Base table or view not found: 1146 Table 'craft_test.migrations' doesn't exist

The reason for this error is that the install migration is failing:

https://github.com/craftcms/cms/blob/5.x/src/migrations/Install.php#L77

Because of a schema version mismatch:

Project config validation failed: Craft CMS is Composer-installed with schema version 5.3.0.2, but project.yaml expects 5.0.0.21.

Run `composer install` or remove your `config/project/` folder and try again.

Aborting install.

Obviously this is completely my fault, but would have been good to surface that error and crash out there so I could fix that error.

Steps to reproduce

  1. Update Craft between versions that cause a schemaVersion change
  2. Don't update project config
  3. Try to run tests

Expected behavior

Error about mismatched schemaVersions between project config and installed version

Actual behavior

Error about missing database tables.

Craft CMS version

5.3.2

PHP version

8.2

Operating system and version

No response

Database type and version

No response

Image driver and version

No response

Installed plugins and versions

@jaymeh
Copy link

jaymeh commented Aug 20, 2024

I see the same issue when running the test suite for my plugin. It seems to have occurred somewhere in the last month, my tests passed on the 15th of July. (https://github.com/creode/magic-login/actions/runs/9941465874/job/27460567727)

Issues occurred when I re-ran the same tests in a recent PR: (https://github.com/creode/magic-login/actions/runs/10467813619/job/28987356324?pr=38)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants