Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error with webhook: main.CRITICAL: Exception: Deprecated Functionality: strpos() #35

Open
GautierDig opened this issue Nov 2, 2023 · 7 comments

Comments

@GautierDig
Copy link

GautierDig commented Nov 2, 2023

We are having this error triggered by webhooks:

main.CRITICAL: Exception: Deprecated Functionality: strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated in /vendor/wallee/magento-2/Model/Webhook/Listener/AbstractOrderRelatedCommand.php on line 34

It is called by \Wallee\Payment\Model\Webhook\Listener\TransactionInvoice\CaptureCommand::execute in vendor/wallee/magento-2/Model/Webhook/Listener/TransactionInvoice/CaptureCommand.php:60

@theodorspringwallee
Copy link
Contributor

Dear GautierDig

We will check this.

Best regards

@theodorspringwallee
Copy link
Contributor

Dear GautierDig

About your error message, after triggering the webhooks:

It is called by \Wallee\Payment\Model\Webhook\Listener\TransactionInvoice\CaptureCommand::execute in vendor/wallee/magento-2/Model/Webhook/Listener/TransactionInvoice/CaptureCommand.php:60

Are I right, you got this error log, after capturing a transaction within the wallee portal?

Thanks for your feedback.

Best regards

@GautierDig
Copy link
Author

GautierDig commented Nov 6, 2023 via email

@theodorspringwallee
Copy link
Contributor

Dear GautierDig

Our developers can't reproduce your issue.

Are you using our newest plugin version?

Furthermore, please can you send us a reproduction video here or to [email protected]?

Many thanks

@norgeindian
Copy link

We shortly tested version 2.1.6 on our live system and were on version 1.3.21 before.
No payment could be made anymore and our logs were full of the following callstack:

[2023-11-06T13:43:55.230656+00:00] .ERROR: Deprecated Functionality: strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated in /var/www/share/example.url/releases/318/vendor/wallee/magento-2/Model/Webhook/Listener/AbstractOrderRelatedCommand.php on line 34 [] []
[2023-11-06T13:43:55.231232+00:00] .CRITICAL: Exception: Deprecated Functionality: strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated in /var/www/share/example.url/releases/318/vendor/wallee/magento-2/Model/Webhook/Listener/AbstractOrderRelatedCommand.php on line 34 in /var/www/share/example.url/releases/318/vendor/magento/framework/App/ErrorHandler.php:62
Stack trace:
#0 /var/www/share/example.url/releases/318/vendor/sentry/sentry/src/ErrorHandler.php(305): Magento\Framework\App\ErrorHandler->handler(8192, 'strpos(): Passi...', '/var/www/share/...', 34, Array)
#1 [internal function]: Sentry\ErrorHandler->handleError(8192, 'strpos(): Passi...', '/var/www/share/...', 34)
#2 /var/www/share/example.url/releases/318/vendor/wallee/magento-2/Model/Webhook/Listener/AbstractOrderRelatedCommand.php(34): strpos(NULL, '14014_157343040')
#3 /var/www/share/example.url/releases/318/vendor/wallee/magento-2/Model/Webhook/Listener/TransactionInvoice/CaptureCommand.php(60): Wallee\Payment\Model\Webhook\Listener\AbstractOrderRelatedCommand->getInvoiceForTransaction(Object(Wallee\Sdk\Model\Transaction), Object(Magento\Sales\Model\Order\Interceptor))
#4 /var/www/share/example.url/releases/318/vendor/wallee/magento-2/Model/Webhook/Listener/AbstractOrderRelatedListener.php(197): Wallee\Payment\Model\Webhook\Listener\TransactionInvoice\CaptureCommand->execute(Object(Wallee\Sdk\Model\TransactionInvoice), Object(Magento\Sales\Model\Order\Interceptor))
#5 /var/www/share/example.url/releases/318/vendor/wallee/magento-2/Model/Webhook/Listener/AbstractOrderRelatedListener.php(101): Wallee\Payment\Model\Webhook\Listener\AbstractOrderRelatedListener->process(Object(Wallee\Sdk\Model\TransactionInvoice), Object(Magento\Sales\Model\Order\Interceptor))
#6 /var/www/share/example.url/releases/318/vendor/wallee/magento-2/Model/Service/WebhookService.php(110): Wallee\Payment\Model\Webhook\Listener\AbstractOrderRelatedListener->execute(Object(Wallee\Payment\Model\Webhook\Request))
#7 /var/www/share/example.url/releases/318/vendor/wallee/magento-2/Controller/Webhook/Index.php(49): Wallee\Payment\Model\Service\WebhookService->execute(Object(Wallee\Payment\Model\Webhook\Request))
#8 /var/www/share/example.url/releases/318/generated/code/Wallee/Payment/Controller/Webhook/Index/Interceptor.php(123): Wallee\Payment\Controller\Webhook\Index->execute()
#9 /var/www/share/example.url/releases/318/vendor/magento/framework/App/Action/Action.php(111): Wallee\Payment\Controller\Webhook\Index\Interceptor->execute()
#10 /var/www/share/example.url/releases/318/generated/code/Wallee/Payment/Controller/Webhook/Index/Interceptor.php(151): Magento\Framework\App\Action\Action->dispatch(Object(Magento\Framework\App\Request\Http))
#11 /var/www/share/example.url/releases/318/vendor/magento/framework/App/FrontController.php(245): Wallee\Payment\Controller\Webhook\Index\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http))
#12 /var/www/share/example.url/releases/318/vendor/magento/framework/App/FrontController.php(212): Magento\Framework\App\FrontController->getActionResponse(Object(Wallee\Payment\Controller\Webhook\Index\Interceptor), Object(Magento\Framework\App\Request\Http))
#13 /var/www/share/example.url/releases/318/vendor/magento/framework/App/FrontController.php(147): Magento\Framework\App\FrontController->processRequest(Object(Magento\Framework\App\Request\Http), Object(Wallee\Payment\Controller\Webhook\Index\Interceptor))
#14 /var/www/share/example.url/releases/318/generated/code/Magento/Framework/App/FrontController/Interceptor.php(131): Magento\Framework\App\FrontController->dispatch(Object(Magento\Framework\App\Request\Http))
#15 /var/www/share/example.url/releases/318/vendor/magento/module-store/App/FrontController/Plugin/RequestPreprocessor.php(99): Magento\Framework\App\FrontController\Interceptor->Magento\Framework\App\FrontController\{closure}(Object(Magento\Framework\App\Request\Http))
#16 /var/www/share/example.url/releases/318/generated/code/Magento/Framework/App/FrontController/Interceptor.php(132): Magento\Store\App\FrontController\Plugin\RequestPreprocessor->aroundDispatch(Object(Magento\Framework\App\FrontController\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))
#17 /var/www/share/example.url/releases/318/vendor/magento/module-page-cache/Model/App/FrontController/BuiltinPlugin.php(71): Magento\Framework\App\FrontController\Interceptor->Magento\Framework\App\FrontController\{closure}(Object(Magento\Framework\App\Request\Http))
#18 /var/www/share/example.url/releases/318/generated/code/Magento/Framework/App/FrontController/Interceptor.php(135): Magento\PageCache\Model\App\FrontController\BuiltinPlugin->aroundDispatch(Object(Magento\Framework\App\FrontController\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))
#19 /var/www/share/example.url/releases/318/vendor/magento/framework/App/Http.php(116): Magento\Framework\App\FrontController\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http))
#20 /var/www/share/example.url/releases/318/generated/code/Magento/Framework/App/Http/Interceptor.php(50): Magento\Framework\App\Http->launch()
#21 /var/www/share/example.url/releases/318/vendor/justbetter/magento2-sentry/Plugin/GlobalExceptionCatcher.php(89): Magento\Framework\App\Http\Interceptor->Magento\Framework\App\Http\{closure}()
#22 /var/www/share/example.url/releases/318/generated/code/Magento/Framework/App/Http/Interceptor.php(51): JustBetter\Sentry\Plugin\GlobalExceptionCatcher->aroundLaunch(Object(Magento\Framework\App\Http\Interceptor), Object(Closure))
#23 /var/www/share/example.url/releases/318/vendor/magento/framework/App/Bootstrap.php(264): Magento\Framework\App\Http\Interceptor->launch()
#24 /var/www/share/example.url/releases/318/pub/index.php(30): Magento\Framework\App\Bootstrap->run(Object(Magento\Framework\App\Http\Interceptor))
#25 {main} {"report_id":"1af49343099da839886b315441fcbbec3b877caa81c9c7b42c03f26afb0cdbfb"} []

So we were actually having similar issues here.
Any idea, where this might come from?

@theodorspringwallee
Copy link
Contributor

Dear norgeindian

We have difficulties with the reproduction of this issue.

Please can you open a ticket on [email protected], that we can check this issue on your shop instance?

Best regards

@norgeindian
Copy link

@theodorspringwallee, I already did. Please take a look at ticket #260078

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants