Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

problems with Electrum 1.9.5 on MacOSX #454

Closed
tessus opened this issue Nov 23, 2013 · 22 comments
Closed

problems with Electrum 1.9.5 on MacOSX #454

tessus opened this issue Nov 23, 2013 · 22 comments
Labels

Comments

@tessus
Copy link
Contributor

tessus commented Nov 23, 2013

Electrum 1.9.5 behaves very strangely. I can start it, but electrum wants to connect to sn_0_28715873 on TCP port 1080. What is sn_0_28715873 and where's the domain name? Also, I'm using SSL w/o any proxies, so why does electrum want to connect to a socks port?
I can see my wallet, but electrum is not connected (although I allow all connections from electrum, even turned of the outbound fw for testing). When I try to open the network window, I get the following errors and the window does not open:

23.11.13 12:52:31 [0x0-0x1b61b60].org.pythonmac.unspecified.Electrum[53217] Traceback (most recent call last):
23.11.13 12:52:31 [0x0-0x1b61b60].org.pythonmac.unspecified.Electrum[53217] File "/Applications/Electrum.app/Contents/Resources/lib/python2.7/gui/qt/main_window.py", line 2137, in run_network_dialog
23.11.13 12:52:31 [0x0-0x1b61b60].org.pythonmac.unspecified.Electrum[53217] NetworkDialog(self.wallet.network, self.config, self).do_exec()
23.11.13 12:52:31 [0x0-0x1b61b60].org.pythonmac.unspecified.Electrum[53217] File "/Applications/Electrum.app/Contents/Resources/lib/python2.7/gui/qt/network_dialog.py", line 169, in init
23.11.13 12:52:31 [0x0-0x1b61b60].org.pythonmac.unspecified.Electrum[53217] self.proxy_mode.setCurrentIndex(self.proxy_mode.findText(str(proxy_config.get("mode").upper())))
23.11.13 12:52:31 [0x0-0x1b61b60].org.pythonmac.unspecified.Electrum[53217] AttributeError: 'str' object has no attribute 'get'

I'm using MacOSX 10.6.8 and Electrum 1.9.4 worked just fine.

@ecdsa
Copy link
Member

ecdsa commented Nov 24, 2013

I changed the link to 1.9.4 on the download page, until this is resolved

@rdymac
Copy link
Contributor

rdymac commented Nov 24, 2013

On OSX 10.8.5 running the Mac App from Terminal works smoothly but directly clicking the App keep it as disconnected. On OSX 10.9 works correctly.

I reported it to @maran to se if it is some .plist config problem.

@wozz
Copy link
Contributor

wozz commented Nov 24, 2013

if it's a plist config issue, logging out and logging back in again will reload the plist configurations. When you just install the app from the dmg file, it doesn't necessarily reload the plist configs.

Not sure if this is the issue, but I got the issue with connecting the first time and now I am not getting the same issue anymore. I wasn't able to get a traceback because it only happens when run from the app directly.

@rdymac
Copy link
Contributor

rdymac commented Nov 24, 2013

#455 and #448 are related (or duplicates) to this issue

@wozz
Copy link
Contributor

wozz commented Nov 26, 2013

I can reproduce this issue if I run from the command line like this:

python electrum -p socks5:localhost:9150 -s electrumupzx5w5f.onion:8082:g -1 -v

If I just run:

python electrum

I get no error on the network dialog.

Still looking into it....

@ldenman
Copy link

ldenman commented Dec 17, 2013

Confirming still broken on stable 1.9.6 from DMG. Very strange behaviour. Double clicking the Electrum.app icon opens the app and does not connect. However, running ./Electrum.app/Contents/MacOS/Electrum from Terminal does connect.

@adamipc
Copy link

adamipc commented Dec 17, 2013

After running Electrum from terminal, opening via the icon does appear to work. But it won’t connect until you’ve run it from terminal at least once.

On Tuesday, December 17, 2013 at 9:40 AM, Lake Denman wrote:

Confirming still broken on 1.9.6. Very strange behaviour. Double clicking the Electrum.app icon opens the app and does not connect. However, running ./Electrum.app/Contents/MacOS/Electrum from Terminal does connect.


Reply to this email directly or view it on GitHub (#454 (comment)).

@tessus
Copy link
Contributor Author

tessus commented Dec 17, 2013

@ldenman Same here. Running from the terminal as /Applications/Electrum.app/Contents/MacOS/Electrum works for me as well.
Unfortunately this does not really solve my problem, if I click on a bitcoin URL and Electrum is not running.

@adamipc Nope, even after I opened it manually via the terminal, Electrum will still not connect when I start it via double click.

@ldenman
Copy link

ldenman commented Dec 17, 2013

@tessus Same here. I tried @adamipc's use case but could not reproduce. This is on OS X 10.8.5.

@wozz
Copy link
Contributor

wozz commented Dec 17, 2013

@tessus do you get any errors in the Console when you double click the icon?

@tessus
Copy link
Contributor Author

tessus commented Dec 17, 2013

I don't think it is OS version related. I'm on 10.6.8, but I also have a 10.9.0 on an external hard disk.

I have a feeling that some sort of a socksified stack made it somehow into the package, although this still wouldn't explain why it works from the terminal. This is truly a strange problem.

@tessus
Copy link
Contributor Author

tessus commented Dec 17, 2013

@wozz no, until I click on the network tab. Then I get the following output:

Dec 17 13:12:01 epsilon [0x0-0x14f94f8].org.pythonmac.unspecified.Electrum[26967]: Traceback (most recent call last):
Dec 17 13:12:01 epsilon [0x0-0x14f94f8].org.pythonmac.unspecified.Electrum[26967]:   File "/Users/tessus/Applications/Electrum.app/Contents/Resources/lib/python2.7/gui/qt/main_window.py", line 2167, in run_network_dialog
Dec 17 13:12:01 epsilon [0x0-0x14f94f8].org.pythonmac.unspecified.Electrum[26967]:     NetworkDialog(self.wallet.network, self.config, self).do_exec()
Dec 17 13:12:01 epsilon [0x0-0x14f94f8].org.pythonmac.unspecified.Electrum[26967]:   File "/Users/tessus/Applications/Electrum.app/Contents/Resources/lib/python2.7/gui/qt/network_dialog.py", line 169, in __init__
Dec 17 13:12:01 epsilon [0x0-0x14f94f8].org.pythonmac.unspecified.Electrum[26967]:     self.proxy_mode.setCurrentIndex(self.proxy_mode.findText(str(proxy_config.get("mode").upper())))
Dec 17 13:12:01 epsilon [0x0-0x14f94f8].org.pythonmac.unspecified.Electrum[26967]: AttributeError: 'str' object has no attribute 'get'

@tessus
Copy link
Contributor Author

tessus commented Dec 20, 2013

I tried to build it myself and after some issues (which @maran helped to solve) I was able to build it from the zip file. Building from git is failing with 'aes missing', although I have installed py-crypto.

Unfortunately I still have the same problem. I'm not a python developer, so I'm not much of a help debugging this issue.
Something happened after 1.9.4 which makes Electrum trying to connect to port 1080. The network window cannot be opened and Electrum will not connect. This only happens when Electrum is started via a double click.
Starting Electrum via the terminal works.

We need to figure out what the difference is between starting Electrum via double click and via terminal. This should help narrowing down this problem.

@wozz
Copy link
Contributor

wozz commented Dec 20, 2013

@tessus, I think the difference with aes is to install slowaes instead of py-crypto. I believe you can do that with "pip install slowaes"

The main difference between Electrum starting from double click and via terminal is the Info.plist file (which sets up the environment when run from double click), so perhaps that's what we should focus on. This is where it's created: https://github.com/spesmilo/electrum/blob/master/setup-release.py#L28

Maybe it needs another config setting in that file to make it work properly.

@ldenman
Copy link

ldenman commented Dec 20, 2013

I wonder if this helps at all... I notice when I do this, it connects:

open -a ~/Desktop/Electrum.app/Contents/MacOS/Electrum --args -1

But this (which is the same as double clicking the icon) doesn't:

open -a ~/Desktop/Electrum.app/Contents/MacOS/Electrum

edit:

Actually, this works too:

open -a ~/Desktop/Electrum.app/Contents/MacOS/Electrum --args -v

It seems like any valid args that are passed makes it work.... weird.

@tessus
Copy link
Contributor Author

tessus commented Dec 20, 2013

@wozz there is no slowaes package on MacPorts, so I used pip-2.7 install slowaes, but got the following error:

Downloading/unpacking slowaes
  Could not find a version that satisfies the requirement slowaes (from versions: 0.1a1)

I looked at the Info.plist files for 1.9.4 and 1.9.6. There are almost no differences, whereas the most noticeable one is argv_emulation. I even changed the 1.9.6 Info.plist to use the exact same settings as on 1.9.4 (also tried to just use 1.9.4's Info.plist file).
None of these things worked.

I think @ldenman seems to be on the right track. I assume that the argument parsing got screwed up after adding the bitcoin URL code.

@wozz
Copy link
Contributor

wozz commented Dec 20, 2013

@tessus, when you change the argv_emulation, it still doesn't work? Also, when you change the plist file, you need to log out and log back in for OSX to properly load those settings. Just restarting the program won't necessarily run with the new settings.

@tessus
Copy link
Contributor Author

tessus commented Dec 20, 2013

@wozz I didn't logout/login, because changing the Info.plist file usually works with ObjectiveC code w/o having to re-login - at least in my experiences.
But I can try that as well. I just have too many programs running at the moment to logout. I'll do that tomorrow. I'll also try to debug the arguments code then.

@wozz
Copy link
Contributor

wozz commented Dec 20, 2013

@tessus, yeah I didn't want to test it either because I have other things running :) ... although I'm not sure if it's even broken on mine. I typically run it by using a QuickSilver shortcut though, so maybe it gets started differently.

I'm restarting now to install some updates anyway, so I'll see if I can duplicate it and then hopefully fix it.

@tessus
Copy link
Contributor Author

tessus commented Dec 20, 2013

Good luck. I'll give it a shot tomorrow.

@ldenman
Copy link

ldenman commented Dec 21, 2013

Good on you @tessus.

@tessus
Copy link
Contributor Author

tessus commented Dec 21, 2013

@wozz sent my pledged reward for #209 - transaction info

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants