jlebon / textern

A Firefox add-on for editing text in your favourite external editor!
GNU General Public License v3.0
138 stars 21 forks source link

I'm getting "Error, this text is already being edited", can't see why at present #18

Closed chrisisbd closed 6 years ago

chrisisbd commented 6 years ago

I'm running xubuntu 16.04 which has Python 3.5.2. I've installed the extension in Firefox 57 and the local bit on my system (as root, i.e. for all users).

I just get the "Error, this text is already being edited" on second and subsequent CTRL-SHIFT-E.

How can I debug this? I've looked through what's here and I can't see anything that seems very relevant.

chrisisbd commented 6 years ago

Just to add a little I have tried with both xvile (my choice of GUI editor) and with gedit (the default choice, which I had to install specially) and the same thing happens with both.

xvile does actually have a server mode (like emacsclient) if that would make things any easier.

chrisisbd commented 6 years ago

Sorry to talk to myself so much! :-)

I have looked through issue 7 now, still not working.

I created a script "["sh", "-c", "echo foobar > $0"]" but that doesn't run as written, I had to change it to:-

sh -c "echo foobar > $0"

to make it runnable. Am I misunderstanding something fundamental here?

Anyway, with either version of the above script installed as 'myedit' in my home bin directory and with the editor in textern set to "/home/chris/bin/myedit" absolutely nothing happens on first CTRL/SHIFT/E and then I get the same old error message on subsequent ones.

jlebon commented 6 years ago

I created a script "["sh", "-c", "echo foobar > $0"]" but that doesn't run as written, I had to change it to:-

sh -c "echo foobar > $0"

Right, the script is meant to be used directly in the "External Editor" field to check that the native app is correctly set up.

Although, this sounds a lot like #14. Can you check for any errors in the browser console (Ctrl+Shift+J), as well as try to install the native app for the local user only (make native-install USER=1)?

chrisisbd commented 6 years ago

Yes, OK, after trying it I suspected that this might be the case.

I've installed textern for local user only on another system (running a newer xubuntu - 17.10) and it works there. So I have it working on one system now. It's rather late so I'll go back to the other system tomorrow and see if it works when installed for local user and if there are any errors.

Thanks for the feedback.

chrisisbd commented 6 years ago

OK, back now next day. I've tried a local install back on the xubuntu 16.04 system and it still doesn't work.

In the Browser Console I see:- Error: document id 4_0 is already being edited background.js:84:9 The resource at "https://www.google-analytics.com/r/collect" was blocked because tracking protection is enabled.[Learn More] textern Error: document id 4_0 is already being edited background.js:84:9 Error: document id 4_1 is already being edited background.js:84:9 Content Security Policy: Ignoring ‘x-frame-options’ because of ‘frame-ancestors’ directive. (unknown) The resource at "https://www.google-analytics.com/collect" was blocked because tracking protection is enabled.[Learn More]

It's not tracking protection causing the problem is it? I'm pretty sure I have tracking protection turned on in the system where it's working.

chrisisbd commented 6 years ago

No, it's not tracking protection causing the problem, I just tried turning it off and it made no difference.

I've looked at the locally installed files and they seem identical on both systems. The system where it does work is a laptop running xubuntu 17.10 and the one where it doesn't work is a desktop machine running xubuntu 16.04. Is it possible that textern requires a modern/up-to-date version of something that's just a bit too old on 16.04?

chrisisbd commented 6 years ago

OK, I found the problem! :-)

My Download directory had got misconfigured somehow in Firefox (or at least textern was getting it wrong somehow). I've temporarily changed it to a directory that exists and now everything works as it should.

I found this by comparing the 'good' firefox with the 'bad' one and also by a bit of javascript debugging.

If this could somehow be trapped it would be useful.

chrisisbd commented 6 years ago

OK, closed