Bitcoin URIs don't work on Mac #209

Closed
Jaxkr opened this Issue May 2, 2013 · 49 comments

Projects

None yet

7 participants

@Jaxkr
Jaxkr commented May 2, 2013

Not completely sure why they aren't supported.
Bitcoin URIs are becoming more and more popular, and Electrum is by far my favorite client. However, its one downfall is that it lacks support for these convenient URIs on computers running OSX.

@clehner
Contributor
clehner commented May 23, 2013

👍 This would be a useful feature for Electrum. MultiBit has had it for a while.

@maran maran was assigned Jun 17, 2013
@maran
Member
maran commented Jun 17, 2013

Agreed this could be helpful; I will see if I can make the OS X binaries support this.

@maran
Member
maran commented Jun 17, 2013

I got it to work on my system. I've build this binary for you to test it out. Please let me know if it works for you. (Tested it on Chrome and Safari)

@clehner
Contributor
clehner commented Jun 18, 2013

I tried the binary and had mixed results. It did not seem to register the URI scheme; clicking bitcoin: links still opened MultiBit and Chrome did not give an option for Electrum. From the command line, running open -a Electrum bitcoin:... works, opening and populating the send interface, but only if the Electrum application is not already running.

@maran
Member
maran commented Jun 18, 2013

I think in your case Electrum and MultiBit are fighting for the rights to open URI scheme. I don't have multibit installed and Safari just opens up my links in Electrum now. Without having to register it for the bitcoin URI scheme first. Chrome might have asked me what to open it with but I can't be sure.

I think the way OS X works is checking if an app is already running; if it's not it will boot it with the given arguments (bitcoin:.....) but if it's already running it just won't do anything, since it won't boot the application twice. I need to ascertain if this indeed the case or something else goes wrong.

@maran
Member
maran commented Jun 18, 2013

I'm sorry but I can't find a way to make this work when Electrum is already running. I will leave this open to see if anybody else steps up.

@tessus
Contributor
tessus commented Aug 11, 2013

This still doesn't seem to work with the latest release (1.8.1).

Any update on this topic?

@maxme maxme added a commit to maxme/electrum that referenced this issue Aug 11, 2013
@maxme maxme Add a Qt eventFilter to listen for QFileOpenEvent
fix #209
b2ebd35
@maran
Member
maran commented Aug 12, 2013

I had to rebuild the 1.8.1 binary without support for URIs because it did
not want to boot anymore. I will try to fix it again in the next release.
Op 11 aug. 2013 03:51 schreef "Helmut Tessarek" notifications@github.com
het volgende:

This still doesn't seem to work with the latest release (1.8.1).

Any update on this topic?


Reply to this email directly or view it on GitHubhttps://github.com/spesmilo/electrum/issues/209#issuecomment-22450857
.

@tessus
Contributor
tessus commented Aug 12, 2013

Thanks for the info and please try to fix it asap. It is a little bit akward to copy and paste bitcoin addresses into Electrum.
Multibit had this working from almost the beginning. No worries, I won't switch to another client. :-)

Cheers,
Helmut

"Maran H." notifications@github.com wrote:

I had to rebuild the 1.8.1 binary without support for URIs because it
did
not want to boot anymore. I will try to fix it again in the next
release.
Op 11 aug. 2013 03:51 schreef "Helmut Tessarek"
notifications@github.com
het volgende:

This still doesn't seem to work with the latest release (1.8.1).

Any update on this topic?


Reply to this email directly or view it on
GitHubhttps://github.com/spesmilo/electrum/issues/209#issuecomment-22450857
.


Reply to this email directly or view it on GitHub:
#209 (comment)

@ecdsa ecdsa closed this in #268 Aug 13, 2013
@maran maran reopened this Aug 19, 2013
@harningt harningt added a commit to harningt/electrum that referenced this issue Sep 4, 2013
@maxme @harningt maxme + harningt Add a Qt eventFilter to listen for QFileOpenEvent
fix #209
5dba745
@tessus
Contributor
tessus commented Nov 10, 2013

Bitcoin URIs still don't work on Mac in version 1.9.

Seriously, is this ever going to change? This is open for over 6 months now. I can't believe that nobody cares. Sorry, I'm exaggerating to make a point. But if somebody had cared more, this would have been fixed by now.

@maran
Member
maran commented Nov 10, 2013

I can't make it work properly. Feel free to give it a go and submit a pull request.

@tessus
Contributor
tessus commented Nov 10, 2013

I would, if I could. I'm a C/C++/Objective-C guy, so I have no clue how to do this with python and/or Qt.

@mkramlich
Contributor

tessus, I'm speaking only for myself, nobody else, but since it's software you've received for free, and most of the people who did the work to make it available to you are also working for free, you might get better results if you offer to pay somebody to add that feature. you might get lucky and somebody ends up getting that working soon anyway, for free, and that would be great. but this is a suggestion to try. I know many of us have many competing concerns for our time, other projects, paying work, family, etc.

@tessus
Contributor
tessus commented Nov 10, 2013

@mkramlich this is not a bad idea, but here's the thing. in Objective-C Xcode projects this is done in 5 minutes, so how would I even measure this for this project? I have no idea, how much a fair compensation would be.
some people have already tried to fix this, so I assume that doing this in python/Qt is not that trivial. in any case: 5 min in C compared to how many minutes in python? kind of hard to put a price tag on that.

@maran
Member
maran commented Nov 10, 2013

I'm not a Python developer by day so perhaps it's five minutes work for a veteran but I spend multiple hours into this trying to make all the parts play nice but I couldn't make it work in a reliable fashion. @mkramlich I like your idea I will pitch in 0.5 BTC for a fully functional pull request that has proper URI support for OS X. @tessus if this is import for you perhaps you pledge some coins as well.

@ecdsa
Member
ecdsa commented Nov 10, 2013

I don't think it is a python issue. The problem is probably caused by the macox builds

@maran
Member
maran commented Nov 10, 2013

It's not a python issue. It's a problem with the way OS X deals with packaged (py2app) Python apps and URI information.

@mkramlich
Contributor

@tessus agreed it's hard to know how long it would take, where the fault lies (or personally whether it's even possible --though I assume so). the bounty idea may be best. as @maran suggested

@mkramlich
Contributor

@maran i have not dig into this issue yet, but from my experience making distributable Python apps for Win/Mac/Linux in the past, your theory sounds good

@tessus
Contributor
tessus commented Nov 11, 2013

I'll pitch in with 0.3 BTC as well (0.5 BTC, if it is available tomorrow). I know that @maran spent several hours on solving this problem, which tells me that it is harder than it would be in Objective-C.
As I said before, I am neither a python packager nor a sophisticated python programmer, so I have to rely on others to fix this. I could look into this myself, but--to be honest--I'm not too interested in python.
But I can check out the examples @wozz provided next week.

@wozz
Contributor
wozz commented Nov 11, 2013

I have a broken QT or PyQT install at the moment; once I fix that, I can work on this

This was referenced Nov 11, 2013
@maran
Member
maran commented Nov 13, 2013

@wozz supplied a (for me working) pull request with proper URI support. Hurray!

I've build a version of this pull request so that others here can try it out, @tessus, and others please report back if it works.

Electrum master (signature)

My fingerprint can be found here.

@tessus
Contributor
tessus commented Nov 13, 2013

@maran thanks, just tried to run it, but I get the following error:

13.11.13 7:54:04 [0x0-0xe25e25].org.pythonmac.unspecified.Electrum[997] Traceback (most recent call last):
13.11.13 7:54:04 [0x0-0xe25e25].org.pythonmac.unspecified.Electrum[997] File "/Users/tessus/Applications/Electrum.app/Contents/Resources/electrum.py", line 162, in
13.11.13 7:54:04 [0x0-0xe25e25].org.pythonmac.unspecified.Electrum[997] File "/Users/tessus/Applications/Electrum.app/Contents/Resources/lib/python2.7/gui/qt/init.py", line 32, in
13.11.13 7:54:04 [0x0-0xe25e25].org.pythonmac.unspecified.Electrum[997] File "PyQt4/QtGui.pyc", line 14, in
13.11.13 7:54:04 [0x0-0xe25e25].org.pythonmac.unspecified.Electrum[997] File "PyQt4/QtGui.pyc", line 10, in __load
13.11.13 7:54:04 [0x0-0xe25e25].org.pythonmac.unspecified.Electrum[997] ImportError: dlopen(/Users/tessus/Applications/Electrum.app/Contents/Resources/lib/python2.7/lib-dynload/PyQt4/QtGui.so, 2): no suitable image found. Did find:
13.11.13 7:54:04 [0x0-0xe25e25].org.pythonmac.unspecified.Electrum[997] /Users/tessus/Applications/Electrum.app/Contents/Resources/lib/python2.7/lib-dynload/PyQt4/QtGui.so: mach-o, but wrong architecture

@maran
Member
maran commented Nov 13, 2013

Which OS X are you on?

@tessus
Contributor
tessus commented Nov 13, 2013

@maran 10.6.8

@maran
Member
maran commented Nov 13, 2013

Ah.. Yeah that could be a problem since it's not 64bit. The QT version it's packaging is however 64 bit not sure I can change that. Will need to check that out.

@tessus
Contributor
tessus commented Nov 13, 2013

hmmm, but why can I run http://download.electrum.org/electrum-1.9.4.dmg w/o problems?

@maran
Member
maran commented Nov 13, 2013

I have no clue how that's possible. I see some commits since 1.9.4, perhaps one of those is the cause of it.

The error you pasted as I understand it is crying because QtGui.so is the wrong architecture. I have no clue what else it can be.

@wozz
Contributor
wozz commented Nov 13, 2013

Isn't this part of the build line:

ARCHFLAGS="-arch i386 -arch x86_64"

supposed to set it up for 64bit and 32bit?

@maran
Member
maran commented Nov 13, 2013

Yes.

On Wed, Nov 13, 2013 at 5:29 PM, wozz notifications@github.com wrote:

Isn't this part of the build line:

ARCHFLAGS="-arch i386 -arch x86_64"

supposed to set it up for 64bit and 32bit?


Reply to this email directly or view it on GitHubhttps://github.com/spesmilo/electrum/issues/209#issuecomment-28409386
.

@tessus
Contributor
tessus commented Nov 13, 2013

Also, I run 64 bit apps on my 10.6.8 all the time. I compile my own apps in 64bit only mode and they work just fine.

There must be something else going on. Usually I get errors like this, if I compile an app as 64bit and a dependent lib is only available in 32bit or vice versa.

@wozz
Contributor
wozz commented Nov 14, 2013

Whenever it gets tested fully and if anyone wants to send some coins: 1377uvCGJn5FsVvCXjC3uwfHXWon3G3nom

If it's not working yet, run it from the command line and post any tracebacks.

@maran
Member
maran commented Nov 15, 2013

@tessus Could you try building the app yourself since you mentioned that does work? I really want to close this and payout @wozz.

@tessus
Contributor
tessus commented Nov 15, 2013

@maran I don't have python/QT or a python development env installed. I compile C/C++ (Apache httpd, PHP, ffmpeg) and Objective-C (my own) projects. Thus I cannot build Electrum by myself. I guess I will have to wait for 1.9.5.
@wozz as soon as I have tested it successfully I'll send you my pledged BTC.

@maran
Member
maran commented Nov 15, 2013

The problem is that 1.9.5 won't work for you neither. I build this release the exact same way I build normal packages. Well almost the same, I realise I normally build it based on the tar.gz release. I will see if I can emulate that this weekend.

@tessus
Contributor
tessus commented Nov 15, 2013

If 1.9.5 won't work, I will have to open a ticket at that point. The problem might be the 'almost' part of how you build the package. In any case, Electrum worked for me until now and I don't see a reason why it shouldn't in the future.

@tessus
Contributor
tessus commented Nov 21, 2013

any update yet?

@wozz
Contributor
wozz commented Nov 21, 2013

I can upload my build version this evening if you want to test that. I can't promise it works on 32bit though.

@tessus
Contributor
tessus commented Nov 21, 2013

sounds good. but, why is everybody expecting I am running 32bit? Just because the 10.6.8 kernel is 32bit does not mean, I am running 32bit apps.

I'm running Electrum as a 64bit app.

screen shot 2013-11-21 at 15 17 13

The problem I experienced with @maran 's build has most likely to do with inconsistent compiling and/or linking.

@wozz
Contributor
wozz commented Nov 21, 2013

Oh, I was just going by the other comments. Not sure... I may have an older system I can test on if this is a real issue (not just a linking issue), but it would be at least next week before I could get that system set up with a build env.

@maran
Member
maran commented Nov 23, 2013

I just build 1.9.5 using the 'normal' build process.

You can download it here (signature)

Please let me know if this works so I can finally pay Wozz's bounty, which thanks to the crazy market, is now a pretty nice payoff 👍

@tessus
Contributor
tessus commented Nov 23, 2013

@maran this version does not work. it 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 allow the connection, but nothing happens and electrum is not connected. 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'

@maran
Member
maran commented Nov 23, 2013

I just make the OS X binaries. Sounds like you need to raise a issue.
Op 23 nov. 2013 18:58 schreef "Helmut Tessarek" notifications@github.com:

@maran https://github.com/maran this version does not work. it 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 allow the connection, but nothing happens and electrum is not connected.
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'


Reply to this email directly or view it on GitHubhttps://github.com/spesmilo/electrum/issues/209#issuecomment-29137603
.

@tessus
Contributor
tessus commented Nov 23, 2013

opened ticket #454

@maran
Member
maran commented Dec 17, 2013

@wozz I'm happy with the patch, it has been working fine for me. Please confirm that 1377uvCGJn5FsVvCXjC3uwfHXWon3G3nom is still the address you wish to receive the bounty on.

@tessus Could you try this new binary release: http://download.electrum.org/electrum-1.9.6.dmg I removed some Info.plist details which I hope fix your problems.

@tessus
Contributor
tessus commented Dec 17, 2013

@maran no, I have the same problem as with version 1.9.5.

As soon as I start it via double click, Electrum tries to connect to sn_0_21730488 on TCP port 1080. That's why I opened ticket #454.

@wozz
Contributor
wozz commented Dec 17, 2013

@maran, yes: 1377uvCGJn5FsVvCXjC3uwfHXWon3G3nom

Thanks!

@maran
Member
maran commented Dec 17, 2013

Transaction underway

Thanks again for adding this in, much appreciated.

@maran maran closed this Dec 17, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment