roots / acorn

Laravel components for WordPress plugins and themes
https://roots.io/acorn/
MIT License
726 stars 90 forks source link

Livewire - No application encryption key has been specified. #376

Closed natanael-aguiar closed 2 months ago

natanael-aguiar commented 2 months ago

Version

4.2.2

What did you expect to happen?

Following this Livewire implementation tutorial: https://roots.io/acorn/docs/using-livewire-with-wordpress/ I hoped that by following this tutorial the livewire would be implemented successfully and without errors.

What actually happens?

After following the implementation tutorial to the letter, this error "No application encryption key has been specified" occurs despite the fact that my .env file already has an APP_KEY defined.

image

Steps to reproduce

  1. Start a new project with Bedrock and Sage.
  2. Follow this Livewire implementation tutorial. (https://roots.io/acorn/docs/using-livewire-with-wordpress/)
  3. After that, this error will appear as shown in the screenshot below.

image

System info

  1. Windows 11;
  2. WSL 2;
  3. DDEV (Docker-based PHP development environments.);
  4. Docker;

Log output

No response

Please confirm this isn't a support request.

Yes

Log1x commented 2 months ago

Can you please make a support thread on Discourse.

natanael-aguiar commented 2 months ago

@Log1x Sorry, I did not get it! This seems like a bug to me, which channel should I report this to?

Log1x commented 2 months ago

I see. It is due to https://github.com/roots/bedrock/pull/714

@QWp6t will have to follow up on how to approach this in Acorn.

Log1x commented 2 months ago

We figured out the cause of this and a fix will be pushed shortly.

Sorry about the confusion hereโ€“ I was confident this stuff all worked back when I did it. The bug came from an unexpected place outside of Acorn. ๐Ÿ˜…

Log1x commented 2 months ago

This has been fixed in https://github.com/roots/support/pull/4 and a released has been tagged for v1.0.1.

Just run composer update roots/support in your Acorn project.

natanael-aguiar commented 2 months ago

@Log1x This step worked wonderfully, but another problem arose at the end of it all. I have an error in the console related to: /livewire/livewire.js returning a 404 status code

Log1x commented 2 months ago

I tested everything on my fresh project I made to test this report and everything seems to work as intended. ๐Ÿ˜•

Screenshot

If you haven't figured it out still, feel free to make a post on Discourse and I can try to help.