0

We get the following API error on our Magento 2.3.5 store;

The "array" class doesn't exist and the namespace must be specified. Verify and try again.

More info;

<![CDATA[#0 /vendor/magento/module-webapi/Model/Config/ClassReflector.php(103): Magento\Framework\Reflection\TypeProcessor->register('array') #1 /vendor/magento/module-webapi/Model/Config/ClassReflector.php(72): Magento\Webapi\Model\Config\ClassReflector->extractMethodData(Object(Laminas\Code\Reflection\MethodReflection)) #2 /vendor/magento/module-webapi/Model/ServiceMetadata.php(133): Magento\Webapi\Model\Config\ClassReflector->reflectClassMethods('Mollie\\Payment\\...', Array) #3 /vendor/magento/module-webapi/Model/ServiceMetadata.php(166): Magento\Webapi\Model\ServiceMetadata->initServicesMetadata() #4 /vendor/magento/module-webapi/Model/ServiceMetadata.php(189): Magento\Webapi\Model\ServiceMetadata->getServicesConfig() #5 /vendor/magento/module-webapi/Model/Soap/Wsdl/Generator.php(367): Magento\Webapi\Model\ServiceMetadata->getServiceMetadata('iCEShopICECatCo...') #6 /vendor/magento/module-webapi/Model/AbstractSchemaGenerator.php(172): Magento\Webapi\Model\Soap\Wsdl\Generator->getServiceMetadata('iCEShopICECatCo...') #7 /vendor/magento/module-webapi/Model/Soap/Wsdl/Generator.php(375): Magento\Webapi\Model\AbstractSchemaGenerator->getAllowedServicesMetadata(Array) #8 /vendor/magento/module-webapi/Model/AbstractSchemaGenerator.php(107): Magento\Webapi\Model\Soap\Wsdl\Generator->getAllowedServicesMetadata(Array) #9 /vendor/magento/module-webapi/Controller/Soap.php(134): Magento\Webapi\Model\AbstractSchemaGenerator->generate(Array, 'https', 'domain.com', 'domain.com'') #10 /vendor/magento/framework/Interception/Interceptor.php(58): Magento\Webapi\Controller\Soap->dispatch(Object(Magento\Framework\App\Request\Http)) #11 /vendor/magento/framework/Interception/Interceptor.php(138): Magento\Webapi\Controller\Soap\Interceptor->___callParent('dispatch', Array) #12 /vendor/magento/framework/Interception/Interceptor.php(153): Magento\Webapi\Controller\Soap\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Framework\App\Request\Http)) #13 /generated/code/Magento/Webapi/Controller/Soap/Interceptor.php(26): Magento\Webapi\Controller\Soap\Interceptor->___callPlugins('dispatch', Array, Array) #14 /vendor/magento/framework/App/Http.php(116): Magento\Webapi\Controller\Soap\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http)) #15 /vendor/magento/framework/App/Bootstrap.php(261): Magento\Framework\App\Http->launch() #16 /pub/index.php(40): Magento\Framework\App\Bootstrap->run(Object(Magento\Framework\App\Http)) #17 {main}]]>
5
  • 1
    did you tried removing var/cache, view_processed, generated, and then run di:compile, upgrade, and deploy – Pramod Aug 14 '20 at 7:08
  • @Chikku Thanks! Yes we did remove the things, but it seems that the error also occurs on developer mode. – JGeer Aug 14 '20 at 7:12
  • 1
    do you have this line in your code @return array ? – Pramod Aug 14 '20 at 7:16
  • @Chikku Thanks, we solved the issue. Problem was caused by a third party update. Downgraded that module to the single last version and it is working fine again. – JGeer Aug 14 '20 at 7:28
  • glad you make it worked.good day – Pramod Aug 14 '20 at 7:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.