I try to activate GraphQL Support on symfony api-platform, but when i visit folloing route, i got error:
/api/graphql
the error message is:
Attempted to load class "Debug" from namespace "GraphQL\Error".
Did you forget a "use" statement for e.g. "Symfony\Component\ErrorHandler\Debug" or "Doctrine\Common\Util\Debug"?
GraphQL renamed "Debug" to "DebugFlag"
v14.0.0
BREAKING: Renamed GraphQL\Error\Debug to GraphQL\Error\DebugFlag.
Modify Core /vendor/api-platform/core/src/GraphQl/Action/EntrypointAction.php to:
...
use GraphQL\Error\DebugFlag as Debug;
...
Currently the error is not bug fixed:
https://github.com/api-platform/core/blob/master/src/GraphQl/Action/EntrypointAction.php
It's only a quick and durty fix!
I was migrating from Laravel 7 to 8 and got the same issue.
Now there is debug param in config/lighthouse.php, you can change the class from \GraphQL\Error\Debug to \GraphQL\Error\DebugFlag and it should fix the issue.
'debug' => \GraphQL\Error\DebugFlag::INCLUDE_DEBUG_MESSAGE | \GraphQL\Error\DebugFlag::INCLUDE_TRACE,
Just in case someone is looking for a solution now and doesn't want a dirty fix.
Related
I'm getting following error in my Angular Meteor project:
TypeError [ERR_INVALID_ARG_VALUE] [ERR_INVALID_ARG_VALUE]: The argument 'path' must be a string or Uint8Array without null bytes. Received '\u0000commonjs-proxy:/builds/intemp/in-pool/node_modules/core-js/internals/package.json'
at readFile (fs.js:295:10)
at go$readFile (/home/meteor/.meteor/packages/meteor-tool/.1.9.0.1mtsmz6.qnno++os.linux.x86_64+web.browser+web.browser.legacy+web.cordova/mt-os.linux.x86_64/dev_bundle/lib/node_modules/npm/node_modules/graceful-fs/graceful-fs.js:110:14)
at Object.readFile (/home/meteor/.meteor/packages/meteor-tool/.1.9.0.1mtsmz6.qnno++os.linux.x86_64+web.browser+web.browser.legacy+web.cordova/mt-os.linux.x86_64/dev_bundle/lib/node_modules/npm/node_modules/graceful-fs/graceful-fs.js:107:12)
at next (/home/meteor/.meteor/packages/mibto_angular-compilers/.0.3.4.1i9jtu1.vtaoi++os+web.browser+web.browser.legacy+web.cordova/plugin.Angular_Compilers.os/npm/node_modules/meteor/angular-typescript-compiler/node_modules/browser-resolve/index.js:98:12)
at load_shims (/home/meteor/.meteor/packages/mibto_angular-compilers/.0.3.4.1i9jtu1.vtaoi++os+web.browser+web.browser.legacy+web.cordova/plugin.Angular_Compilers.os/npm/node_modules/meteor/angular-typescript-compiler/node_modules/browser-resolve/index.js:116:7)
at resolve (/home/meteor/.meteor/packages/mibto_angular-compilers/.0.3.4.1i9jtu1.vtaoi++os+web.browser+web.browser.legacy+web.cordova/plugin.Angular_Compilers.os/npm/node_modules/meteor/angular-typescript-compiler/node_modules/browser-resolve/index.js:236:5)
at /home/meteor/.meteor/packages/mibto_angular-compilers/.0.3.4.1i9jtu1.vtaoi++os+web.browser+web.browser.legacy+web.cordova/plugin.Angular_Compilers.os/npm/node_modules/meteor/angular-typescript-compiler/node_modules/rollup-plugin-node-resolve/dist/rollup-plugin-node-resolve.cjs.js:66:5
at new Promise (<anonymous>)
at Object.resolveId$1 [as resolveId] (/home/meteor/.meteor/packages/mibto_angular-compilers/.0.3.4.1i9jtu1.vtaoi++os+web.browser+web.browser.legacy+web.cordova/plugin.Angular_Compilers.os/npm/node_modules/meteor/angular-typescript-compiler/node_modules/rollup-plugin-node-resolve/dist/rollup-plugin-node-resolve.cjs.js:63:11)
at resolveId (packages/angular-typescript-compiler/rollup.js:52:26)
at /home/meteor/.meteor/packages/mibto_angular-compilers/.0.3.4.1i9jtu1.vtaoi++os+web.browser+web.browser.legacy+web.cordova/plugin.Angular_Compilers.os/npm/node_modules/meteor/angular-typescript-compiler/node_modules/rollup/src/utils/first.js:8:31
at /home/meteor/.meteor/packages/meteor-tool/.1.9.0.1mtsmz6.qnno++os.linux.x86_64+web.browser+web.browser.legacy+web.cordova/mt-os.linux.x86_64/dev_bundle/lib/node_modules/meteor-promise/fiber_pool.js:43:40 {
code: 'ERR_INVALID_ARG_VALUE'
}
I'm running following command to build:
METEOR_DISABLE_OPTIMISTIC_CACHING=1 ROLLUP=1 AOT=1 BABEL_CACHE_DIR=/tmp meteor build ../output
without rollup it works, and it also worked before Meteor 1.9
Does anyone have any ideas how to resolve this?
I don’t think rollup=1 has ever worked properly in the angular-meteor compilers. I vaguely remember ardatan mentioning it in a github issue but can’t locate the exact one. The documentation still states it as an option but I think you should forget about it unless you want to fix the specific compiler issue.
Meteor 1.9 is a big upgrade as it uses node 12 so I would not be surprised if this has introduced an issue in the angular compilers package. It probably needs a few tweaks to bring it up to date.
As far as i can tell, i can't see any other questions that ask this, so here goes:
I've been running the latest Symfony, for a side project, and encountered this error as i was writing the app. Nothing i do now fixes it, not even re-installing symfony, and i have no idea what the problem even is. I am getting the error:
The parameter "doctrine_migrations.dir_name" has a dependency on a
non-existent parameter "kernel.root_dir". Did you mean one of these:
"kernel.project_dir", "kernel.cache_dir", "kernel.logs_dir"?
It seems that you are using the undefined kernel.root_dir variable in your config/packages/doctrine_migrations.yaml config file.
You should replace it by kernel.project_dir:
# config/packages/doctrine_migrations.yaml
doctrine_migrations:
dir_name: '%kernel.project_dir%/src/Migrations'
See: https://symfony.com/doc/master/bundles/DoctrineMigrationsBundle/index.html#configuration
Just to document the root cause.
Symfony 5 removed kernel.root_dir parameters. Doctrine Migrations Bundle uses it as default value for dir_name.
It's been discussed. See https://github.com/doctrine/DoctrineMigrationsBundle/issues/305 and https://github.com/doctrine/DoctrineMigrationsBundle/pull/295.
SOLUTION: right now (Symfony 5 and Migrations bundle 2.1.x), you should not delete doctrine_migrations.yaml. Leave it there with a dir_name that does not raise en error.
at this point i am assuming it is a symfony bug, so i will close this question. Thanks for everyone's help!
try
composer remove orm
composer require symfony/orm-pack
Today I just updated my project to use kotlin 1.2.50 and after when I started compilation i just get an errors :
\app\build\intermediates\feature_data_binding_base_feature_info\demoDebug\dataBindingExportFeaturePackageIdsDemoDebug\out' specified for property 'annotationProcessorOptionProviders$kotlin_gradle_plugin.$0.$0.baseFeatureInfoDir' does not exist.
\app\build\intermediates\feature_data_binding_base_feature_info\demoDebug\dataBindingExportFeaturePackageIdsDemoDebug\out' specified for property 'databinding.baseFeatureInfoDir' does not exist.
On version 1.2.41 compile well.
Does anyone know what is the issue in this case?
Today update for Android Studio solve the issue.
classpath 'com.android.tools.build:gradle:3.2.0-beta01'
-> classpath 'com.android.tools.build:gradle:3.2.0-beta02'
I am performing migration from Symfony 2.7 to Symfony 3+. Multiple components and dependencies have been updated.
I managed to fix configurations issues regarding firewall setup, forms and some extenstions (services).
Sorting one problem introduced me to another.
Now each time I run php bin/console I get an error:
[Symfony\Component\DependencyInjection\Exception\OutOfBoundsException]
The argument "3" doesn't exist.
I have tried to run it with -v or -vvv option and I only got:
Exception trace:
() at /xx/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Definition.php:242
Symfony\Component\DependencyInjection\Definition->getArgument() at /xx/vendor/sonata-project/core-bundle/DependencyInjection/Compiler/FormFactoryCompilerPass.php:48
Sonata\CoreBundle\DependencyInjection\Compiler\FormFactoryCompilerPass->process() at /xx/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/Compiler.php:139
Symfony\Component\DependencyInjection\Compiler\Compiler->compile() at /xx/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/ContainerBuilder.php:710
Symfony\Component\DependencyInjection\ContainerBuilder->compile() at /xx/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Kernel.php:515
Symfony\Component\HttpKernel\Kernel->initializeContainer() at /xx/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Kernel.php:117
Symfony\Component\HttpKernel\Kernel->boot() at /xx/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Console/Application.php:68
Symfony\Bundle\FrameworkBundle\Console\Application->doRun() at /xx/vendor/symfony/symfony/src/Symfony/Component/Console/Application.php:121
Symfony\Component\Console\Application->run() at /xx/bin/console:28
It looks like the issue with container compliation:
http://symfony.com/doc/current/components/dependency_injection/compilation.html
Some old setup passed validation but it is not consumed properly by DependencyInjection Compiler.
I have fallowing questions:
How I can debug it?
What can cause problem like this?
How to fix it?
Thanks!
We use a .cfg file in ./etc directory to configure our bundle in ServiceMix. Everything worked fine in SMX 4.5.3, but when migrating to the 5th version the file is not picked up. When the bundle encounters a property the following exception is thrown:
java.lang.IllegalArgumentException: Property with key [xslt.dir] not found in properties from text: {{xslt.dir}}, StackTrace: org.apache.camel.RuntimeCamelException: java.lang.IllegalArgumentException: Property with key [xslt.dir] not found in properties from text: {{xslt.dir}}
However, if I put the properties in default-properties section in my blueprint configuration, it works.
Also, the console command config:list actually shows the properties for the bundle in spite of the exception:
Pid: misrouter
BundleLocation: mvn:ru.mig/mis-router/1.0-SNAPSHOT
Properties:
service.pid = misrouter
felix.fileinstall.filename = file:/home/petr/programs/5.0.0-apache-servicemix/etc/misrouter.cfg
xslt.dir = /home/petr/programs/5.0.0-apache-servicemix/xslt
So was something changed in SMX 5 configuration mechanism or is there a bug in it?
What version of the JDK/JRE are you using? When I was trying this out a few minutes ago to answer your question, I also had some problems using the 1.7.0_15 version I had installed and upgrading to the latest 1.7.0_51 fixed those for me.
Actually it's related to Camel vm component, a bug was created for SMX