NiclasvanEyk / jetbrains-laravel-make-integration

🛠 A set of integration points that connect your Laravel application to PhpStorm
https://plugins.jetbrains.com/plugin/14612-make-for-laravel
37 stars 5 forks source link

Bug: "Could not extract JSON while introspecting. Source" #92

Closed lmvalenzuela closed 1 year ago

lmvalenzuela commented 1 year ago

I'm running my laravel project on a Macbook Pro Intel based (macOS Monterey 12.6.2) using sail, with PHPStorm 2022.3. After plugin install I've got the following error: 'An error occurred while loading the routes' and a link 'Open details'. On the details screen I've got the following:

Could not extract JSON while introspecting. Source:

[+] Running 5/0

 ⠿ Container cv-app-selenium-1     Running 0.0s

 ⠿ Container cv-app-mailhog-1      Running 0.0s

 ⠿ Container cv-app-redis-1        Running 0.0s

 ⠿ Container cv-app-mysql-1        Running 0.0s

 ⠿ Container cv-app-meilisearch-1  Running 0.0s

[{"domain":null,"method":"GET|HEAD","uri":"\/","name":null,"action":"Closure","middleware":["web"]},{"domain":null,"method":"POST","uri":"_ignition\/execute-solution","name":"ignition.executeSolution","action":"Spatie\\LaravelIgnition\\Http\\Controllers\\ExecuteSolutionController","middleware":["Spatie\\LaravelIgnition\\Http\\Middleware\\RunnableSolutionsEnabled"]},{"domain":null,"method":"GET|HEAD","uri":"_ignition\/health-check","name":"ignition.healthCheck","action":"Spatie\\LaravelIgnition\\Http\\Controllers\\HealthCheckController","middleware":["Spatie\\LaravelIgnition\\Http\\Middleware\\RunnableSolutionsEnabled"]},{"domain":null,"method":"POST","uri":"_ignition\/update-config","name":"ignition.updateConfig","action":"Spatie\\LaravelIgnition\\Http\\Controllers\\UpdateConfigController","middleware":["Spatie\\LaravelIgnition\\Http\\Middleware\\RunnableSolutionsEnabled"]},{"domain":null,"method":"GET|HEAD","uri":"api\/user","name":null,"action":"Closure","middleware":["api","App\\Http\\Middleware\\Authentic
ate:sanctum"]},{"domain":null,"method":"GET|HEAD","uri":"dashboard","name":"dashboard","action":"Closure","middleware":["web","App\\Http\\Middleware\\Authenticate:sanctum","Laravel\\Jetstream\\Http\\Middleware\\AuthenticateSession","Illuminate\\Auth\\Middleware\\EnsureEmailIsVerified"]},{"domain":null,"method":"GET|HEAD","uri":"forgot-password","name":"password.request","action":"Laravel\\Fortify\\Http\\Controllers\\PasswordResetLinkController@create","middleware":["web","App\\Http\\Middleware\\RedirectIfAuthenticated:web"]},{"domain":null,"method":"POST","uri":"forgot-password","name":"password.email","action":"Laravel\\Fortify\\Http\\Controllers\\PasswordResetLinkController@store","middleware":["web","App\\Http\\Middleware\\RedirectIfAuthenticated:web"]},{"domain":null,"method":"GET|HEAD","uri":"login","name":"login","action":"Laravel\\Fortify\\Http\\Controllers\\AuthenticatedSessionController@create","middleware":["web","App\\Http\\Middleware\\RedirectIfAuthenticated:web"]},{"domain":null,"method":"POST","
uri":"login","name":null,"action":"Laravel\\Fortify\\Http\\Controllers\\AuthenticatedSessionController@store","middleware":["web","App\\Http\\Middleware\\RedirectIfAuthenticated:web","Illuminate\\Routing\\Middleware\\ThrottleRequests:login"]},{"domain":null,"method":"POST","uri":"logout","name":"logout","action":"Laravel\\Fortify\\Http\\Controllers\\AuthenticatedSessionController@destroy","middleware":["web"]},{"domain":null,"method":"GET|HEAD","uri":"register","name":"register","action":"Laravel\\Fortify\\Http\\Controllers\\RegisteredUserController@create","middleware":["web","App\\Http\\Middleware\\RedirectIfAuthenticated:web"]},{"domain":null,"method":"POST","uri":"register","name":null,"action":"Laravel\\Fortify\\Http\\Controllers\\RegisteredUserController@store","middleware":["web","App\\Http\\Middleware\\RedirectIfAuthenticated:web"]},{"domain":null,"method":"POST","uri":"reset-password","name":"password.update","action":"Laravel\\Fortify\\Http\\Controllers\\NewPasswordController@store","middleware":["w
eb","App\\Http\\Middleware\\RedirectIfAuthenticated:web"]},{"domain":null,"method":"GET|HEAD","uri":"reset-password\/{token}","name":"password.reset","action":"Laravel\\Fortify\\Http\\Controllers\\NewPasswordController@create","middleware":["web","App\\Http\\Middleware\\RedirectIfAuthenticated:web"]},{"domain":null,"method":"GET|HEAD","uri":"sanctum\/csrf-cookie","name":"sanctum.csrf-cookie","action":"Laravel\\Sanctum\\Http\\Controllers\\CsrfCookieController@show","middleware":["web"]},{"domain":null,"method":"GET|HEAD","uri":"two-factor-challenge","name":"two-factor.login","action":"Laravel\\Fortify\\Http\\Controllers\\TwoFactorAuthenticatedSessionController@create","middleware":["web","App\\Http\\Middleware\\RedirectIfAuthenticated:web"]},{"domain":null,"method":"POST","uri":"two-factor-challenge","name":null,"action":"Laravel\\Fortify\\Http\\Controllers\\TwoFactorAuthenticatedSessionController@store","middleware":["web","App\\Http\\Middleware\\RedirectIfAuthenticated:web","Illuminate\\Routing\\Middleware\\
ThrottleRequests:two-factor"]},{"domain":null,"method":"DELETE","uri":"user","name":"current-user.destroy","action":"Laravel\\Jetstream\\Http\\Controllers\\Inertia\\CurrentUserController@destroy","middleware":["web","App\\Http\\Middleware\\Authenticate:sanctum","Laravel\\Jetstream\\Http\\Middleware\\AuthenticateSession"]},{"domain":null,"method":"GET|HEAD","uri":"user\/confirm-password","name":null,"action":"Laravel\\Fortify\\Http\\Controllers\\ConfirmablePasswordController@show","middleware":["web","App\\Http\\Middleware\\Authenticate:web"]},{"domain":null,"method":"POST","uri":"user\/confirm-password","name":"password.confirm","action":"Laravel\\Fortify\\Http\\Controllers\\ConfirmablePasswordController@store","middleware":["web","App\\Http\\Middleware\\Authenticate:web"]},{"domain":null,"method":"GET|HEAD","uri":"user\/confirmed-password-status","name":"password.confirmation","action":"Laravel\\Fortify\\Http\\Controllers\\ConfirmedPasswordStatusController@show","middleware":["web","App\\Http\\Middleware\\Au
thenticate:web"]},{"domain":null,"method":"POST","uri":"user\/confirmed-two-factor-authentication","name":"two-factor.confirm","action":"Laravel\\Fortify\\Http\\Controllers\\ConfirmedTwoFactorAuthenticationController@store","middleware":["web","App\\Http\\Middleware\\Authenticate:web","Illuminate\\Auth\\Middleware\\RequirePassword"]},{"domain":null,"method":"DELETE","uri":"user\/other-browser-sessions","name":"other-browser-sessions.destroy","action":"Laravel\\Jetstream\\Http\\Controllers\\Inertia\\OtherBrowserSessionsController@destroy","middleware":["web","App\\Http\\Middleware\\Authenticate:sanctum","Laravel\\Jetstream\\Http\\Middleware\\AuthenticateSession"]},{"domain":null,"method":"PUT","uri":"user\/password","name":"user-password.update","action":"Laravel\\Fortify\\Http\\Controllers\\PasswordController@update","middleware":["web","App\\Http\\Middleware\\Authenticate:web"]},{"domain":null,"method":"GET|HEAD","uri":"user\/profile","name":"profile.show","action":"Laravel\\Jetstream\\Http\\Controllers\\Ine
rtia\\UserProfileController@show","middleware":["web","App\\Http\\Middleware\\Authenticate:sanctum","Laravel\\Jetstream\\Http\\Middleware\\AuthenticateSession"]},{"domain":null,"method":"PUT","uri":"user\/profile-information","name":"user-profile-information.update","action":"Laravel\\Fortify\\Http\\Controllers\\ProfileInformationController@update","middleware":["web","App\\Http\\Middleware\\Authenticate:web"]},{"domain":null,"method":"DELETE","uri":"user\/profile-photo","name":"current-user-photo.destroy","action":"Laravel\\Jetstream\\Http\\Controllers\\Inertia\\ProfilePhotoController@destroy","middleware":["web","App\\Http\\Middleware\\Authenticate:sanctum","Laravel\\Jetstream\\Http\\Middleware\\AuthenticateSession"]},{"domain":null,"method":"POST","uri":"user\/two-factor-authentication","name":"two-factor.enable","action":"Laravel\\Fortify\\Http\\Controllers\\TwoFactorAuthenticationController@store","middleware":["web","App\\Http\\Middleware\\Authenticate:web","Illuminate\\Auth\\Middleware\\RequirePassword
"]},{"domain":null,"method":"DELETE","uri":"user\/two-factor-authentication","name":"two-factor.disable","action":"Laravel\\Fortify\\Http\\Controllers\\TwoFactorAuthenticationController@destroy","middleware":["web","App\\Http\\Middleware\\Authenticate:web","Illuminate\\Auth\\Middleware\\RequirePassword"]},{"domain":null,"method":"GET|HEAD","uri":"user\/two-factor-qr-code","name":"two-factor.qr-code","action":"Laravel\\Fortify\\Http\\Controllers\\TwoFactorQrCodeController@show","middleware":["web","App\\Http\\Middleware\\Authenticate:web","Illuminate\\Auth\\Middleware\\RequirePassword"]},{"domain":null,"method":"GET|HEAD","uri":"user\/two-factor-recovery-codes","name":"two-factor.recovery-codes","action":"Laravel\\Fortify\\Http\\Controllers\\RecoveryCodeController@index","middleware":["web","App\\Http\\Middleware\\Authenticate:web","Illuminate\\Auth\\Middleware\\RequirePassword"]},{"domain":null,"method":"POST","uri":"user\/two-factor-recovery-codes","name":null,"action":"Laravel\\Fortify\\Http\\Controllers\\R
ecoveryCodeController@store","middleware":["web","App\\Http\\Middleware\\Authenticate:web","Illuminate\\Auth\\Middleware\\RequirePassword"]},{"domain":null,"method":"GET|HEAD","uri":"user\/two-factor-secret-key","name":"two-factor.secret-key","action":"Laravel\\Fortify\\Http\\Controllers\\TwoFactorSecretKeyController@show","middleware":["web","App\\Http\\Middleware\\Authenticate:web","Illuminate\\Auth\\Middleware\\RequirePassword"]}]

Done!
NiclasvanEyk commented 1 year ago

Thanks for reporting, I assume the plugin tries to parse the first Thing between [] as json, which in this case is the [+] that Docker unfortunately prints when displaying the progress when starting containers.

Definitely a bug!

lmvalenzuela commented 1 year ago

Any news about this ? Regards !

NiclasvanEyk commented 1 year ago

I am writing my master thesis atm, so I have no time/mental capacity to work on this right now.

I'll be done by the end of February though, so maybe I can look I to it then. 🙂

nortmas commented 1 year ago

Confirmed. I'm having the same issue. 😢

NiclasvanEyk commented 1 year ago

Not the prettiest fix, but it works. Also added the output to the regression tests, so it should not happen again.

Published 3.4.1, which should be released sometimes during this week. If you want, you can test it right now by downloading the .jar file from the release page and manually install it from disk.