slgobinath / uget-chrome-wrapper

Moved to https://github.com/ugetdm/uget-integrator and https://github.com/ugetdm/uget-extension
GNU General Public License v3.0
75 stars 14 forks source link

Unable to connect to the uget-chrome-wrapper #15

Closed UncleInf closed 7 years ago

UncleInf commented 7 years ago

When using chrome or opera getting error: Error: Unable to connect to the uget-chrome-wrapper

Windows 7 x64 Chrome 56 Plugin reinstalled v2 Extention reinstalled v2

Before updating extention worked on chrome.

slgobinath commented 7 years ago

Hi, Have you updated the Python to 3.4 or latest? That is the major change with v 2.

UncleInf commented 7 years ago

Yes, I have python3 installed

python --version
Python 3.5.1

Running: python uget-chrome-wrapper.py launches without problem.

slgobinath commented 7 years ago

Then it seems to be a problem. Please check if you double click the C:\Program Files (x86)\uget-chrome-wrapper\uget-chrome-wrapper.py whether it opens in Python console or text editor (The default application to open .py files must be Python). I hope the uget bin folder is added to the PATH variable. Meanwhile, I will test it on Windows 7 (I have tested on Windows 10 64bit. It is working properly)

Thanks

slgobinath commented 7 years ago

Thanks for reporting the bug. This bug occurs in lower versions of Python due to my fault. I'll release the fix soon. Sorry for the trouble.

slgobinath commented 7 years ago

A new version uget-chrome-wrapper_2.0.2.exe is released. Could you please let me know whether you problem has been resolved with this fix.

Thanks

UncleInf commented 7 years ago

I've tried the updated version, but the problem remains.

Tried with opera (uGet Integration Version 2.0.3) and chrome on win7 x64. Updated python script VERSION = "2.0.2"

slgobinath commented 7 years ago

Hi, In the previous script, there was a problem with lower Python version but with the new version, it should be fixed. Please ensure that Python is the default application to open .py extensions. In other words, if you double click the uget-chrome-wrapper.py, it should run as a Python application.

UncleInf commented 7 years ago

Hello,

I've double checked everything and it seems like the problem remains, atleast on my system. Double clicking uget-chrome-wrapper.py opens up cmd window for a brief moment, also on properties windows say it opens up with: python.exe

slgobinath commented 7 years ago

Alright. I'll try my best to reproduce this issue and let you know.

slgobinath commented 7 years ago

Hi @UncleInf, I faced a similar problem with Firefox in Windows and changed the way to connect the Python script in v2.0.4. Could you please test the new version and let me know whether it resolves your problem.

Note: From 2.0.4, you need to add Python to the system PATH. Thanks

nithinmurali commented 7 years ago

Hi, I am facing same issue in Ubuntu 14.04, Chrome 56. I have python3.x installed (but not default).

slgobinath commented 7 years ago

Hi @nithinmurali, I couldn't reproduce this in my Ubuntu 14.04 VM with Python 3.4.3.

python3 -V

Still I am unable to reproduce in Windows 10.

beew commented 7 years ago

Same problem here. Ubuntu 16.04 fully up to date. Tried on both Chrome (59.0.3071.86) and Opera (45.0) have python 3.5.1 installed from the standard repository.

slgobinath commented 7 years ago

@beew, Thanks for reporting the bug but I am clueless on the issue as I am unable to reproduce in my testing environments. Could you please enable logging by following these steps and share the log in the comment.

  1. Open uget-chrome-wrapper
    sudo gedit /usr/bin/uget-chrome-wrapper
  2. Uncomment the following two lines and save the changes
    # log_file_path = join(expanduser('~'), 'uget-chrome-wrapper.log')
    # logging.basicConfig(format='%(asctime)s [%(levelname)s]: %(message)s', filename=log_file_path, filemode='a', level=logging.DEBUG)

    After uncommenting, it should become:

    log_file_path = join(expanduser('~'), 'uget-chrome-wrapper.log')
    logging.basicConfig(format='%(asctime)s [%(levelname)s]: %(message)s', filename=log_file_path, filemode='a', level=logging.DEBUG)
  3. Open the browser and share the content of ~/uget-chrome-wrapper.log
beew commented 7 years ago

Hi, I am terribly sorry. I have goofed. I thought it is just a browser addon like downthemall for firefox, so I have just installed the uget integration via the browser. I didn't know I have to install uget-chrome-wrapper separately. Now I have done that and the error goes away.

slgobinath commented 7 years ago

Hi @beew, No worries :-).

@UncleInf and @nithinmurali could you please send me the log in your system?

Thanks

UncleInf commented 7 years ago

I have tried latest release (2.0.4) and my problem seem to be gone - very good! Do you still need logs from my system?

slgobinath commented 7 years ago

@UncleInf then no need. Thanks for updating. I am closing this issue.

nithinmurali commented 7 years ago

I got it working too. Thanks :)

cacophobe commented 7 years ago

Thank you for making this :-)

I am facing this issue on Firefox, even though it works with the same installation configuration, on the same computer, in Chromium.

Any help would be greatly appreciated.

saidbakr commented 7 years ago

I have the same issue with Chrome Version 59.0.3071.115 (Official Build) (64-bit) On Ubuntu 16.04 64bit with Xfce4. uGet Chrome plugin version 2.0.4 and uGet 2.0.9

By the way /usr/bin/uget-chrome-wrapper is not found.

slgobinath commented 7 years ago

@saidbakr how dod you install the uget-chrome-wrapper? Could you please uninstall it and install again and let me know the result.

slgobinath commented 7 years ago

@cacophobe your bug report has been confirmed. I will check this and release the fix soon.

Thanks for reporting.

PS: Suddenly it starts working without any changes. I will continue testing and let you know the issue.

KhogaEslam commented 7 years ago

@slgobinath I have same problem too on Ubuntu 17.04 and chrome browser

slgobinath commented 7 years ago

@KhogaEslam Could you please enable logging by following these steps and share the log in the comment.

  1. Open uget-chrome-wrapper
    sudo gedit /usr/bin/uget-chrome-wrapper
  2. Uncomment the following two lines and save the changes
    # log_file_path = join(expanduser('~'), 'uget-chrome-wrapper.log')
    # logging.basicConfig(format='%(asctime)s [%(levelname)s]: %(message)s', filename=log_file_path, filemode='a', level=logging.DEBUG)

    After uncommenting, it should become:

    log_file_path = join(expanduser('~'), 'uget-chrome-wrapper.log')
    logging.basicConfig(format='%(asctime)s [%(levelname)s]: %(message)s', filename=log_file_path, filemode='a', level=logging.DEBUG)
  3. Open the browser and share the content of ~/uget-chrome-wrapper.log
slgobinath commented 7 years ago

@cacophobe, @KhogaEslam, @saidbakr I have opened a new issue #20 with clear instructions. If you couldn't resolve the problem, please share the uGet version, Browser name and version and the Operating System with version along with the log.

This issue is closed permanently.

mbol8309 commented 7 years ago

i'm getting the same error, i have installed fedora 25, vivaldi 1.10.867.48 (Stable channel) (64-bit), followed the steps in installation guide, enable logging and there is no file uget-chrome-wrapper.log. any tips?

slgobinath commented 7 years ago

Hi @mbol8309,

Please check whether you have the file com.javahelps.ugetchromewrapper.json in

/etc/chromium/native-messaging-hosts/com.javahelps.ugetchromewrapper.json
mbol8309 commented 7 years ago

yes : ll /etc/chromium/native-messaging-hosts/com.javahelps.ugetchromewrapper.json -rw-r--r-- 1 root root 1177 Jul 18 22:50 /etc/chromium/native-messaging-hosts/com.javahelps.ugetchromewrapper.json but that directory i have to creat it..... i don't know if vivaldi uses that

slgobinath commented 7 years ago

The parent directory is not created by default. If all the following files are available, it should work in Vivaldi.

(Need to restart the browser after installing the files)

If it doesn't resolve the problem, I will test it in my Fedora virtual system and let you know.

mbol8309 commented 7 years ago

please test or tell me how to enable vivaldi log, so i can search my self, i know is not your concern vivaldi logs, but i followed the steps and restarted vivaldi several times and enable logging but there is no log file. any tips would help.

PD: sorry for my english, my natural language is spanish

slgobinath commented 7 years ago

Run Vivaldi from the Terminal using the following command:

vivaldi --remote-debugging-port=9222

Then visit this URL in the browser: localhost:9222 and click on the uGet Integration extension link.

No worries about the language. I am also not a native English speaker and have the same problem :-)

mbol8309 commented 7 years ago

for what i see, he can't find the wrapper

function getInfo() {
    if (ugetWrapperNotFound || !ugetChromeWrapperVersion) {
        return "Error: Unable to connect to the uget-chrome-wrapper";

but i don't have the experience in debugging extensions, tomorrow i'll give another try

slgobinath commented 7 years ago

Hi @mbol8309, I have tested it on Fedora 26. I have installed the com.javahelps.ugetchromewrapper.json in the following path which is for Chrome but working for Vivaldi as well.

/etc/opt/chrome/native-messaging-hosts/com.javahelps.ugetchromewrapper.json

Please try to add the file in the /etc/opt/chrome/native-messaging-hosts and check the output.

mbol8309 commented 7 years ago

more testing....: in developer mode, when i tried to run sendMessageToHost('test') i get the following error:

Uncaught Error: Invocation of form runtime.sendNativeMessage(string, string, function) doesn't match definition runtime.sendNativeMessage(string application, object message, optional function responseCallback)
    at Object.normalizeArgumentsAndValidate (extensions::schemaUtils:112)
    at Object.<anonymous> (extensions::binding:411)
    at sendMessageToHost (background.js:359)
    at <anonymous>:1:1

maybe the erro is around here, because in the function callback is where ugetWrapperNotFound = (response==null)

mbol8309 commented 7 years ago

i need a way to debug the extension or undestand how it works so I can fix or see what is the problem. if can be possible write me to mbol8309@gmail.com so we did't full this post of developer talk.

slgobinath commented 7 years ago

@mbol8309, I have released a script to install uget-chrome-wrapper. Could you please try this solution:

wget https://raw.githubusercontent.com/slgobinath/uget-chrome-wrapper/master/build/linux/install_uget_chrome_wrapper.sh
sudo sh install_uget_chrome_wrapper.sh

Install the extension and restart the browser.