Skip to content

Elasticsearch6 generation does not exist #21916

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

Closed
wclshashank opened this issue Mar 25, 2019 · 52 comments
Closed

Elasticsearch6 generation does not exist #21916

wclshashank opened this issue Mar 25, 2019 · 52 comments
Assignees
Labels
Component: Elasticsearch Fixed in 2.3.x The issue has been fixed in 2.3 release line Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development Reproduced on 2.3.x The issue has been reproduced on latest 2.3 release

Comments

@wclshashank
Copy link

wclshashank commented Mar 25, 2019

Preconditions (*)

  1. Getting issue while upgrade magento 2.3 to Magento 2.3.1
  2. Using Php 7.1.27 version on ubuntu OS

Steps to reproduce (*)

  1. After upgrade magento version getting issue on di:compile like

Source class "\Magento\Elasticsearch6\Model\Adapter\FieldMapper\ProductField" for "Magento\Elasticsearch6\Model\Adapter\FieldMapper\ProductFieldMapper" generation does not exist.

  1. I have checked class manually, it doesn't exist.

Expected result (*)

  1. Issue doesn't appear di compile need to work properly.

Actual result (*)

  1. image
  2. Please help us to resolve this issue.
@magento-engcom-team
Copy link
Contributor

Hi @wclshashank. Thank you for your report.
To help us process this issue please make sure that you provided the following information:

  • Summary of the issue
  • Information on your environment
  • Steps to reproduce
  • Expected and actual results

Please make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, please, add a comment to the issue:

@magento-engcom-team give me 2.3-develop instance - upcoming 2.3.x release

For more details, please, review the Magento Contributor Assistant documentation.

@wclshashank do you confirm that you was able to reproduce the issue on vanilla Magento instance following steps to reproduce?

  • yes
  • no

@magento-engcom-team magento-engcom-team added the Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed label Mar 25, 2019
@ghost ghost self-assigned this Mar 25, 2019
@magento-engcom-team
Copy link
Contributor

Hi @engcom-backlog-nazar. Thank you for working on this issue.
In order to make sure that issue has enough information and ready for development, please read and check the following instruction: 👇

  • 1. Verify that issue has all the required information. (Preconditions, Steps to reproduce, Expected result, Actual result).

    DetailsIf the issue has a valid description, the label Issue: Format is valid will be added to the issue automatically. Please, edit issue description if needed, until label Issue: Format is valid appears.

  • 2. Verify that issue has a meaningful description and provides enough information to reproduce the issue. If the report is valid, add Issue: Clear Description label to the issue by yourself.

  • 3. Add Component: XXXXX label(s) to the ticket, indicating the components it may be related to.

  • 4. Verify that the issue is reproducible on 2.3-develop branch

    Details- Add the comment @magento-engcom-team give me 2.3-develop instance to deploy test instance on Magento infrastructure.
    - If the issue is reproducible on 2.3-develop branch, please, add the label Reproduced on 2.3.x.
    - If the issue is not reproducible, add your comment that issue is not reproducible and close the issue and stop verification process here!

  • 5. Verify that the issue is reproducible on 2.2-develop branch.

    Details- Add the comment @magento-engcom-team give me 2.2-develop instance to deploy test instance on Magento infrastructure.
    - If the issue is reproducible on 2.2-develop branch, please add the label Reproduced on 2.2.x

  • Next steps are available in case you are a member of Community Maintainers.

  • 6. Add label Issue: Confirmed once verification is complete.

  • 7. Make sure that automatic system confirms that report has been added to the backlog.

@ghost
Copy link

ghost commented Mar 25, 2019

Hi @wclshashank the 2.3.1 release will be 26 how can you upgrade ?

@wclshashank
Copy link
Author

HI @engcom-backlog-nazar ,

Ok got it, I didn't check the release date and try to upgrade magneto2 version.

Thanks.

@ghost
Copy link

ghost commented Mar 25, 2019

@wclshashank i'm closing this as magento 2.3.0 do not have Elasticsearch 6 module only develop branch. and on 2.3-develop have no this issue.
DeepinScreenshot_select-area_20190325094955

@ghost ghost closed this as completed Mar 25, 2019
@juharintanen
Copy link

Updated to 2.3.1 now and same error still appears.
Only way around it was to disable Magento_Elasticsearch6 module

That file indeed did not exist

@ghost
Copy link

ghost commented Mar 27, 2019

hi @juharintanen i'm will recheck.

@wclshashank
Copy link
Author

Hi,

I have this issue due to Amasty module. Amasty module using elasticsearch, which is making issue in compiling.
So i have disable module bin/magento module:disable Amasty_Shopby Amasty_ShopbyPage Amasty_ShopbyBrand
and starts working.

Need to update Amasty module.

Thanks

@juharintanen
Copy link

Hi,

I have this issue due to Amasty module. Amasty module using elasticsearch, which is making issue in compiling.
So i have disable module bin/magento module:disable Amasty_Shopby Amasty_ShopbyPage Amasty_ShopbyBrand
and starts working.

Need to update Amasty module.

Thanks

Yep confirmed!
It wasn't that but another Amasty module. Error msg just didn't hint that way at all but good to know.

@ghost
Copy link

ghost commented Mar 27, 2019

@wclshashank found internal ticket where this was fixed, wait a little bit i'm share with pr.

@fabio-fafle
Copy link

Hi,
from my understanding if you have a plugin on Magento\Elasticsearch\Elasticsearch5\Model\Adapter\FieldMapper\ProductFieldMapper the virtual type Magento\Elasticsearch6\Model\Adapter\FieldMapper\ProductFieldMapper will inherit it and this cause the issue on method
Magento\Setup\Module\Di\Code\Generator\InterceptionConfigurationBuilder::filterNullInheritance
if ($plugins === null || !$this->typeReader->isConcrete($instance)).

It looks like a bug to me.

@csdougliss
Copy link
Contributor

csdougliss commented Mar 27, 2019

I have the same issue on 2.3.1:

Source class "\Magento\Elasticsearch6\Model\Adapter\FieldMapper\ProductField" for "Magento\Elasticsearch6\Model\Adapter\FieldMapper\ProductFieldMapper" generation does not exist.

Does this require a fix from Magento or from Amasty?

@engcom-backlog-nazar please share the PR

@bahramdavoodi
Copy link

Hi @craigcarnell,

I have the same error after run di:compile. if you have Extension Amasty Layered Navigation, you can to try to disable extension Amasty_Shopby and run di:compile.

I hope it helps you.
Thanks

@csdougliss csdougliss reopened this Mar 28, 2019
@ghost ghost removed their assignment Mar 28, 2019
@ghost
Copy link

ghost commented Mar 28, 2019

Hi @craigcarnell why reopen ?

@csdougliss
Copy link
Contributor

@engcom-backlog-nazar Because a fix has not been provided by Magento

@csdougliss
Copy link
Contributor

@engcom-backlog-nazar Do you have the PR you mentioned? I need this ASAP please

@ghost
Copy link

ghost commented Mar 28, 2019

@csdougliss
Copy link
Contributor

@engcom-backlog-nazar Slightly confused, as you offered a fix above. Will create a ticket with Magento "Gold" support..

@hostep
Copy link
Contributor

hostep commented Mar 28, 2019

@engcom-backlog-nazar: can you please link to open sourced repo's please? It would be very interesting to see this fix as other tickets are being created which are probably caused by the same issue.

Just link to commits in this repo if they have already been merged, that would be very much appreciated!

@wclshashank
Copy link
Author

Hi @engcom-backlog-nazar ,

Is there any update?

@adamrandazzo
Copy link

I can confirm that this seems to be caused by a conflict with the Amasty_ShopBy plugin. I can get it to compile if I disable Amasty_ShopBy OR Magento_Elasticsearch6.

@ghost
Copy link

ghost commented Mar 28, 2019

@adamrandazzo so to have this issue we need just add a plugin to ElasticSearch 6 ? can you show where plugin defined ?

@davoc
Copy link

davoc commented Mar 28, 2019

Same issue when upgrading from 2.3.0 to 2.3.1 and same solution here - disable Amasty_Shopby and setup:di:compile completes without error

@magento-engcom-team magento-engcom-team removed the Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed label Mar 29, 2019
@phoenix128 phoenix128 added the Reproduced on 2.3.x The issue has been reproduced on latest 2.3 release label Mar 29, 2019
@phoenix128
Copy link
Contributor

I was able to reproduce and it is a general issue related to virtual types with names ending with any autogenerated suffix being pluginized on concrete class.

@Zyles
Copy link

Zyles commented Apr 2, 2019

Same problem. Not using Amasty_ShopBy ...

@hostep
Copy link
Contributor

hostep commented Apr 2, 2019

Interesting tidbit: if I copy the Elasticsearch6 module into a Magento 2.3.0 installation with the unpatched Amasty module, the same problem occurs. So this is no new bug in 2.3.1.

I also can confirm what @phoenix128 figured out, in that certain names of virtual types can not be used, if they end on for example Mapper or Logger or something like that. Then that last part gets stripped of. This happens over here.
Has this always been the case? Is this expected? Is this documented somewhere?

The WIP fix unfortunately doesn't seem to resolve the problem in my testing.

@maghamed: have you guys already found more info about this problem?

@akosglue
Copy link

akosglue commented Apr 3, 2019

I got the same error on 2.3.1.
Catalog Search indexer process unknown error: Source class "\Magento\Elasticsearch6\Model\Adapter\FieldMapper\ProductField" for "Magento\Elasticsearch6\Model\Adapter\FieldMapper\ProductFieldMapper" generation does not exist.
After disabling all Amasty extensions the error disappeared.

@bijalbhavsar
Copy link

This error occurs after upgrading 2.3.1 and it is bug in Magento 2.3.1. If we see https://github.com/magento/magento2/blob/2.3-develop/app/code/Magento/Elasticsearch6/etc/di.xml it is showing below code:

<type name="Magento\Elasticsearch\Elasticsearch5\Model\Adapter\FieldMapper\ProductFieldMapperProxy"> <arguments> <argument name="productFieldMappers" xsi:type="array"> <item name="elasticsearch6" xsi:type="object">Magento\Elasticsearch6\Model\Adapter\FieldMapper\ProductFieldMapper</item> </argument> </arguments> </type>

In above code it states "Magento\Elasticsearch6\Model\Adapter\FieldMapper\ProductFieldMapper" as a argument for productFieldMappers and no such model class file exists.

Review below file path to verify it: https://github.com/magento/magento2/tree/2.3-develop/app/code/Magento/Elasticsearch6/Model/Adapter/FieldMapper

To fix this issue, either we have to remove this code snippet or create a class file for the same.

As per me, It is Magento issue and not relevant to Amasty.

@hostep
Copy link
Contributor

hostep commented Apr 4, 2019

@bijalbhavsar : Magento\Elasticsearch6\Model\Adapter\FieldMapper\ProductFieldMapper exists as a virtual type, see: https://github.com/magento/magento2/blob/2.3.1/app/code/Magento/Elasticsearch6/etc/di.xml#L158

@phoenix128
Copy link
Contributor

phoenix128 commented Apr 8, 2019

My PR (https://github.com/magento/magento2/pull/22046/files) is in WIP status, but I am almost there to fix it. Seems like the issue is divided in two different aspects and now I fixed just one of them. More precisely I just fixed it in the developer mode. Need to fix in production mode.

phoenix128 added a commit to phoenix128/magento2 that referenced this issue Apr 8, 2019
Magento was not checking concrete class while applying plugins, this commit prevents virtual types to be autogenerated
@phoenix128
Copy link
Contributor

phoenix128 commented Apr 8, 2019

Update:
I just finalized it. Pull request #22046 seems to fix the issue.

@sdzhepa sdzhepa added the Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed label Apr 9, 2019
@magento-engcom-team
Copy link
Contributor

@sdzhepa Thank you for verifying the issue.

Unfortunately, not enough information was provided to acknowledge ticket. Please consider adding the following:

  • Add "Component: " label(s) to this ticket based on verification result. If uncertain, you may follow the best guess

Once all required information is added, please add label "Issue: Confirmed" again.
Thanks!

@magento-engcom-team magento-engcom-team removed the Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed label Apr 9, 2019
@sdzhepa sdzhepa added Component: Elasticsearch Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed labels Apr 9, 2019
@magento-engcom-team
Copy link
Contributor

✅ Confirmed by @sdzhepa
Thank you for verifying the issue. Based on the provided information internal tickets MAGETWO-99115 were created

Issue Available: @sdzhepa, You will be automatically unassigned. Contributors/Maintainers can claim this issue to continue. To reclaim and continue work, reassign the ticket to yourself.

@magento-engcom-team magento-engcom-team added the Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development label Apr 9, 2019
@ghost ghost removed the Progress: needs update label Apr 12, 2019
@magento-engcom-team
Copy link
Contributor

Hi @wclshashank. Thank you for your report.
The issue has been fixed in #22046 by @phoenix128 in 2.3-develop branch
Related commit(s):

The fix will be available with the upcoming 2.3.2 release.

@magento-engcom-team magento-engcom-team added the Fixed in 2.3.x The issue has been fixed in 2.3 release line label Apr 15, 2019
magento-engcom-team added a commit that referenced this issue Apr 15, 2019
…oes not exist #22046

 - Merge Pull Request #22046 from phoenix128/magento2:issue-21916-elasticsearch6-generation-does-not-exist
 - Merged commits:
   1. fa079c9
   2. 75684ca
   3. b8ab61b
   4. 6d87330
unicoder88 added a commit to ConvertGroupsAS/magento2-patches that referenced this issue May 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Elasticsearch Fixed in 2.3.x The issue has been fixed in 2.3 release line Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development Reproduced on 2.3.x The issue has been reproduced on latest 2.3 release
Projects
None yet
Development

No branches or pull requests