cholladay0816 / CreatorCore

CreatorCore is a commission-based web service designed to streamline, simplify, and revolutionize the way we handle online commissioning.
https://www.creator-core.com
Other
2 stars 1 forks source link

PHPUnit Test Issue: Session store not set on request. #39

Closed cholladay0816 closed 3 years ago

cholladay0816 commented 3 years ago

When I run PHPUnit on my develop branch, I am met with this mysterious error:

1) Jetstream\DeleteAccountTest::test_user_accounts_can_be_deleted
RuntimeException: Session store not set on request.

I tried reverting to the main branch, clearing my vendor and composer-lock file, and still get the same issue. However, this is where the issue becomes a local issue and I have no idea why.

I still get the error running a local test of the main branch, but it passes its checks on GitHub actions.

image

However, one of my commits somehow caused this issue to affect GitHub actions on the develop branch, and it's impossible for me to test locally which change caused this glitch that is now afflicting my local tests.

The error appears to be caused by test_user_accounts_can_be_deleted, yet the test directly below is almost identical and doesn't cause an error.

image

I found this is because the DeleteUserForm livewire component is accessing $request->session(), and despite working perfectly fine as Laravel Jetstream boilerplate for the past few months, there is now some issue introduced that makes this unacceptable.

image

I'd appreciate another pair of eyes on this, it's pretty confusing and there don't appear to be any similar issues online about this.

cholladay0816 commented 3 years ago

Resolved by rolling back laravel/jetstream to v2.3.0 from v2.3.1. ( cholladay0816/CreatorCore@48842764 )