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

couldn't install latest version using composer #48

Closed
ooples opened this issue Apr 3, 2017 · 38 comments
Closed

couldn't install latest version using composer #48

ooples opened this issue Apr 3, 2017 · 38 comments

Comments

@ooples
Copy link

ooples commented Apr 3, 2017

I tried following the readme instructions for installing by using composer and it failed. Here is what I did

composer_failed

@jwineman
Copy link
Contributor

jwineman commented Apr 3, 2017

Did you the plugin installed previously and you were trying to upgrade it?

@ooples
Copy link
Author

ooples commented Apr 3, 2017 via email

@jwineman
Copy link
Contributor

jwineman commented Apr 3, 2017

If you're upgrading instead of installing I think you want to run:

composer update cloudflare/cloudflare-magento

Does that work?

@ooples
Copy link
Author

ooples commented Apr 3, 2017

When I do that command it says nothing to install or update even though I haven't been able to update yet

@jwineman
Copy link
Contributor

jwineman commented Apr 3, 2017

What is the version of cloudflare/cloudflare-magento in your composer.json?

@ooples
Copy link
Author

ooples commented Apr 3, 2017

It says require "cloudflare/cloudflare-magento": "^1.0"

@jwineman
Copy link
Contributor

jwineman commented Apr 3, 2017

Try this:

  1. Delete that line in your composer.json
  2. Run composer update
  3. Run composer require cloudflare/cloudflare-magento

@ooples
Copy link
Author

ooples commented Apr 3, 2017

I ran those commands and I didn't get any errors but I also don't see cloudflare on my admin section anywhere. Where am I supposed to be looking for the cloudflare section?

@jwineman
Copy link
Contributor

jwineman commented Apr 3, 2017

Did you run bin/magento setup:upgrade after reinstalling with composer?

@ooples
Copy link
Author

ooples commented Apr 3, 2017

Yes and everything looks like it worked but I don't see cloudflare settings anywhere. Where should I be looking?

@jwineman
Copy link
Contributor

jwineman commented Apr 3, 2017

Do you see it under "System" > "Integrations"? If not what if you run:

bin\magento module:enable CloudFlare_Plugin

@ooples
Copy link
Author

ooples commented Apr 3, 2017

This is what happened after I enabled the plugin. Another error :(

[2017-04-03 23:22:58] main.CRITICAL: Exception: Warning: json_decode() expects parameter 1 to be string, object given in /var/www/vhosts/ooples.com/httpdocs/vendor/cloudflare/cloudflare-plugin-backend/src/Integration/DefaultConfig.php on line 14 in /var/www/vhosts/ooples.com/httpdocs/vendor/magento/framework/App/ErrorHandler.php:61
Stack trace:
#0 [internal function]: Magento\Framework\App\ErrorHandler->handler(2, 'json_decode() e...', '/var/www/vhosts...', 14, Array)
#1 /var/www/vhosts/ooples.com/httpdocs/vendor/cloudflare/cloudflare-plugin-backend/src/Integration/DefaultConfig.php(14): json_decode(Object(Magento\Framework\ObjectManager\ObjectManager), true)
#2 /var/www/vhosts/ooples.com/httpdocs/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php(93): CF\Integration\DefaultConfig->construct(Object(Magento\Framework\ObjectManager\ObjectManager))
#3 /var/www/vhosts/ooples.com/httpdocs/vendor/magento/framework/ObjectManager/Factory/Compiled.php(88): Magento\Framework\ObjectManager\Factory\AbstractFactory->createObject('CF\Integration\...', Array)
#4 /var/www/vhosts/ooples.com/httpdocs/vendor/magento/framework/ObjectManager/Factory/Compiled.php(130): Magento\Framework\ObjectManager\Factory\Compiled->create('CF\Integration\...')
#5 /var/www/vhosts/ooples.com/httpdocs/vendor/magento/framework/ObjectManager/Factory/Compiled.php(67): Magento\Framework\ObjectManager\Factory\Compiled->get('CF\Integration\...')
#6 /var/www/vhosts/ooples.com/httpdocs/vendor/magento/framework/ObjectManager/Factory/Compiled.php(130): Magento\Framework\ObjectManager\Factory\Compiled->create('CloudFlare\Plug...')
#7 /var/www/vhosts/ooples.com/httpdocs/vendor/magento/framework/ObjectManager/Factory/Compiled.php(67): Magento\Framework\ObjectManager\Factory\Compiled->get('CloudFlare\Plug...')
#8 /var/www/vhosts/ooples.com/httpdocs/vendor/magento/framework/ObjectManager/Factory/Compiled.php(130): Magento\Framework\ObjectManager\Factory\Compiled->create('CloudFlare\Plug...')
#9 /var/www/vhosts/ooples.com/httpdocs/vendor/magento/framework/ObjectManager/Factory/Compiled.php(67): Magento\Framework\ObjectManager\Factory\Compiled->get('CloudFlare\Plug...')
#10 /var/www/vhosts/ooples.com/httpdocs/vendor/magento/framework/ObjectManager/Factory/Compiled.php(130): Magento\Framework\ObjectManager\Factory\Compiled->create('CloudFlare\Plug...')
#11 /var/www/vhosts/ooples.com/httpdocs/vendor/magento/framework/ObjectManager/Factory/Compiled.php(67): Magento\Framework\ObjectManager\Factory\Compiled->get('CloudFlare\Plug...')
#12 /var/www/vhosts/ooples.com/httpdocs/vendor/magento/framework/ObjectManager/ObjectManager.php(71): Magento\Framework\ObjectManager\Factory\Compiled->create('CloudFlare\Plug...')
#13 /var/www/vhosts/ooples.com/httpdocs/vendor/magento/framework/Event/ObserverFactory.php(33): Magento\Framework\ObjectManager\ObjectManager->get('CloudFlare\Plug...')
#14 /var/www/vhosts/ooples.com/httpdocs/vendor/magento/framework/Event/Invoker/InvokerDefault.php(59): Magento\Framework\Event\ObserverFactory->get('CloudFlare\Plug...')
#15 /var/www/vhosts/ooples.com/httpdocs/var/generation/Magento/Framework/Event/Invoker/InvokerDefault/Interceptor.php(24): Magento\Framework\Event\Invoker\InvokerDefault->dispatch(Array, Object(Magento\Framework\Event\Observer))
#16 /var/www/vhosts/ooples.com/httpdocs/vendor/magento/framework/Event/Manager.php(66): Magento\Framework\Event\Invoker\InvokerDefault\Interceptor->dispatch(Array, Object(Magento\Framework\Event\Observer))
#17 /var/www/vhosts/ooples.com/httpdocs/var/generation/Magento/Framework/Event/Manager/Proxy.php(95): Magento\Framework\Event\Manager->dispatch('clean_cache_by
...', Array)
#18 /var/www/vhosts/ooples.com/httpdocs/vendor/magento/framework/Model/AbstractModel.php(801): Magento\Framework\Event\Manager\Proxy->dispatch('clean_cache_by
...', Array)
#19 /var/www/vhosts/ooples.com/httpdocs/vendor/magento/framework/Model/ResourceModel/Db/AbstractDb.php(818): Magento\Framework\Model\AbstractModel->afterSave()
#20 /var/www/vhosts/ooples.com/httpdocs/vendor/magento/framework/Model/ResourceModel/Db/AbstractDb.php(408): Magento\Framework\Model\ResourceModel\Db\AbstractDb->processAfterSaves(Object(Magestore\Webpos\Model\Staff\WebPosSession))
#21 /var/www/vhosts/ooples.com/httpdocs/vendor/magento/framework/Model/AbstractModel.php(631): Magento\Framework\Model\ResourceModel\Db\AbstractDb->save(Object(Magestore\Webpos\Model\Staff\WebPosSession))
#22 /var/www/vhosts/ooples.com/httpdocs/app/code/Magestore/Webpos/Helper/Permission.php(155): Magento\Framework\Model\AbstractModel->save()
#23 /var/www/vhosts/ooples.com/httpdocs/app/code/Magestore/Webpos/Controller/Rest.php(42): Magestore\Webpos\Helper\Permission->authorizeSession('5garb55fo9ntht9...')
#24 /var/www/vhosts/ooples.com/httpdocs/vendor/magento/module-webapi/Controller/Rest.php(334): Magestore\Webpos\Controller\Rest->checkPermissions()
#25 /var/www/vhosts/ooples.com/httpdocs/app/code/Magestore/Webpos/Controller/Rest.php(94): Magento\Webapi\Controller\Rest->validateRequest()
#26 /var/www/vhosts/ooples.com/httpdocs/vendor/magento/module-webapi/Controller/Rest.php(216): Magestore\Webpos\Controller\Rest->processApiRequest()
#27 /var/www/vhosts/ooples.com/httpdocs/var/generation/Magestore/Webpos/Controller/Rest/Interceptor.php(24): Magento\Webapi\Controller\Rest->dispatch(Object(Magento\Framework\App\Request\Http))
#28 /var/www/vhosts/ooples.com/httpdocs/vendor/magento/framework/App/Http.php(135): Magestore\Webpos\Controller\Rest\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http))
#29 /var/www/vhosts/ooples.com/httpdocs/vendor/magento/framework/App/Bootstrap.php(258): Magento\Framework\App\Http->launch()
#30 /var/www/vhosts/ooples.com/httpdocs/index.php(39): Magento\Framework\App\Bootstrap->run(Object(Magento\Framework\App\Http))
#31 {main}

Next Exception: Report ID: webapi-58e2d9529e110; Message: Warning: json_decode() expects parameter 1 to be string, object given in /var/www/vhosts/ooples.com/httpdocs/vendor/cloudflare/cloudflare-plugin-backend/src/Integration/DefaultConfig.php on line 14 in /var/www/vhosts/ooples.com/httpdocs/vendor/magento/framework/Webapi/ErrorProcessor.php:195
Stack trace:
#0 /var/www/vhosts/ooples.com/httpdocs/vendor/magento/framework/Webapi/ErrorProcessor.php(139): Magento\Framework\Webapi\ErrorProcessor->_critical(Object(Exception))
#1 /var/www/vhosts/ooples.com/httpdocs/vendor/magento/module-webapi/Controller/Rest.php(219): Magento\Framework\Webapi\ErrorProcessor->maskException(Object(Exception))
#2 /var/www/vhosts/ooples.com/httpdocs/var/generation/Magestore/Webpos/Controller/Rest/Interceptor.php(24): Magento\Webapi\Controller\Rest->dispatch(Object(Magento\Framework\App\Request\Http))
#3 /var/www/vhosts/ooples.com/httpdocs/vendor/magento/framework/App/Http.php(135): Magestore\Webpos\Controller\Rest\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http))
#4 /var/www/vhosts/ooples.com/httpdocs/vendor/magento/framework/App/Bootstrap.php(258): Magento\Framework\App\Http->launch()
#5 /var/www/vhosts/ooples.com/httpdocs/index.php(39): Magento\Framework\App\Bootstrap->run(Object(Magento\Framework\App\Http))
#6 {main} [] []
[2017-04-03 23:22:58] main.CRITICAL: Exception: Warning: json_decode() expects parameter 1 to be string, object given in /var/www/vhosts/ooples.com/httpdocs/vendor/cloudflare/cloudflare-plugin-backend/src/Integration/DefaultConfig.php on line 14 in /var/www/vhosts/ooples.com/httpdocs/vendor/magento/framework/App/ErrorHandler.php:61
Stack trace:
#0 [internal function]: Magento\Framework\App\ErrorHandler->handler(2, 'json_decode() e...', '/var/www/vhosts...', 14, Array)
#1 /var/www/vhosts/ooples.com/httpdocs/vendor/cloudflare/cloudflare-plugin-backend/src/Integration/DefaultConfig.php(14): json_decode(Object(Magento\Framework\ObjectManager\ObjectManager), true)
#2 /var/www/vhosts/ooples.com/httpdocs/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php(93): CF\Integration\DefaultConfig->construct(Object(Magento\Framework\ObjectManager\ObjectManager))
#3 /var/www/vhosts/ooples.com/httpdocs/vendor/magento/framework/ObjectManager/Factory/Compiled.php(88): Magento\Framework\ObjectManager\Factory\AbstractFactory->createObject('CF\Integration\...', Array)
#4 /var/www/vhosts/ooples.com/httpdocs/vendor/magento/framework/ObjectManager/Factory/Compiled.php(130): Magento\Framework\ObjectManager\Factory\Compiled->create('CF\Integration\...')
#5 /var/www/vhosts/ooples.com/httpdocs/vendor/magento/framework/ObjectManager/Factory/Compiled.php(67): Magento\Framework\ObjectManager\Factory\Compiled->get('CF\Integration\...')
#6 /var/www/vhosts/ooples.com/httpdocs/vendor/magento/framework/ObjectManager/Factory/Compiled.php(130): Magento\Framework\ObjectManager\Factory\Compiled->create('CloudFlare\Plug...')
#7 /var/www/vhosts/ooples.com/httpdocs/vendor/magento/framework/ObjectManager/Factory/Compiled.php(67): Magento\Framework\ObjectManager\Factory\Compiled->get('CloudFlare\Plug...')
#8 /var/www/vhosts/ooples.com/httpdocs/vendor/magento/framework/ObjectManager/Factory/Compiled.php(130): Magento\Framework\ObjectManager\Factory\Compiled->create('CloudFlare\Plug...')
#9 /var/www/vhosts/ooples.com/httpdocs/vendor/magento/framework/ObjectManager/Factory/Compiled.php(67): Magento\Framework\ObjectManager\Factory\Compiled->get('CloudFlare\Plug...')
#10 /var/www/vhosts/ooples.com/httpdocs/vendor/magento/framework/ObjectManager/Factory/Compiled.php(130): Magento\Framework\ObjectManager\Factory\Compiled->create('CloudFlare\Plug...')
#11 /var/www/vhosts/ooples.com/httpdocs/vendor/magento/framework/ObjectManager/Factory/Compiled.php(67): Magento\Framework\ObjectManager\Factory\Compiled->get('CloudFlare\Plug...')
#12 /var/www/vhosts/ooples.com/httpdocs/vendor/magento/framework/ObjectManager/ObjectManager.php(71): Magento\Framework\ObjectManager\Factory\Compiled->create('CloudFlare\Plug...')
#13 /var/www/vhosts/ooples.com/httpdocs/vendor/magento/framework/Event/ObserverFactory.php(33): Magento\Framework\ObjectManager\ObjectManager->get('CloudFlare\Plug...')
#14 /var/www/vhosts/ooples.com/httpdocs/vendor/magento/framework/Event/Invoker/InvokerDefault.php(59): Magento\Framework\Event\ObserverFactory->get('CloudFlare\Plug...')
#15 /var/www/vhosts/ooples.com/httpdocs/var/generation/Magento/Framework/Event/Invoker/InvokerDefault/Interceptor.php(24): Magento\Framework\Event\Invoker\InvokerDefault->dispatch(Array, Object(Magento\Framework\Event\Observer))
#16 /var/www/vhosts/ooples.com/httpdocs/vendor/magento/framework/Event/Manager.php(66): Magento\Framework\Event\Invoker\InvokerDefault\Interceptor->dispatch(Array, Object(Magento\Framework\Event\Observer))
#17 /var/www/vhosts/ooples.com/httpdocs/var/generation/Magento/Framework/Event/Manager/Proxy.php(95): Magento\Framework\Event\Manager->dispatch('clean_cache_by
...', Array)
#18 /var/www/vhosts/ooples.com/httpdocs/vendor/magento/framework/Model/AbstractModel.php(801): Magento\Framework\Event\Manager\Proxy->dispatch('clean_cache_by
...', Array)
#19 /var/www/vhosts/ooples.com/httpdocs/vendor/magento/framework/Model/ResourceModel/Db/AbstractDb.php(818): Magento\Framework\Model\AbstractModel->afterSave()
#20 /var/www/vhosts/ooples.com/httpdocs/vendor/magento/framework/Model/ResourceModel/Db/AbstractDb.php(408): Magento\Framework\Model\ResourceModel\Db\AbstractDb->processAfterSaves(Object(Magestore\Webpos\Model\Staff\WebPosSession))
#21 /var/www/vhosts/ooples.com/httpdocs/vendor/magento/framework/Model/AbstractModel.php(631): Magento\Framework\Model\ResourceModel\Db\AbstractDb->save(Object(Magestore\Webpos\Model\Staff\WebPosSession))
#22 /var/www/vhosts/ooples.com/httpdocs/app/code/Magestore/Webpos/Helper/Permission.php(155): Magento\Framework\Model\AbstractModel->save()
#23 /var/www/vhosts/ooples.com/httpdocs/app/code/Magestore/Webpos/Controller/Rest.php(42): Magestore\Webpos\Helper\Permission->authorizeSession('5garb55fo9ntht9...')
#24 /var/www/vhosts/ooples.com/httpdocs/vendor/magento/module-webapi/Controller/Rest.php(334): Magestore\Webpos\Controller\Rest->checkPermissions()
#25 /var/www/vhosts/ooples.com/httpdocs/app/code/Magestore/Webpos/Controller/Rest.php(94): Magento\Webapi\Controller\Rest->validateRequest()
#26 /var/www/vhosts/ooples.com/httpdocs/vendor/magento/module-webapi/Controller/Rest.php(216): Magestore\Webpos\Controller\Rest->processApiRequest()
#27 /var/www/vhosts/ooples.com/httpdocs/var/generation/Magestore/Webpos/Controller/Rest/Interceptor.php(24): Magento\Webapi\Controller\Rest->dispatch(Object(Magento\Framework\App\Request\Http))
#28 /var/www/vhosts/ooples.com/httpdocs/vendor/magento/framework/App/Http.php(135): Magestore\Webpos\Controller\Rest\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http))
#29 /var/www/vhosts/ooples.com/httpdocs/vendor/magento/framework/App/Bootstrap.php(258): Magento\Framework\App\Http->launch()
#30 /var/www/vhosts/ooples.com/httpdocs/index.php(39): Magento\Framework\App\Bootstrap->run(Object(Magento\Framework\App\Http))
#31 {main}

Next Exception: Report ID: webapi-58e2d952f296d; Message: Warning: json_decode() expects parameter 1 to be string, object given in /var/www/vhosts/ooples.com/httpdocs/vendor/cloudflare/cloudflare-plugin-backend/src/Integration/DefaultConfig.php on line 14 in /var/www/vhosts/ooples.com/httpdocs/vendor/magento/framework/Webapi/ErrorProcessor.php:195
Stack trace:
#0 /var/www/vhosts/ooples.com/httpdocs/vendor/magento/framework/Webapi/ErrorProcessor.php(139): Magento\Framework\Webapi\ErrorProcessor->_critical(Object(Exception))
#1 /var/www/vhosts/ooples.com/httpdocs/vendor/magento/module-webapi/Controller/Rest.php(219): Magento\Framework\Webapi\ErrorProcessor->maskException(Object(Exception))
#2 /var/www/vhosts/ooples.com/httpdocs/var/generation/Magestore/Webpos/Controller/Rest/Interceptor.php(24): Magento\Webapi\Controller\Rest->dispatch(Object(Magento\Framework\App\Request\Http))
#3 /var/www/vhosts/ooples.com/httpdocs/vendor/magento/framework/App/Http.php(135): Magestore\Webpos\Controller\Rest\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http))
#4 /var/www/vhosts/ooples.com/httpdocs/vendor/magento/framework/App/Bootstrap.php(258): Magento\Framework\App\Http->launch()
#5 /var/www/vhosts/ooples.com/httpdocs/index.php(39): Magento\Framework\App\Bootstrap->run(Object(Magento\Framework\App\Http))
#6 {main} [] []

@jwineman
Copy link
Contributor

jwineman commented Apr 3, 2017

What if you run bin/magento clean:cache?

If that doesn't fix it what version of Magento are you running?

@ooples
Copy link
Author

ooples commented Apr 3, 2017 via email

@jwineman
Copy link
Contributor

jwineman commented Apr 3, 2017

Alright I'll try to reproduce and get back to you.

@jwineman
Copy link
Contributor

jwineman commented Apr 3, 2017

Did you run bin\magento setup:di:compile after setup:upgrade?

@ooples
Copy link
Author

ooples commented Apr 3, 2017

Yes I did and then ran clean cache after that

@ooples
Copy link
Author

ooples commented Apr 4, 2017 via email

@jwineman
Copy link
Contributor

jwineman commented Apr 5, 2017

Steps to reproduce:

bin/magento deploy:mode:set production
bin/magento setup:upgrade

@jwineman
Copy link
Contributor

jwineman commented Apr 5, 2017

Hi @ooples,

This should be fixed in 1.1.3.

Can you upgrade and let me know if the problem still persists?

@ooples
Copy link
Author

ooples commented Apr 5, 2017 via email

@ooples
Copy link
Author

ooples commented Apr 5, 2017 via email

@jwineman
Copy link
Contributor

jwineman commented Apr 5, 2017

Thats the same error as before. Lets make sure the plugin is actually up to date:

  1. Delete that line ("cloudflare/cloudflare-magento": "^1.0") in your composer.json
  2. Run composer update
  3. Run composer require cloudflare/cloudflare-magento

@ooples
Copy link
Author

ooples commented Apr 5, 2017 via email

@jwineman
Copy link
Contributor

jwineman commented Apr 6, 2017

I know, I want to be sure though.

@ooples
Copy link
Author

ooples commented Apr 6, 2017 via email

@ooples
Copy link
Author

ooples commented Apr 7, 2017

Do you have any update on this issue?

@jwineman
Copy link
Contributor

jwineman commented Apr 7, 2017

Yup - finalizing a fix as we speak.

@ooples
Copy link
Author

ooples commented Apr 18, 2017

Any update?

@jwineman
Copy link
Contributor

Hey - sorry. I released 1.1.4 which fixes the JSON issue. I'm currently talking to the Magento team debugging an issue where setup:di:compile complains that RequestRouter must implement RouterInterface even though it does. If I remove the var/ folder after running setup:di:compile and load the page it generates correctly.

I would actually be curious if you're getting this as well - does 1.1.4 work for you?

@ooples
Copy link
Author

ooples commented Apr 18, 2017 via email

@jwineman
Copy link
Contributor

Yeah that is the same error I'm getting. The AJAX request is 500ing. I bet if you remove the var/ folder it will fix itself.

@ooples
Copy link
Author

ooples commented Apr 18, 2017 via email

@jwineman
Copy link
Contributor

Good! Hopefully this is a good work around for now. I'll update this thread again when I hear back from the Magento QA team.

@ooples
Copy link
Author

ooples commented Apr 18, 2017 via email

@jwineman
Copy link
Contributor

Correct - if you have the extension installed this code will provide the real IP address of the visitor to Magento.

@jwineman
Copy link
Contributor

Hi @ooples,

This is completely fixed in 1.1.5!

Thanks,
John

@ooples
Copy link
Author

ooples commented Apr 21, 2017 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants