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

Invalid API key error message #287

Open
kennethbruyninckx opened this issue Nov 20, 2024 · 5 comments · Fixed by #288
Open

Invalid API key error message #287

kennethbruyninckx opened this issue Nov 20, 2024 · 5 comments · Fixed by #288
Assignees
Labels
bug Something isn't working pdk This is a pdk related issue

Comments

@kennethbruyninckx
Copy link

MyParcelNL version

MyParcelBE v4.2.0

PrestaShop version

8.20

PHP version

8.1.30

What went wrong?

Upon install of the module proceed to configure and fill in the API key found in your MyParcel backoffice. & click save.
Error displayed:
"Invalid API key
Please check if you have entered the correct API key."

Exit the module configuration and do something else within Prestashop back office and go back to the module configuration.
You now get to see the message "Connected to MyParcel" and the rest of the setup options/screens.

Now click Edit API ley and press enter in the API key field (the key was copied from backoffice so it should be correct anyway), result: Invalid API key error AND still/also the "Connected to MyParcel".

Now click Debugging and next Manual Update, result: Invalid API key error AND still/also the "Connected to MyParcel".

Reproduction steps

See steps described above

Relevant log output

No response

Additional context

No response

@kennethbruyninckx kennethbruyninckx added bug Something isn't working pdk This is a pdk related issue labels Nov 20, 2024
@github-project-automation github-project-automation bot moved this to Todo in PDK Nov 20, 2024
@kennethbruyninckx
Copy link
Author

Forgot to add this is on a clean install of Prestashop, so no upgrade of a MyParcelBE module on an already functioning PS

@EdieLemoine
Copy link
Contributor

This shouldn't happen of course, but it's only a visual problem, if you refresh the page it should show as being saved correctly.

Could you send us the logs you can download from the debug options in the settings, to [email protected]?

@mjonkers1989
Copy link

Hi,

I have the same problem.
But is not only a visible problem.
I have already send all the details to [email protected]
But the same problem is also for myparcelNL.

@FreekVR
Copy link
Collaborator

FreekVR commented Nov 27, 2024

There was an issue with the migrations in 4.2.0 which appears to be causing breaks in Prestashop since they released 8.2.0. These errors were incorrectly being shown as validation errors for the API key on the module settings page.

We've just released a bugfix in 4.2.1, can you let us know if upgrading to this version fixes the problem?

If it doesn't immediately fix the problem, you could additionally try to clear any prestashop caches and/or uninstall and then install the latest module release.

@FreekVR FreekVR linked a pull request Nov 27, 2024 that will close this issue
@FreekVR FreekVR self-assigned this Nov 27, 2024
@mjonkers1989
Copy link

Hi,

The error still exist.
i have also installed a clean prestashop and the error still exist.
I have also cleaned my local cache.
There is also a second error on 8.2.0.
Below the details of the error.

The installation from module myparcelnl has failed. Error: SQLSTATE[23000]:
Integrity constraint violation: 1062 Duplicate entry '67-962-1' for key
'PRIMARY'

Stack trace:
classes/db/Db.php(377): DbPDOCore->_query()
classes/db/Db.php(744): DbCore->query()
classes/db/Db.php(477): DbCore->q()
classes/Hook.php(615): DbCore->insert()
classes/module/Module.php(1084): HookCore::registerHook()
modules/myparcelnl/src/Service/ModuleService.php(52):
ModuleCore->registerHook()
modules/myparcelnl/vendor/myparcelnl/pdk/src/Base/Facade.php(25):
MyParcelNL\PrestaShop\Service\ModuleService->registerHooks()
modules/myparcelnl/src/Pdk/Installer/Service/PsInstallerService.php(83):
MyParcelNL\Pdk\Base\Facade::__callStatic()
modules/myparcelnl/vendor/myparcelnl/pdk/src/App/Installer/Service/InstallerService.php(52):
MyParcelNL\PrestaShop\Pdk\Installer\Service\PsInstallerService->executeInstallation()
modules/myparcelnl/src/Pdk/Installer/Service/PsInstallerService.php(50):
MyParcelNL\Pdk\App\Installer\Service\InstallerService->install()
modules/myparcelnl/vendor/myparcelnl/pdk/src/Base/Facade.php(25):
MyParcelNL\PrestaShop\Pdk\Installer\Service\PsInstallerService->install()
modules/myparcelnl/myparcelnl.php(116):
MyParcelNL\Pdk\Base\Facade::__callStatic()
modules/myparcelnl/myparcelnl.php(168): MyParcelNL->{closure}()
modules/myparcelnl/myparcelnl.php(115): MyParcelNL->withErrorHandling()
src/Adapter/Module/Module.php(271): MyParcelNL->install()
src/Core/Module/ModuleManager.php(109):
PrestaShop\PrestaShop\Adapter\Module\Module->onInstall()
src/PrestaShopBundle/Controller/Admin/Improve/ModuleController.php(384):
PrestaShop\PrestaShop\Core\Module\ModuleManager->install()
vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpKernel.php(169):
PrestaShopBundle\Controller\Admin\Improve\ModuleController->importModuleAction()
vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpKernel.php(81):
Symfony\Component\HttpKernel\HttpKernel->handleRaw()
vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Kernel.php(201):
Symfony\Component\HttpKernel\HttpKernel->handle()
admin955qybeg8gmqlbiayo8/index.php(84):
Symfony\Component\HttpKernel\Kernel->handle()
{main}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working pdk This is a pdk related issue
Development

Successfully merging a pull request may close this issue.

4 participants