How can I print the error message on browser where I access my app instead of seeing 'Whoops, looks like something went wrong.' which is not very helpful and is very annoying when I have to go to the storage/logs/lumen.log to find the error?
I am using Laravel's Lumen and it is not as friendly as Slim. Any ideas how can I see the error on screen instead?
Related
I need to know some tips to know the source of errors in Laravel for example sometimes it only shows this message "Whoops, looks like something went wrong" and you don't know the type of error. It must be a trick allowing you to know your error. Thanks
Have you tried to edititing the .env?
APP_NAME=MyApp
APP_ENV=local
APP_KEY= some key
APP_DEBUG=true
APP_LOG_LEVEL=debug
If you turn app debug to true, you should be able to see errors.
We are using Sentry for finding some errors.
How do you proof, that a reporting is working?
I had a Spring-Boot project, which was not sending any error to Sentry, so it looks like it was working without an error, but I saw in Kibana, that there have been errors.
So, my configuration was wrong. After fixing the setup, it's now sending the errors to Sentry too.
Is there any way to proof that the sending to Sentry is working?
Something like on startup of my Spring-Boot application sending a first string?
I found 2 possible solutions which both sucks, so that's why I ask for a more professional way:
I can make just on application start up a log.error("sentry is working")
I can set the log-level from warning / error to info just to see that it's working and if see it in Sentry, you change it back?
But as i mentioned, both methods are not good, so let me know how you are resolving problems like this
are unprofessional to me, so let me know
There isn't a real "answer" here currently, as part of Sentry's simplicity is it doesn't do anything until an error happens. One potential solution is to introduce a path like example.com/500 that deliberately errors.
I'm trying to use FOSJsRoutingBundle in my symfony project.
It works perfectly in production mode, but in the dev mode I've got an error.
The problem is for this script link:
<script src="/lacapa/web/app_dev.php/js/routing?callback=fos.Router.setData"></script>
When I click on the link, I can see an error page which say:
Whoops, looks like something went wrong. Call to a member function
getUser() on null in UserCreatedListener.php
I don't understand why I get that.
The FOSJsRoutingBundle is not compatible with Symfony3+ currently.
I don't seem to be getting the familiar symfony error messages I used to when I wasn't running on a VM. The error message I get when there is a Laravel related issue is a "Whoops, looks like something went wrong" in a white background.
Is there a common solution to this/others run into this problem who can help out?
thanks
You need to turn $debug to true in app/config/app.php
I have an app that I'm creating with CakePHP, which rewrites the url from something illegible to most users to something a little easier to comprehend. I'm having a problem when I use the FBML canvas.
When I try to access, say, http://apps.facebook.com/myapp/articles, I get the following error:
Received HTTP error code 404 while
loading
http://www.myapp.com/myapparticles/
I did notice that when I try to access http://apps.facebook.com/myapp/articles/posts, it changes the error to show the following url, which is slightly different: http://www.myapp.com/myapparticles/posts
Which lead me to try accessing it with this: http://apps.facebook.com/myapp//articles, which does work most of the time, though for some reason sometimes it will give the previous error. (And it also seems like a hack-y way of getting it to work).
I'm at a loss for how to fix this.
Turns out I was missing the trailing slash (http://www.myapp.com/myapp/) on the url that I specified as my canvas callback, which is in the app settings. Putting it there fixes the problem.
This happens when you are not using semantic markup or you have an error or some code not supported by fb. Also that famous error is generated by fb when it is down or slow too.
I would suggest you checking your code thoroughly and going through fb documentation. That should help you the most. thanks