myplaceonline / myplaceonline_ffclipboard

Firefox clipboard addon
MIT License
0 stars 1 forks source link

window.ffclipboard undefined on Linux FF 30 and 38 #1

Open jytou opened 9 years ago

jytou commented 9 years ago

Hi, I've tried this plugin with both FF 30 and 38 and repeatedly get the same error: window.ffclipboard is undefined. The addon is installed and active, yet it doesn't seem to propagate to the main window. There are also no errors reported on the console from FF about anything in the plugin. Any clues? Thanks, JY.

kevgrig commented 9 years ago

Hmm, I'm on FF 37 (on Linux, 64-bit). I think we'll need to add some debug logging to see where it fails. Are you okay with me sending you debug XPIs?

jytou commented 9 years ago

Sure! You can send them to jytou at yahoo dot fr.

kevgrig commented 9 years ago

Hi, I found some time to look at this. First, you mentioned you tried FF 30. I can't find the reason why now, but my initial investigation made me write that FF 34 is required. I'll try to find the reason why that is, but for now, try your tests on FF 38.

In any case, while debugging, I found that the addon did not work on file:/// pages. Did you happen to test this on a file:/// page? Can you try the following test page?

http://myplaceonline.github.io/myplaceonline_ffclipboard/test.html

jytou commented 9 years ago

You're right, my problem occurs on local pages (for security reasons I'm not so keen on putting these pages anywhere else, actually). Do you think you can fix that particular problem some time? But now I'm trying your test page (on FF 38 linux 64bit) and I get the red failed box. I have debugged the plugin, we do get into the ffclipboard.js page and I see the ffclipboard variable in the sandbox, but after the call to createObjectIn, I never see ffclipboard in any window variable in the watches (except the sandbox - but that's your local variable) and the setText function never gets called after that (which is normal since window.ffclipboard is still undefined on the actual page anyway). You may want to have a look at this: https://bugzilla.mozilla.org/show_bug.cgi?id=1043958 (found from there: https://greasyfork.org/forum/discussion/877/a-couple-of-problems ). It seems to me that mozilla has put a lot of people into trouble with this createObjectIn change... Thanks!

kevgrig commented 9 years ago

The solution to it not working on a file:/// page is that the wildcard in PageMod include doesn't include file:, so I added that and it works. I followed the documentation on exposing the object, so I'll need to do some more investigation why it's not working for you, thanks for those links.