save-as-ebook icon indicating copy to clipboard operation
save-as-ebook copied to clipboard

Fails on pages loaded before the extension was installed

Open johnhorner opened this issue 4 years ago • 3 comments

This is probably an edge case but I had a few pages opened in tabs, then added the extension.

It fails with no obvious message in the UI but this in the console:

Unchecked runtime.lastError: Could not establish connection. Receiving end does not exist.

I needed to reload the pages before it worked. I don't know if you can code around this but maybe you can document it?

johnhorner avatar Aug 08 '20 22:08 johnhorner

do you use Firefox of Chrome? On FF, sometimes. for big pages I have to refresh the page and then retry because it does not work on the first try.

alexadam avatar Aug 11 '20 15:08 alexadam

+1 to this!

I installed the extension and tried to use it on a webpage that was already loaded. First I selected "Save page" and nothing happened, and I couldn't see anything on the browser console either. Then, I tried clicking on "Edit chapters", and this error popped up in the console:

Uncaught ReferenceError: getEbookTitle is not defined
    at showEditor (VM40 chapterEditor.js:50)
    at VM40 chapterEditor.js:9

After finding this issue, I tried reloading the page I wanted to save, and everything worked fine.

I'm using Chrome 87.0.4280.88 (64-bit) on Linux.

JavierGelatti avatar Jan 07 '21 02:01 JavierGelatti

As a potential and quick workaround for now, you might want to open a new tab or toast message on a first install to greet new users and tell them the currently loaded pages need reloading in order for the extension to work. Additionally, any failed epub conversion might show a message to the user saying it failed, prompting it to retry after having reloaded the page.

Cwpute avatar Oct 20 '23 11:10 Cwpute