kotelnik / firefox-extension-unity-launcher-api-e10s

Unity LauncherAPI add-on for Firefox, compatible with e10s.
GNU General Public License v3.0
5 stars 1 forks source link

Not working on Fedora 25 #1

Closed Lemmiwinks closed 7 years ago

Lemmiwinks commented 7 years ago

I tried to get this to work in Fedora 25 on KDE Plasma 5.8.4 by following your instructions on https://addons.mozilla.org/en-US/firefox/addon/unity-launcher-api-addon-e10s but it simply does not show the progress and download count in the task bar. Any idea what I'm doing wrong?

kotelnik commented 7 years ago

Please try this to narrow down the problem: 1) Restart Firefox 2) Go to about:debugging page 3) Click Debug button next to the add-on 4) Then you'll need to press ok to connect to debugger -> javascript console should show up 5) Now download a file. 6) Javascript console should write messages like:

Look for errors there - error 'File closed' is fine, ignore it. But error 'File at path "/home/username/.mozilla/native-messaging-hosts/launcher_api_firefox_stdin.py" does not exist, or is not executable' is helpful. Feel free to post the console log so I can try to analyze the problem.

Few more things to check:

Lemmiwinks commented 7 years ago

Thanks for your quick and detailed reply! Ok I followed your instructions on debugging the addon and here are the results from the java script console:

postMessage("count=1") background.js:5:5 postMessage("progress=0.001") background.js:5:5 Error parsing native host manifest /home/andy/.mozilla/native-messaging-hosts/launcher_api_firefox_stdin.py.json: JSON.parse: unexpected character at line 5 column 1 of the JSON data NativeMessaging.jsm:111 _tryPath/< resource://gre/modules/NativeMessaging.jsm:111:11 GET http://vx2-downloads.raspberrypi.org/raspbian/images/2012-08-16-wheezy-raspbian/2012-08-16-wheezy-raspbian.zip [Mixed Content] [HTTP/1.1 200 OK] No such native application launcher_api_firefox_stdin.py NativeMessaging.jsm:188 this.NativeApp</this.startupPromise< resource://gre/modules/NativeMessaging.jsm:188:17 Error: No such native application launcher_api_firefox_stdin.py NativeMessaging.jsm:188:17 Error: Attempt to postMessage on disconnected port (unknown) Error: No such native application launcher_api_firefox_stdin.py NativeMessaging.jsm:188:17

kotelnik commented 7 years ago

Thanks! From to log I can see the problem. There is something wrong with the manifest file (launcher_api_firefox_stdin.py.json). In your case, it should contain this:

{
  "name": "launcher_api_firefox_stdin.py",
  "description": "Host for native LauncherAPI firefox calls.",
  "path": "/home/andy/.mozilla/native-messaging-hosts/launcher_api_firefox_stdin.py",
  "type": "stdio",
  "allowed_extensions": [ "firefox_extension_unity_launcher_api_e10s@kotelnik" ]
}

What it actually contain? Please check that there isn't missing quote (") or comma or somehing.

Lemmiwinks commented 7 years ago

I'm sorry, I somehow mixed up files yesterday, so the json file was a complete mess. Shouldn't do that late at night...

I corrected this now, but I get the following error:

GET http://vx2-downloads.raspberrypi.org/raspbian/images/2012-08-16-wheezy-raspbian/2012-08-16-wheezy-raspbian.zip [Mixed Content] [HTTP/1.1 200 OK] [object Object] NativeMessaging.jsm:218 this.NativeApp</this.startupPromise< resource://gre/modules/NativeMessaging.jsm:218:9 Error: Attempt to postMessage on disconnected port (unknown) [object Object] NativeMessaging.jsm:218 this.NativeApp</this.startupPromise< resource://gre/modules/NativeMessaging.jsm:218:9 Error: Attempt to postMessage on disconnected port (unknown) [object Object] and so on...

kotelnik commented 7 years ago

I assume that you've restarted Firefox after correcting the manifest file. So now I'm out of ideas what could be wrong. Can you please pack send me contents of your ~/.mozilla/native-messaging-hosts/ folder e.g. in tar.gz archive?

Lemmiwinks commented 7 years ago

Yes sure I did! native-messaging-hosts.tar.gz Here are my files! Thanks!

kotelnik commented 7 years ago

Thanks. The executable launcher_api_firefox_stdin.py file has wrong contents. It should contain this (sending corrected archive). native-messaging-hosts_fixed.tar.gz

Lemmiwinks commented 7 years ago

Thanks a lot! Now it works! Something went really wrong here. I don't understand right now, where I got the wrong files from. Anyway, thanks a lot!

kotelnik commented 7 years ago

NP, I'm glad it works :).