skip to Main Content

I’m currently trying to integrate MAGENTO (Open source ver. 2.4.5) with IBM DB2 LUW.

I have succesfully communicated the framework with the DB2 database, done by changing backend classes (PDO, and ZEND mostly). I have not touched any modules code as of now only changed the config settings in the ENV to fit DB2.

When I’m trying to run the store, or to compile or to upgrade these errors pop:

InvalidArgumentException: Invalid scope type '' in /var/www/html/magento2/vendor/magento/framework/App/ScopeResolverPool.php:43 

enter image description here

I’ve made an investigation over the classes. The reason behind this is that the processed object (which is an INTERCEPTOR) does not have a function called "getScope" so it returns NULL and this is the reason it causes the error. Proof:

enter image description here

Currently this is the stack I’ve made, it paints the processed classes and the scope that /could/ be in said classes (that runs twice, throws a NULL):

https://www.dropbox.com/s/lvr5qcnjcqif7wb/PROBLEMASISTACK3.txt?dl=0

I’m echoing the strings of the classes processed in ObjectManager/Factory/AbstractFactory.php, the last straw appears to be an Interceptor, and it could be related to the config classes and the config data, however I have validated that the data obtained from the database is correct (in Zend/Db/Adapter/Abstract.php) (everything was imported from MySQL and the scopes are all "default", which in MySQL Magento OOTB integration worked):

enter image description here

What could be the issue?

EDIT: I discovered that the interceptors were not being generated correctly, I changed them to the original values and found no difference, I still have the same error:

enter image description here

UPDATE (09/02/2023): I have discovered that the resolution of the scope via the Zend cache comes back to a boolean false.

I am off to find out WHY the cache is incomplete.

enter image description here

2

Answers


  1. The error message you are encountering suggests that there is a problem with the scope type in the ScopeResolverPool class. The issue might be related to the interceptor classes or the configuration data. From your investigation, it seems that the processed object (an interceptor) does not have the "getScope" function, which is why it returns NULL and causes the error. Additionally, you mentioned that the resolution of the scope via the Zend cache comes back as a boolean false, which might indicate that the cache is incomplete.

    Here are a few steps that you could try to resolve this issue:

    1. Check the configuration data in the ENV file and make sure that it is correct and complete.
    2. Verify that the interceptor classes are generated correctly and have the required functions. You mentioned that you changed them back to the original values, but it’s still worth checking to see if there are any other issues.
    3. Debug the Zend cache to see why it is incomplete and try to resolve the issue. You could try flushing the cache, or clearing the cache data to see if that resolves the issue.
    4. Check the ScopeResolverPool class and the related classes to make sure that there are no other issues or bugs that might be causing the problem.
    5. Finally, if none of the above steps resolve the issue, you might consider reaching out to the Magento community for further assistance. There might be others who have encountered similar issues and can offer additional insights or solutions.

    I hope this helps, and good luck with resolving the issue!

    Login or Signup to reply.
  2. The error message "InvalidArgumentException: Invalid scope type ”" in Magento 2 is typically caused by a misconfiguration in the scope settings. It’s possible that the values for scope type and/or code are missing or incorrect in the configuration data. You should check your database and make sure that the scope settings are correctly defined.

    You should also check whether there are any custom modules or third-party extensions that could be interfering with the scope resolution process. It’s possible that some code changes are required to get the scope resolution working correctly. Finally, check the cache settings and clear the cache, as it could be that stale cache data is causing the issue.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search