“Jane the Virgin” only has two episodes left, and the penultimate episode is a big one. The synopsis and photos for Season 5, episode 17 show a fancy party, but Jane might not be celebrating.

“Jane (Gina Rodriguez) is feeling great about all the book publishing prospects she has until an unexpected problem pops up,” the synopsis teases.

One problem was revealed last week. Rose/Sin Rostro (Bridget Regan) got away again, and the mere thought of Rose being on the loose terrifies Jane. However, the woman who once kidnapped her son being free isn't the only issue. There are also some hiccups in the publishing process, and Jane worries if her book will ever be on shelves.

Though Rafael (Justin Baldoni) is as supportive as possible, the world doesn’t stop just because a crazed serial killer is on the loose and Jane is having publishing issues. Petra (Yael Grobglas) and Rafael continue to work on the hotel together, and Petra wants to take that partnership to the next level.

“Petra and Rafael’s working relationship has been going so well that Petra makes Rafael an unexpected offer,” the logline hints.

Elsewhere, it’s a big night for Rogelio (Jaime Camil). “This Is Mars” is having a swanky party, but is Rogelio going to celebrate or say goodbye? At the end of the last episode, River (Brooke Shields) revealed that she is moving the show to New York. Will Rogelio follow her or will he stay in Miami?

“It seems like every time Rogelio takes one step closer to his dream, a new roadblock appears,” the CW’s description says.

The promo video shows the very on-theme party:

Expect this episode to start tying up some loose ends. “Chapter 98” is the last episode before the series finale. Gina Lamar directed the episode, which was written by Carolina Rivera.

“Jane the Virgin” Season 5, episode 17 airs Wednesday, July 24 at 9 p.m. EDT on The CW. The series finale airs July 30 at 9 p.m. EDT following a one-hour retrospective special at 8 p.m. EDT.

Jane the Virgin 517
Gina Rodriguez stars in "Jane the Virgin" Season 5, episode 17. Kevin Estrada/The CW
Jane the Virgin 517
Jane runs into some publishing trouble in "Jane the Virgin" Season 5, episode 17. Kevin Estrada/The CW
Jane the Virgin 517
Rogelio goes to a "This Is Mars" party in "Jane the Virgin" Season 5, episode 17. Kevin Estrada/The CW
Jane the Virgin 517
Petra and Rafael make some big business decisions in "Jane the Virgin" Season 5, episode 17. Kevin Estrada/The CW