Error using geom_conn_bundle()

When trying to use geom_conn_bundle() I systematically get this error:

Error in geom_conn_bundle():
! Problem while computing layer data.
:information_source: Error occurred in the 1st layer.
Caused by error in layer_data():
! layer_data() must return a <data.frame>

Not sure it's relevant, but I'm using R 4.2.1 on an Ubuntu 22.04 machine. The ggraph package is updated to the last CRAN version. Below a minimal example causing the error.


graph <- as_tbl_graph(highschool) |> 
  mutate(Popularity = centrality_degree(mode = 'in'))

ggraph(graph, layout = 'kk') + 
  geom_conn_bundle() +

geom_conn_bundle() needs data from get_con(), something like

graph <- as_tbl_graph(highschool)
importFrom <- match(highschool$from, highschool$to)
importFrom <- match(highschool$to, highschool$from)
ggraph(graph, 'kk') + 
  geom_conn_bundle(data = get_con(importFrom, importTo))

Thank you. I understand the problem now.
I decided to use the edgebundle package instead, which offer more flexibility in the type of bundle to implement (I love the 'hammer' one, see