question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Bug] `php artisan backpack:require:devtools` doesn't work

See original GitHub issue

Bug report

What I did

In a Backpack demo, I ran php artisan backpack:require:devtools to install DevTools.

What I expected to happen

Prompt for user & password and install DevTools.

What happened

Did NOT prompt for user & password.

The output made me think it’s installed now:

Screenshot 2021-10-20 at 11 33 23

That last command was never run, though. I didn’t notice it at the time, but php artisan backpack:devtools:install definitely wasn’t run, since I didn’t see the big fat notice of not having DevTools in production. Anyway, then I go to my browser expecting to be able to click the DevTools menu item, but here’s what I see:

Screenshot 2021-10-20 at 11 38 13

Now my entire Laravel app is broken. Note that the only changes it ACTUALLY made were in composer.json:

Screenshot 2021-10-20 at 11 38 52

But apparently the process stopped after composer config for some reason, didn’t do any of the next stuff, but the output makes it look like it DID, and it’s really confusing.

Anyway, I could get the Laravel app to work again by running composer install. But… still no DevTools. Only a composer update would do that I guess.

What I’ve already tried to fix it

  • Tried doing the same but with the --debug flag, didn’t produce any extra output;
  • Tried installing using the instructions on the DevTools README - worked fine;
  • Tried running php artisan backpack:install - same problem (no surprise there);

Versions

### PHP VERSION:
PHP 7.4.21 (cli) (built: Jul 12 2021 03:04:54) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
    with Xdebug v3.0.4, Copyright (c) 2002-2021, by Derick Rethans
    with Zend OPcache v7.4.21, Copyright (c), by Zend Technologies

### LARAVEL VERSION:
v8.62.0@60a7e00488167ce2babf3a2aeb3677e48aaf39be

### BACKPACK VERSION:
4.1.54@6f0ddffbe2017ef0e0d9becf5e9f422a81d94c45

Can you reproduce this @promatik ?

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:11 (11 by maintainers)

github_iconTop GitHub Comments

2reactions
pxpmcommented, Nov 2, 2021

@tabacitu exceptional news on this!

I was working on the logging we talked, it seemd reasonable to atleast know why it fails.

I tried again in another demo project I have here. I logged the error and found the culprit!

[2021-11-02T11:38:38.568356+00:00] devtools_errors.ERROR: Your requirements could not be resolved to an installable set of packages.    Problem 1     - backpack/devtools 1.0.14 requires laravel-shift/blueprint >=1.25 -> satisfiable by laravel-shift/blueprint[v1.25.0, v2.0.0].     - backpack/devtools[1.0.10, ..., 1.0.13] require laravel-shift/blueprint dev-master -> satisfiable by laravel-shift/blueprint[dev-master].     - backpack/devtools[1.0.0, ..., 1.0.9] require laravel-shift/blueprint ^1.23.2 -> satisfiable by laravel-shift/blueprint[v1.23.2, ..., v1.25.0].     - backpack/devtools[1.0.15, ..., 1.0.28] require laravel-shift/blueprint ^1.25 -> satisfiable by laravel-shift/blueprint[v1.25.0].     - laravel-shift/blueprint[dev-master, v1.24.2, ..., v1.25.0, v2.0.0] require doctrine/dbal ^2.9 || ^3.0 -> found doctrine/dbal[v2.9.0, ..., 2.13.x-dev, 3.0.0, ..., 3.2.x-dev] but it conflicts with your root composer.json require (2.6).     - laravel-shift/blueprint[v1.23.2, ..., v1.24.1] require doctrine/dbal ^2.9|^3.0 -> found doctrine/dbal[v2.9.0, ..., 2.13.x-dev, 3.0.0, ..., 3.2.x-dev] but it conflicts with your root composer.json require (2.6).     - Root composer.json requires backpack/devtools ^1.0 -> satisfiable by backpack/devtools[1.0.0, ..., 1.0.28].   Installation failed, reverting ./composer.json and ./composer.lock to their original content.  [] []

It seems the root cause for the failing process is the fact that we require doctrine/dbal 2.6 in demo project to support older versions of Laravel, and in Devtools we don’t support those versions and require an higher version.

I’ve tested upgrading dbal to 3.* and after run the command without issues. Can you try it too @tabacitu ?

Best, Pedro

1reaction
promatikcommented, Nov 7, 2021

@tabacitu we already do that 😅 But in this case the it is really impossible to install/update, DevTools depends on blueprint >1.25, and blueprint 1.25 depends on dbal 3. Composer can’t handle that 🤷‍♂️

In the between, I added this error to the install log.

image

The fix is now on #3843.

I’ll close this one for now ✌

Read more comments on GitHub >

github_iconTop Results From Across the Web

[Bug] There are no commands defined in the "backpack ...
Bug report What I did added a repository to composer.json composer require --dev backpack/devtools (success) executed php artisan backpack:devtools:install ...
Read more >
Laravel Backpack devtools add-on not working?
I've just create a new Laravel app and followed the steps to add the PRO and Devtools repo. I did the same as...
Read more >
DevTools - Backpack for Laravel
If for some reason php artisan backpack:devtools:install doesn't work for you, or you want to do something different, here's how you can manually...
Read more >
How to Build a Laravel CRUD App with Auth0 Authentication
Learn how to build and secure a travel manager CRUD application with Laravel and authentication with Auth0.
Read more >
BackpackForLaravel/Lobby - Gitter
https://stackoverflow.com/questions/62935065/laravel-backpack-edit-form- ... been working with it for last few months, bought pro and dev tools and cannot ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found