I'm trying the new Symfony 4 and Sentry error tracking.
On dev env, notice and exception are handled the same way with a nice screen thanks to the Debug class.
On prod env, exception triggers the nice error page and a log entry in Sentry.
But notices do not trigger this nice page but the code keeps going after the notice: is there a different handling process in prod env for notice?
Something strange: in prod this notice is reported as an ErrorException exception which means that the notice is turned into exception at some point.
Thank you for your help!
Turning an error into an exception depends on this parameter
https://symfony.com/doc/current/reference/configuration/framework.html#throw which defaults to kernel.debug which is off in prod env.
So you can change this framework.php_errors.throw to true and keep kernel.debug to false in prod env which solved my issue.
Related
I have added a multiple file data type to the product entity and it works fine in prod but throws an error in dev
I tried clearing the cache and again it works OK from Prod but I get the following error in dev:
php bin/console -vvv cache:clear
// Clearing the cache for the dev environment with debug true
// Clearing outdated warmup directory...
// Warming up cache...
In RuntimeReflectionService.php line 76:
[ReflectionException]
Property Oro\Bundle\AttachmentBundle\Entity\FileItem::$product_plan does not exist
Exception trace:
at /var/www/html/commerce/vendor/doctrine/persistence/lib/Doctrine/Persistence/Mapping/RuntimeReflectionService.php:76
ReflectionProperty->__construct() at /var/www/html/commerce/vendor/doctrine/persistence/lib/Doctrine/Persistence/Mapping/RuntimeReflectionService.php:76
Doctrine\Persistence\Mapping\RuntimeReflectionService->getAccessibleProperty() at /var/www/html/commerce/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/ClassMetadataInfo.php:979
I have had a look in the modules mentioned in both above messages and other attributes I created were not present either but not causing any issues.
Any advise would be greatly appreciated.
Thanks
Steve
I've got an app created with create-react-app (with react-router-dom) and deployed with Netlify. Whenever I try and route to a page through a direct (nested) URL, such as 'https://jvcparry.com/products/indie', it fails to load a page and gives the errors
Uncaught SyntaxError: Unexpected token '<' main.e3eaf229.chunk.js:1
However when I navigate the deployed version through links, everything loads fine. I also don't get this error when I'm running the app locally, which I guess means it must be something to do with deployment?
I've trawled through all the other posts I can find with this error, and also things to do with Netlify/CRA deployments. I've got a _redirects file with '/* /index.html 200' in it in my /public folder, and I've tried refactoring my routes to use code-splitting but that's made no difference.
My code is on github here: https://github.com/NatClamp/jvcparry
Deployed version is here: https://jvcparry.com/
and if you go to https://jvcparry.com/products/indie you'll see the error I'm getting.
Can anyone shed any light on this? Thanks in advance
A rigid but working solution is to update _redirects file this way:
/*/main.e3eaf229.chunk.js /main.e3eaf229.chunk.js 200
/* /index.html 200
You can also be updating this file every time you build new js bundle during your CICD run
Running nest start
The module initialization fails silently without error at const app = await NestFactory.create<NestExpressApplication>(AppModule);
This seems to fail after the CqrsModule dependency is initialized. I dont see anything in the logger I have setup, would this be reported anywhere else?
It quits directly after the last line above.
The problem for me was using a newer version of node. Once I switched to the original node version in my project, I started getting errors.
I had the same issue and solved it after realising that I had a service that was calling itself in its constructor.
Once removed, everything started working back as usual.
I'm working on a RoR app with Devise. When I came in to work today and tried to start up my local dev environment, RoR failed when I tried to go to the sign in page:
NameError at /users/sign_in
undefined local variable or method `require_no_authentication' for #<SessionsController:0x########>
It looks like the error is not being raised within the code we wrote, but instead from deep within the Devise gem. I'm guessing that somehow, my dev machine isn't configured right.
Here are some things I've tried to fix the bug:
I ran rake db:migrate and rake db:terraform.
I ran bundle install.
I ran rvm gemset empty and bundle install to reinstall all of my gems.
None of these worked.
In addition, here are a couple more strange things about this error:
None of the other devs at my workplace are having the same error, even though they're on the same codebase.
After trying to figure out the error for a while, I switched to a branch that I haven't updated since before I started getting this bug. Even though it was working before the weekend, that branch now fails with the same error.
Does anybody know anything I could do to try to fix this error? Does it sound like some part of my local configuration is incorrectly set up?
In my project, I had added a file in app/controllers called devise_controller.rb. It looked like this:
class DeviseController < ApplicationController
# Asks Devise how much time is left until the current user is
# automatically logged out, without resetting the logout timer.
def time_until_logout
raise "let's inspect here"
end
end
When I deleted this file, the bug went away.
I filed a bug report about how adding a DeviseController caused RoR/Devise to blow up on Devise's repository: https://github.com/plataformatec/devise/issues/2520
trouble running, cleaning or playing, starting play2.1 app. I can create the app, but then if i try to run, clean, play or start. i get this error
exception when typing play.Project.jdbc
class file needed by PlayReloader is missing.
any thoughts would be appreciated..
turned out to be a permissions issue. the app had lost its executable permission. no clue how it happened