weixin_39786155
weixin_39786155
2021-01-08 14:05

horizon dashboard empty

Hi

I follow the step explain here: https://libraries.io/github/jpcaparas/laravel-horizon-demo

And the official doc: https://laravel.com/docs/5.6/horizon

No problem with packages or anything else. But when I access to dashboard nothing appears!

Log dont throw any error but dashboard only show background (with grey horizon color).

Chrome console show this:

` GET http://178.62.204.162/vendor/horizon/css/app.css?id=5ce9973b1bc9f6a46cb2 404 (Not Found) horizon:6

GET http://178.62.204.162/vendor/horizon/js/app.js?id=1cfbba1e25ed49885098 404 (Not Found) horizon:18

Uncaught SyntaxError: Unexpected identifier VM5713:1 `

Any idea?

Best regards

该提问来源于开源项目:laravel/horizon

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享
  • 邀请回答

13条回答

  • weixin_39988164 weixin_39988164 4月前

    Hey all,

    My problem was slightly different and niche so I thought i'd post incase it helps anyone.

    My specific issue was I was using a package to minify HTML output which was stripping inline css.

    In my case I was using "RenatoMarinho\LaravelPageSpeed" (Great package) so I just had comment out the InlineCSS class from the HTTP kernel.

    Hope this helps.

    Keep on being awesome everyone :)

    点赞 评论 复制链接分享
  • weixin_39933724 weixin_39933724 4月前

    I have met this problem.I found that the cause was the static resource handle of your server.I have used the server of swoole http_server,and it close the static resource handle by default.When I turn my server to nginx,it can handle the static resource,and the horizon page was showing normal.Follow this opinion,I switch on the static resource handle function in my swoole http_server,and it works.So,you should check your web server'setting,see if it can handle the static resouce normally.

    点赞 评论 复制链接分享
  • weixin_39543773 weixin_39543773 4月前

    Did you publish the assets? If so, with what command?

    点赞 评论 复制链接分享
  • weixin_39786155 weixin_39786155 4月前

    Yes:

    `php artisan vendor:publish --provider="Laravel\Horizon\HorizonServiceProvider"

    `

    点赞 评论 复制链接分享
  • weixin_39786155 weixin_39786155 4月前

    As I say in my question. I follow the instructions in the official documentation, and I do not see any error in the log. But I dont know why the dashboard is not running

    点赞 评论 复制链接分享
  • weixin_39608479 weixin_39608479 4月前

    Did you run php artisan horizon?

    点赞 评论 复制链接分享
  • weixin_39786155 weixin_39786155 4月前

    Sure!

    I fact, horizon is running (show grey background horizon) but the view is empty...

    点赞 评论 复制链接分享
  • weixin_39881760 weixin_39881760 4月前

    facing same issue.

    点赞 评论 复制链接分享
  • weixin_39786155 weixin_39786155 4月前

    Could you solve it?

    点赞 评论 复制链接分享
  • weixin_39881760 weixin_39881760 4月前

    Yes. Actually, the issue is due to accessing project directly from folder. To run the horizon, you have to run PHP artisan serve command or create a virtual host on server or in your local environment.

    点赞 评论 复制链接分享
  • weixin_39573287 weixin_39573287 4月前

    If you are running on windows IIS, set the path to the public folder and run php artisan vendor:publish --provider="Laravel\Horizon\HorizonServiceProvider"

    点赞 评论 复制链接分享
  • weixin_39828956 weixin_39828956 4月前

    If you're facing a problem with that particularly demo app it's best to ask the question on their issue tracker.

    点赞 评论 复制链接分享
  • weixin_39943101 weixin_39943101 4月前

    Was having a similar issue: Horizon favicon and title show, all assets are loaded, and the background is colored, but nothing would show, not even in the console.

    Turns out it was a URL/routing issue. E.g. horizon/dashboard works, but horizon/app or anything else would just show an empty page instead of an error. Reason is Horizon has a base route that catches everything after the forward slash. Weird thing is, that controller just returns a view and discards the view variable, so it should actually load with any URL but somehow doesn't ¯_(ツ)_/¯

    点赞 评论 复制链接分享

相关推荐