I have written a simple extension for Magento 2 which I want to publish at the Marketplace.
But I am stuck for months to get it through the technical review process. While the CodeSniffer passes, the 2 other tests fail. This is my error message:
Unable to apply patch Magento\InventorySales\Setup\Patch\Schema\InitializeWebsiteDefaultSock for module Magento_InventorySales.
Original exception message: The default website isn't defined. Set the website and try again.
I tested various PHP-Versions in the composer-file, various patches I found on the Internet, and various dependencies. Everything failed. Since this is a black-box I really have no idea.
If somebody has a hint or an idea, please let me know! BTW the source code is free and can be found here: https://gitlab.bounce-experts.com/bounce-experts-plugins/magento-2-bounce-experts-and-recombee-power...
I have some newer versions which should work with Magento 2.3. and 2.4 together, but since the error message in the review has never changed, I have not committed it yet.
Thank you in advantage!
This issue is still unresolved, sadly.
I also started a Thread on stackexchange without any resolution.
And I even started a support ticket. After getting the impression that my ticket wasn't even read before replying with typical phrases, I clarified the issue and asked for technical support or at least some answer related to my description. Since then the support went mute.
So i have a great extension i can't submit for more than 5 months just because of a bug nobody wants to talk about. That is disappointing. Especially since i got asked by other users if the bug is resolved now.
If somebody can help or has a contact to the technical support: this would be really, really great!
The support still hasn't answered. That is very sad.
But I was able to recreate the issue constantly! You can find the description for the issue here: https://gitlab.bounce-experts.com/tocOS/magento-marketplace-bug/-/blob/master/Readme.md
I also offer 250 € to the person fixing this issue!
Thank you very much!
We found the solution in some conversation of Magento's slack.
Please check usages of Magento\Framework\App\State (as well as any other classes that might change or load global state) in your module Console Commands. When Magento build a list of available console commands it creates instances for all command classes so all of their dependencies as well. As a workaround you may pass proxy objects to all of your Console command objects or use Object Manager to instantiate dependencies inside execute method.
Maybe this will help you.
We've got the same error. Thanks to this thread I'd been finally able to at least localise the bug after one month of digging. In our case, there's a command which is injected with Magento\Framework\App\State. Injecting ObjectManager instead and getting State through it didn't make any difference, but using proxies did.
The Magento developers in Slack have kindly helped me to fix this issue and also shared a link to an article that highlights similar issue and fix example.