Comments (11)
Hello, i also have the same problem.
When i have PULSE_ENABLED=true
i have an error
production.ERROR: No application encryption key has been specified. {"exception":"[object] (Illuminate\\Encryption\\MissingAppKeyException(code: 0): No application encryption key has been specified.
only on login/logout process.
my config is not cached but when i cache my config, and test, the error don't appear. I add that caching config not appropriate for my application needs.
I have also run several time php artisan config:clear
php artisan key:generate
Pulse Version
1.0.0-beta11
Laravel Version
10.43.0
PHP Version
8.1.13
Database Driver
postgres
from pulse.
Yes, I have laravel sanctum for API-side authentication. However, the problem only occurs when login/logout on the web.
I initially thought it was due to the csrf but when I'm logged and handling other forms using the csrf, there are no problems.
I have the impression that during login/logout, the application can't read the APP_KEY parameter of the env.
However, when the config is cached the error doesn't occur during login/logout.
from pulse.
Are you using redis for session as well and did redis server memory usage maxed out when you faced this issue?
from pulse.
I'm not using Redis for sessions, and memory usage of my Redis node has remained between 50%-60% continuously over the past 14 daya
from pulse.
@sts-ryan-holton do you know if this is only happening to users that visit the /pulse
dashboard?
I'm wondering if Livewire, which is used on the dashboard, is somehow causing the token to be regenerated or something.
Have you anything custom in your application around generating / regenerating CSRF tokens?
from pulse.
Also curious about what middleware is used on the Pulse route vs. the other routes
from pulse.
This is happening on non-pulse routes. But I suspect Pulse might be causing this. For example, since I've got Laravel Fortifg and Sanctum in my project, if I try to log in via my front-end, it first makes a request to the sanctum csrf-token endpoint, but this occasionally fails and throws the mismatch error.
This has only started happening since installing Pulse, and prior to this I've had sanctum/fortify in my project for the past 2 years no problem.
I don't do anything custom with my tokens.
from pulse.
Just jumping back in here, I've had several reports from customers within my platform since creating this issue. I've just experienced the CSRF token mismatch error again just now, here's something interesting:
- Add
PULSE_ENABLED=false
to.env
- Run
php artisan config:clear
- Log in is successful
However...
Without setting PULSE_ENABLED=false
, strangely it works if I clear my browser cache - not ideal for users. There's certainly something with Pulse affecting the auth/sanctum in some way.
from pulse.
@waazibf are you also using Laravel Sanctum? This seems like it may be a different issue as you error is related to encryption and not CSRF expiration?
from pulse.
I'm struggling to work out what could be causing this one. If either of you could create a reproduction repository, that would be much appreciated.
I'm also wondering if maybe Pulse is silently discarding an exception of something under the hood that might shed some more information on the problem.
Could you both add some Pulse exception logging and see if that gives you any further insights: https://laravel.com/docs/11.x/pulse#pulse-exceptions
from pulse.
Unfortunately I'm not able to replicate this one. We are happy to dive into it, but will need some more information on the potential cause if anyone it able to do any debugging on the issue.
Ping the thread if you have any insights and we can always reopen the issue.
from pulse.
Related Issues (20)
- redis cluster not supported for ingesting data HOT 6
- Support for sqlsrv HOT 3
- Locking and Trimming HOT 2
- Memory leak when running tests. HOT 1
- Running mysql command "optimize" fails on pulse_aggregates HOT 2
- Just an idea: Recording request data when logging exceptions HOT 1
- internal hooks HOT 1
- Feature request: ability to configure how many days of data is kept in pulse entries HOT 4
- Pulse significantly slows down Laravel Octane when using multiple CPU cores HOT 7
- SQLSTATE[HY000]: General error: 1 no such column: true HOT 6
- Feature Request: Extend nav bar with items HOT 2
- Enhancement Request: Customizable Context Tags for Monitoring Entries. HOT 1
- Dashboard with empty screen HOT 2
- Pulse Scalability rocks! - extract Pulse data repository? HOT 1
- Change logo for the dark theme HOT 1
- Integrate Pulse into Nova? HOT 1
- TypeError in `Pulse::rememberUser()` (Logout Event) HOT 1
- 500 Server Error displaying HOT 1
- UI issue (supports-scrollbars:pr-3) HOT 1
- Unexpected Alpine.js Errors in Laravel Pulse Dashboard HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pulse.