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

Add a default favicon #623

Open
PGimenez opened this issue Feb 2, 2023 · 5 comments
Open

Add a default favicon #623

PGimenez opened this issue Feb 2, 2023 · 5 comments
Assignees

Comments

@PGimenez
Copy link
Member

PGimenez commented Feb 2, 2023

Describe the bug
On the first page load of any app, a 404 appears for the favicon

Error stacktrace
┌ Error: 2023-02-02 09:35:06 GET /favicon.ico 404
└ @ Genie.Router ~/.julia/packages/Genie/AjwV9/src/Router.jl:204

Additional context
⌃ [a59fdf5c] GenieFramework v1.6.0
⌃ [4acbeb90] Stipple v0.25.12
[ec984513] StipplePlotly v0.13.2
⌅ [a3c5d34a] StippleUI v0.20.2

@AbhimanyuAryan
Copy link
Member

How can I reproduce this? It basically means favicon.ico Asset is missing from public or can't access it

1.9.0-beta3>using Genie
[ Info: Precompiling Genie [c43c736e-a2d1-11e8-161f-af95117fbd1e]

1.9.0-beta3>route("/") do
            "hello world"
            end
[GET] / => #5 | :get

1.9.0-beta3>up()
┌ Info: 
└ Web Server starting at http://127.0.0.1:8000 
[ Info: Listening on: 127.0.0.1:8000, thread id: 1
Genie.Server.ServersCollection(Task (runnable) @0x0000000110c847e0, nothing)

1.9.0-beta3>[ Info: GET / 200

@PGimenez
Copy link
Member Author

PGimenez commented Feb 2, 2023

Sorry, I've seen this error often and I thought it happened with every app. I'm running this code:

using GenieFramework
@genietools

s = ["hi1","hi2","hi3"]
@out s_out = first(s)

function ui()  "{{s_out}}"  end

@page("/", ui)
Server.isrunning() || Server.up()  
julia> include("temp.jl")
┌ Info: 2023-02-02 11:13:08
└ Web Server starting at http://127.0.0.1:8000
[ Info: 2023-02-02 11:13:10 Watching ["/Users/pere/Downloads"]
Genie.Server.ServersCollection(Task (runnable) @0x000000017ac50fe0, nothing)
[ Info: 2023-02-02 11:13:42 GET / 200
[ Info: 2023-02-02 11:13:43 GET /stipple.jl/master/assets/css/stipplecore.css 200
[ Info: 2023-02-02 11:13:43 GET /stippleui.jl/master/assets/css/quasar.min.css 200
[ Info: 2023-02-02 11:13:43 GET /genie.jl/master/assets/js/channels.js 200
[ Info: 2023-02-02 11:13:43 GET /stipple.jl/master/assets/js/underscore-min.js 200
[ Info: 2023-02-02 11:13:43 GET /stipple.jl/master/assets/js/vue.js 200
[ Info: 2023-02-02 11:13:43 GET /stipple.jl/master/assets/js/stipplecore.js 200
[ Info: 2023-02-02 11:13:43 GET /stipple.jl/master/assets/js/watchers.js 200
[ Info: 2023-02-02 11:13:43 GET /stippleui.jl/master/assets/js/quasar.umd.min.js 200
[ Info: 2023-02-02 11:13:43 GET /stippleplotly.jl/master/assets/js/plotly2.min.js 200
[ Info: 2023-02-02 11:13:43 GET /stippleplotly.jl/master/assets/js/resizesensor.min.js 200
[ Info: 2023-02-02 11:13:44 GET /stippleplotly.jl/master/assets/js/lodash.min.js 200
[ Info: 2023-02-02 11:13:44 GET /stippleplotly.jl/master/assets/js/vueresize.min.js 200
[ Info: 2023-02-02 11:13:44 GET /stippleplotly.jl/master/assets/js/vueplotly.min.js 200
[ Info: 2023-02-02 11:13:44 GET /stippleplotly.jl/master/assets/js/sentinel.min.js 200
[ Info: 2023-02-02 11:13:44 GET /stippleplotly.jl/master/assets/js/syncplot.js 200
[ Info: 2023-02-02 11:13:44 GET /js/plugins/autoreload.js 200
[ Info: 2023-02-02 11:13:44 GET /stipple.jl/master/assets/js/vue_filters.js 200
[ Info: 2023-02-02 11:13:44 GET /stipple.jl/master/assets/js/keepalive.js 200
[ Info: 2023-02-02 11:13:45 GET /stipple.jl/master/assets/js/varmain_reactivemodel312.js 200
[ Info: 2023-02-02 11:13:46 GET /stipple.jl/master/assets/img/genie-logo.img 200
┌ Error: 2023-02-02 11:13:47 GET /favicon.ico 404
└ @ Genie.Router ~/.julia/packages/Genie/AjwV9/src/Router.jl:204

@essenciary
Copy link
Member

We don't set up a favicon by default but the browser makes a request for it automatically. We can bundle one in Stipple and inject it into the default layout.

@AbhimanyuAryan
Copy link
Member

@essenciary you mean by adding it in deps_routes and then calling /stipple.jl/master/assets/.... in ReactiveTools.DEFAULT_LAYOUT??

@essenciary
Copy link
Member

@AbhimanyuAryan Yes

@essenciary essenciary changed the title favicon 404 Add a default favicon Sep 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants