magespecialist/m2-MSP_TwoFactorAuth

Breaks in 2.1.7

peterjaap opened this issue · 3 comments

The image doesn't show;

image

When rightclicking the image and visiting the URL (http://elgentos.clientname.magento2.dev/admin_dfi38d/msp_twofactorauth/activate/qrcode/key/695c4ae02ae6c687e98af33c3853921971a86f6640360b0316786b23f521d880/) I get:

( ! ) Fatal error: Uncaught TypeError: Argument 1 passed to Endroid\QrCode\Writer\PngWriter::writeString() must implement interface Endroid\QrCode\QrCodeInterface, none given, called in /data/elgentos/clientname/vendor/msp/twofactorauth/Model/Tfa.php on line 211 and defined in /data/elgentos/clientname/vendor/endroid/qrcode/src/Writer/PngWriter.php on line 27
( ! ) TypeError: Argument 1 passed to Endroid\QrCode\Writer\PngWriter::writeString() must implement interface Endroid\QrCode\QrCodeInterface, none given, called in /data/elgentos/clientname/vendor/msp/twofactorauth/Model/Tfa.php on line 211 in /data/elgentos/clientname/vendor/endroid/qrcode/src/Writer/PngWriter.php on line 27

Call Stack
#	Time	Memory	Function	Location
1	0.0002	400984	{main}( )	.../index.php:0
2	0.1174	7500800	Magento\Framework\App\Bootstrap->run( )	.../index.php:37
3	0.1180	7548280	Magento\Framework\App\Http\Interceptor->launch( )	.../Bootstrap.php:258
4	0.1196	7856544	Magento\Framework\App\Http\Interceptor->___callPlugins( )	.../Interceptor.php:26
5	0.1472	9315152	MSP\AdminRestriction\Plugin\AppInterfacePlugin->aroundLaunch( )	.../Interceptor.php:142
6	0.1476	9317408	Magento\Framework\App\Http\Interceptor->Magento\Framework\Interception\{closure}( )	.../AppInterfacePlugin.php:105
7	0.1476	9317464	Magento\Framework\Interception\Chain\Chain->invokeNext( )	.../Interceptor.php:138
8	0.1476	9317496	Magento\Framework\App\Http\Interceptor->___callParent( )	.../Chain.php:70
9	0.1476	9317496	Magento\Framework\App\Http->launch( )	.../Interceptor.php:74
10	0.2192	13596152	Magento\Framework\App\FrontController\Interceptor->dispatch( )	.../Http.php:135
11	0.2212	13558320	Magento\Framework\App\FrontController\Interceptor->___callPlugins( )	.../Interceptor.php:26
12	0.2367	14579752	Magento\Framework\Module\Plugin\DbStatusValidator->aroundDispatch( )	.../Interceptor.php:142
13	0.2368	14579800	Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception\{closure}( )	.../DbStatusValidator.php:69
14	0.2369	14580176	Magento\Framework\Interception\Chain\Chain->invokeNext( )	.../Interceptor.php:138
15	0.2371	14581440	Magento\Framework\App\FrontController\Interceptor->___callParent( )	.../Chain.php:70
16	0.2371	14581440	Magento\Framework\App\FrontController->dispatch( )	.../Interceptor.php:74
17	0.3726	22371512	MSP\TwoFactorAuth\Controller\Adminhtml\Activate\Qrcode\Interceptor->dispatch( )	.../FrontController.php:55
18	0.3746	22456256	MSP\TwoFactorAuth\Controller\Adminhtml\Activate\Qrcode\Interceptor->___callPlugins( )	.../Interceptor.php:39
19	0.5621	27568648	Magento\Backend\App\Action\Plugin\MassactionKey->aroundDispatch( )	.../Interceptor.php:142
20	0.5621	27568648	MSP\TwoFactorAuth\Controller\Adminhtml\Activate\Qrcode\Interceptor->Magento\Framework\Interception\{closure}( )	.../MassactionKey.php:33
21	0.5621	27569024	Magento\Framework\Interception\Chain\Chain->invokeNext( )	.../Interceptor.php:138
22	0.5688	27811320	Magento\Backend\App\Action\Plugin\Authentication->aroundDispatch( )	.../Chain.php:67
23	0.5912	27966944	Magento\Framework\Interception\Chain\Chain->Magento\Framework\Interception\Chain\{closure}( )	.../Authentication.php:143
24	0.5913	27967320	Magento\Framework\Interception\Chain\Chain->invokeNext( )	.../Chain.php:63
25	0.5913	27967360	MSP\TwoFactorAuth\Controller\Adminhtml\Activate\Qrcode\Interceptor->___callParent( )	.../Chain.php:70
26	0.5913	27967360	Magento\Backend\App\AbstractAction->dispatch( )	.../Interceptor.php:74
27	0.5953	27969656	Magento\Framework\App\Action\Action->dispatch( )	.../AbstractAction.php:226
28	0.6069	28185792	MSP\TwoFactorAuth\Controller\Adminhtml\Activate\Qrcode\Interceptor->execute( )	.../Action.php:102
29	0.6069	28185792	MSP\TwoFactorAuth\Controller\Adminhtml\Activate\Qrcode->execute( )	.../Interceptor.php:24
30	0.6069	28185792	MSP\TwoFactorAuth\Model\Tfa->getQrCodeAsPng( )	.../Qrcode.php:53
31	0.6175	28840656	Endroid\QrCode\Writer\PngWriter->writeString( )	.../Tfa.php:211

See PR #5

Sorry for our delay. This issue is confirmed, not only in 2.1.7 . There is a difference between qrcode library 2.1.4 and 2.2.2 . We are adjusting the composer file.

Thank you for your Merge Request, it fixed this issue.