stackedit.js icon indicating copy to clipboard operation
stackedit.js copied to clipboard

Instantly closes, or opens blank iframe

Open abartov opened this issue 6 years ago • 10 comments

Hello. First of all, many thanks for StackEdit! It's a wonderful piece of work!

I've been trying to embed it in a project, but after opening correctly the first few times, it stopped working, now either opening correctly but instantly closing (no error on the console), or opening with a blank window.

I've switched to a simple HTML file (served from my app, to avoid the file:// protocol), matching the example code, which again, worked for a bit and then stopped working.

Can you offer thoughts on what might be the problem?

Here is my test file (renamed to .html.txt for uploading here) --

stackedit_test.html.txt

abartov avatar Aug 19 '18 13:08 abartov

screenshot from 2018-08-19 16-13-00

abartov avatar Aug 19 '18 13:08 abartov

Update: it now works fine in Chrome 68, but still instantly closes (after briefly flashing the StackEdit logo) on Firefox 62. Does that suggest a direction, @benweet ?

abartov avatar Sep 09 '18 16:09 abartov

Using "private mode" in Firefox 62, the SlackEdit logo hangs and the editor buffers never show. The console shows:

"Error: Can't connect to IndexedDB. localDbSvc.js:28:12 t/r.onerror localDbSvc.js:28:12"

UPDATE: oh, never mind, I understand it's a limitation of Firefox's private mode, as described in Stackedit's Issue #1302.

But the instantly-closing behavior is still happening, on non-private Firefox 62 on Ubuntu 18.04.

abartov avatar Sep 09 '18 16:09 abartov

If it helps anyone - I see the same instantly close behavior on Firefox 60.1.0esr (64-bit) with RHEL, but the frame properly stays open on 60.2.0esr (32-bit) on Windows 10.

Both were done using the buttons on the stackedit-js example page

tlindbloom avatar Oct 03 '18 16:10 tlindbloom

Just clear the cache and should work, not sure what is the reason for this, as I have seen it too.

cristichiru avatar Oct 11 '18 17:10 cristichiru

got the same behavior in FF 62.0.3 (64 bit) iframe keeps immediately closing after some 2 hours of using in my project. only thing that help is going to stackedit.io/app and click on reset application. so it is probably some application cache. is there any way to avoid this? in chrome its working good all the time.

update: i have found the main problem. when i open file for editing on my site, 4 new rows are added to indexed db (for domain stackedit.io). so, when i edit this file like 12 times, there is about 50 lines in indexed db, and iframe with editor stops working. (probably because it cant put more rows to indexed db). when i delete all rows in indexed db for stackedit.io, iframe editor works again. i think, it shouldnt add new rows, when you start edit file, but update old rows, or delete previous. mr. benweet, are you going to do something with this? or is there any setting in openFile, which i missed?

another solution would be, to delete indexed db, on close event.

pohadkar avatar Oct 13 '18 16:10 pohadkar

same as @pohadkar with FF 62.0.3 64bit, both on Win and Linux. At first I didn't encounter the problem, but after loading a dev project today again, exactly as described. 12 edits kill stackedit.

killua-eu avatar Oct 15 '18 23:10 killua-eu

Thank you, @pohadkar! This seems to be the problem indeed. Can anyone come up with a patch?

abartov avatar Jul 26 '19 14:07 abartov

Experiencing this on Safari 13.0.5

shaunbruno avatar Mar 13 '20 03:03 shaunbruno

Experiencing on Chrome 81, just installed onto website

Puyodead1 avatar Apr 12 '20 07:04 Puyodead1