this is actually for Drupal 8.0.0 not dev version
As soon as I initialized composer manager I lost the ability to reach the report status page in drupal 8. I get this error:

  • The website encountered an unexpected error. Please try again later.

When I check the composer manager report i get this:

  • Could not decode JSON: Syntax error

After uninstalling Composer Manager I am able to get my status report page. I apologize if I posted in the wrong section!

Chris

Comments

sushichris created an issue. See original summary.

platinum1’s picture

Same problem here.

sushichris’s picture

I had problems upgrading drupal release candidates with the drupal commerce module installed, I was getting unrecoverable errors and completely reinstalled drupal (installed the next release candidate) instead of upgrading. Now I am wondering if it was composer manager. I wish I kept the logs and errors but I assumed it was my error and was upgrading a test / dummy site anyway.

sushichris’s picture

Fatal error: Interface 'CommerceGuys\Zone\Model\ZoneInterface' not found in /home/XXXXXXX/public_html/drupal/modules/address/src/Entity/ZoneInterface.php on line 23

bojanz’s picture

I can't reproduce this on a fresh install with Commerce, Address.
In general it looks like one of the modules you downloaded has a malformed composer.json. You'll need to find out which one
(and we should figure out how to make that more obvious in the future).

You can try enabling errors at admin/config/development/logging and then reloading to see if any extra info is provided.

The ZoneInterface error is unrelated to this module, and points to the Address module being installed without its dependencies (composer drupal install never ran).

platinum1’s picture

The problem occurred when updating an existing RC3 site to D 8.0.0. A new init.php was required. The script "composer Drupal-update" terminates with an exception

[UnexpectedValueException]
Could not decode JSON: Syntax error

Logging provides the following message:

UnexpectedValueException: Could not decode JSON: Syntax error in Drupal\composer_manager\JsonFile::read() (line 36 of modules/contrib/composer_manager/src/JsonFile.php).

platinum1’s picture

Additional log info:

Drupal\composer_manager\PackageManager->getExtensionPackages()
Drupal\composer_manager\PackageManager->buildMergedExtensionPackage()
Drupal\composer_manager\PackageManager->getRequiredPackages()
Drupal\composer_manager\PackageManager->needsComposerUpdate()
composer_manager_requirements('runtime')
call_user_func_array('composer_manager_requirements', Array)
Drupal\Core\Extension\ModuleHandler->invokeAll('requirements', Array)
Drupal\system\SystemManager->listRequirements()
Drupal\system\Controller\SystemInfoController->status()
call_user_func_array(Array, Array)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
call_user_func_array(Object, Array)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1)
Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1)
Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1)
Drupal\page_cache\StackMiddleware\PageCache->pass(Object, 1, 1)
Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1)
Stack\StackedHttpKernel->handle(Object, 1, 1)
Drupal\Core\DrupalKernel->handle(Object)

bojanz’s picture

Title: The website encountered an unexpected error. Please try again later. » Json exceptions should include the filename of the broken file

A new init was required because you accidentally replaced vendor/ and composer.json when you upgraded core.
You're not supposed to do that, only the core folder is supposed to be replaced.

The error is still caused by a module's broken composer.json.
Go through your modules, find out which one it is.
I'll commit a fix so that the error actually shows where it came from.

sushichris’s picture

Ah the drupal install text says to delete the core and vendor files, thank you for clarifying this I will try this again.

bojanz’s picture

Status: Active » Closed (duplicate)