Author

Topic: Armory 0.95.1 refuses to launch on macOS Sierra 10.12.2 (Read 3049 times)

sr. member
Activity: 525
Merit: 282
Actually nope! 0.96 not available for Mac yet, just re downloads 0.95.1
Damn

Which version are you trying to run? The latest version (0.96.4 RC2) has the fix.

You're looking at the wrong website. https://btcarmory.com/ is the correct site now. Granted, 0.96.4 RC3 isn't up there (only final releases go up there), but please look around this forum a bit before writing that you can't find something.
legendary
Activity: 1120
Merit: 1012
Actually nope! 0.96 not available for Mac yet, just re downloads 0.95.1
Damn

Which version are you trying to run? The latest version (0.96.4 RC2) has the fix.

From where are you downloading?

https://bitcointalksearch.org/topic/0964-rc3-2754632
newbie
Activity: 27
Merit: 0
Actually nope! 0.96 not available for Mac yet, just re downloads 0.95.1
Damn

Which version are you trying to run? The latest version (0.96.4 RC2) has the fix.
newbie
Activity: 27
Merit: 0
aha I downloaded 0.95.1 for Mac , let me see if I can get the current version , 0.96.4 RC2 available for Mac??
mant thanks droark

Which version are you trying to run? The latest version (0.96.4 RC2) has the fix.
sr. member
Activity: 525
Merit: 282
Which version are you trying to run? The latest version (0.96.4 RC2) has the fix.
newbie
Activity: 27
Merit: 0
Sorry for the nube question but Ive just upgraded to Sierra and seriously need my armory up and running, won't launch.
How do I add this code to my MacBook Pro 17" ?

Armory definitely works for me on 10.12.2. Just sent and received coins today, actually. Smiley That said, can you do me a favor? Go to /Applications/Armory.app/Contents/MacOS/py/usr/lib/armory/armoryengine/ and edit ArmoryUtils.py at Line 1267. Once saved, start Armory and see if it finishes starting up.

Old:
Code:
LOGINFO('   Preferred Encoding    : ' + locale.getpreferredencoding())

New:
Code:
prefEnc = locale.getpreferredencoding()
if prefEnc == None:
   if os.environ.get('LC_ALL', '').upper() == 'UTF-8':
      prefEnc = 'utf-8'
   else:
      prefEnc = 'Unknown'
LOGINFO('   Preferred Encoding    : ' + prefEnc)

EDIT: Added a suggested fix.
legendary
Activity: 3766
Merit: 1364
Armory Developer
Armory's dbdir. You have an older db that is incompatible with 0.95. You need to make sure no ArmoryDB binaries are running, delete that db and restart Armory.

These are the default paths on OSX:

https://github.com/goatpig/BitcoinArmory/blob/master/cppForSwig/BlockUtils.cpp#L717

In particular, this is the default datadir:

Code:
const string BlockDataManagerConfig::defaultDataDir_ = "~/Library/Application Support/Armory";

To get the default dbdir, you have append "/databases" to the datadir.
newbie
Activity: 6
Merit: 0
on macOs Sierra 10.12.2,

I accept the terms, then skip creating wallets, then it starts to load up database, etc., (Offline), and gives me this error:

"The DB has returned the following error:

DB version mismatch. Use another dbdir!

Armory will now shutdown."

(I did the ArmoryUtils.py local patch mentioned above).
Which dbdir it's referring to, I'm guessing the Armory databases dir not the Bitcoin-core dir right?
sr. member
Activity: 525
Merit: 282
@droark I'd like to request that more be built into the macOS app bundle rather than depend on a 3rd party installation to make this work.  The dependency on homebrew is too high a wall for entry for me personally.  The reason being is that I run other softwares that don't work when brew is present as it changes the dependency landscape.  I've had to clean install macOS to get back to stable and really have no desire to put brew back on this machine.  The app bundle already includes a mess of Python2.7 libraries, why not put it all in there.  Just a thought.  Thank you for the consideration.  

Hello. As mentioned before, including OpenSSL is possible. I just don't like it. If there is a security hole that affects the version of OpenSSL used by Armory, anybody using that version of Armory is hosed unless they upgrade. With self-packaging, that's really not possible. While unlikely, I really don't want to take that risk.

As for brew itself, I've found it to be relatively stable. It can get a bit weird. I've found that a lot of it seems to come from when people are told to perform crazy workarounds in order to get software running on systems where what's really needed is a proper software upgrade (whenever that comes out, if ever). In general, if one is careful, it's not that difficult to keep things clean.
newbie
Activity: 1
Merit: 0
@droark I'd like to request that more be built into the macOS app bundle rather than depend on a 3rd party installation to make this work.  The dependency on homebrew is too high a wall for entry for me personally.  The reason being is that I run other softwares that don't work when brew is present as it changes the dependency landscape.  I've had to clean install macOS to get back to stable and really have no desire to put brew back on this machine.  The app bundle already includes a mess of Python2.7 libraries, why not put it all in there.  Just a thought.  Thank you for the consideration. 
sr. member
Activity: 525
Merit: 282
I came across a problem on macOS Sierra. Summary: On a clean macOS Sierra installation, Armory 0.51.1 (the official binary) requires that the user first install Xcode and Homebrew and then do "brew install openssl".

Details:

(1) Install a clean macOS Sierra. (2) Upgrade the system through the App Store. In my case to 10.12.2. (3) Obtain and launch Bitcoin Core. In my case 0.13.2. (4) Obtain the official Armory 0.51.1 binary and try to launch it. In my case, this didn't work and the following error was logged at the bottom of ~/Library/Application Support/Armory/armorylog.txt

Code:
File "/Users/Doug/Downloads/BitcoinArmory-master/osxbuild/workspace/Armory.app/Contents/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/Twisted-16.3.0-py2.7-macosx-10.4-x86_64.egg/twisted/python/filepath.py", line 16, in
ImportError: cannot import name sha1

To fix this issue, this is what I did: (1) Installed Xcode 8.2.1, including its command line tools. (2) Installed Homebrew. (3) Did "brew install openssl".

After doing this, Armory.app launched fine.

I think it's not ideal that people have to do this to make Armory work.


Hello. This requirement is noted in the OSX README file. Python and Twisted require OpenSSL for certain functions, and the version included with OSX won't cut the mustard. So, the brew'ed version is a requirement. The only thing we could do is make Armory a bit more bloated and pack in an OpenSSL shared library that Python uses. I've thought about doing that but haven't implemented it yet. (Honestly, I'm sorely tempted to just move as much as possible to brew.) That and I don't like the idea of a static version of OpenSSL if there ends up being a catastrophic security issue that affects Armory.

Also, just FYI, if you try to build Armory, it won't compile due to XCode 8 being used. For now, you'll need to downgrade to the latest XCode 7 version (7.3???).
pf
full member
Activity: 176
Merit: 105
I came across a problem on macOS Sierra. Summary: On a clean macOS Sierra installation, Armory 0.51.1 (the official binary) requires that the user first install Xcode and Homebrew and then do "brew install openssl".

Details:

(1) Install a clean macOS Sierra. (2) Upgrade the system through the App Store. In my case to 10.12.2. (3) Obtain and launch Bitcoin Core. In my case 0.13.2. (4) Obtain the official Armory 0.51.1 binary and try to launch it. In my case, this didn't work and the following error was logged at the bottom of ~/Library/Application Support/Armory/armorylog.txt

Code:
File "/Users/Doug/Downloads/BitcoinArmory-master/osxbuild/workspace/Armory.app/Contents/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/Twisted-16.3.0-py2.7-macosx-10.4-x86_64.egg/twisted/python/filepath.py", line 16, in
ImportError: cannot import name sha1

To fix this issue, this is what I did: (1) Installed Xcode 8.2.1, including its command line tools. (2) Installed Homebrew. (3) Did "brew install openssl".

After doing this, Armory.app launched fine.

I think it's not ideal that people have to do this to make Armory work.
pf
full member
Activity: 176
Merit: 105
Armory definitely works for me on 10.12.2. Just sent and received coins today, actually. Smiley That said, can you do me a favor? Go to /Applications/Armory.app/Contents/MacOS/py/usr/lib/armory/armoryengine/ and edit ArmoryUtils.py at Line 1267. Once saved, start Armory and see if it finishes starting up.

Old:
Code:
LOGINFO('   Preferred Encoding    : ' + locale.getpreferredencoding())

New:
Code:
prefEnc = locale.getpreferredencoding()
if prefEnc == None:
   if os.environ.get('LC_ALL', '').upper() == 'UTF-8':
      prefEnc = 'utf-8'
   else:
      prefEnc = 'Unknown'
LOGINFO('   Preferred Encoding    : ' + prefEnc)

EDIT: Added a suggested fix.

That worked! Feel free to PR to goatpig. Thanks mate.

Glad to hear it! Will PR ASAP.

droak was the OSX maintainer at ATI. He provides me with the builds (I debug the code through a SSH instance on his machine). I fully trust him, for what it's worth.

As for OSX support in general, I simply do not own a Mac, and it is apparently a mess to get OSX going in a VM. ATI had a full time employee, qualified and available to this task (droark). Being alone and without revenue, supporting OSX is a tough requirement for me. If droark didn't volunteer, I would have had to drop OSX support.

My long term plan is to break down the code base in sub modules and at least enable deterministic builds for mission critical libraries. But for now, this is all I've got.

Yeah, I still do the Mac builds. Here's my build process.

- Run the latest version of VMware Fusion (currently 8.5.3).
- Fire up a VM with OSX 10.11.6 and the latest version of XCode 7 (can't remember the number offhand). This is due to some issues that can't be resolved on my main box until Armory requires OSX 10.8 as a minimum. (10.7 is still the minimum version we support, although I'm pressing for a bump to 10.8 once SegWit and the new wallet are ready.)
- Use Git to pull down the latest code.
- Do a full, clean build.
- Send the resultant .tar.gz file and its SHA256 sum to goatpig.

Believe me, I know this isn't ideal! At ATI, we were working on a Core-like system where cross-compiles were feasible, thereby making deterministic compiles feasible. We even had cross-compiles running internally. The Mac builds did run, albeit with bugs that I never got a chance to fix. It never came out because reasons. It's not possible to lift the code we had because reasons. It's still my goal, and goatpig's, to get a deterministic build system going. It's just going to take awhile because we're both busy, and this isn't something you can rush. If somebody wants to coordinate with goatpig and do a "clean room" solution, I'm more than happy to review your work. (While far from an expert, I've spent enough time in the guts of Core's build system to have a good idea of what to look for, not to mention Cory Fields, the Core build guru, gave a lot of good advice when he was lending a hand.)

Don't trust me? No problem! I encourage skeptics to roll their own versions. As long as everything's set up properly, you just run a set-it-and-forget-it script that should take ~20 min. to complete. Just be forewarned that the script is somewhat reliant on my particular system's setup. I shored it up a bit once I moved over to a VM. You may still have issues. Please let me know if you're having issues.

Thanks for the information. I will ASAP attempt to build my own Armory according to your instructions. Until then, another problem with the official binary that I came across: See next post.
sr. member
Activity: 525
Merit: 282
Armory definitely works for me on 10.12.2. Just sent and received coins today, actually. Smiley That said, can you do me a favor? Go to /Applications/Armory.app/Contents/MacOS/py/usr/lib/armory/armoryengine/ and edit ArmoryUtils.py at Line 1267. Once saved, start Armory and see if it finishes starting up.

Old:
Code:
LOGINFO('   Preferred Encoding    : ' + locale.getpreferredencoding())

New:
Code:
prefEnc = locale.getpreferredencoding()
if prefEnc == None:
   if os.environ.get('LC_ALL', '').upper() == 'UTF-8':
      prefEnc = 'utf-8'
   else:
      prefEnc = 'Unknown'
LOGINFO('   Preferred Encoding    : ' + prefEnc)

EDIT: Added a suggested fix.

That worked! Feel free to PR to goatpig. Thanks mate.

Glad to hear it! Will PR ASAP.

droak was the OSX maintainer at ATI. He provides me with the builds (I debug the code through a SSH instance on his machine). I fully trust him, for what it's worth.

As for OSX support in general, I simply do not own a Mac, and it is apparently a mess to get OSX going in a VM. ATI had a full time employee, qualified and available to this task (droark). Being alone and without revenue, supporting OSX is a tough requirement for me. If droark didn't volunteer, I would have had to drop OSX support.

My long term plan is to break down the code base in sub modules and at least enable deterministic builds for mission critical libraries. But for now, this is all I've got.

Yeah, I still do the Mac builds. Here's my build process.

- Run the latest version of VMware Fusion (currently 8.5.3).
- Fire up a VM with OSX 10.11.6 and the latest version of XCode 7 (can't remember the number offhand). This is due to some issues that can't be resolved on my main box until Armory requires OSX 10.8 as a minimum. (10.7 is still the minimum version we support, although I'm pressing for a bump to 10.8 once SegWit and the new wallet are ready.)
- Use Git to pull down the latest code.
- Do a full, clean build.
- Send the resultant .tar.gz file and its SHA256 sum to goatpig.

Believe me, I know this isn't ideal! At ATI, we were working on a Core-like system where cross-compiles were feasible, thereby making deterministic compiles feasible. We even had cross-compiles running internally. The Mac builds did run, albeit with bugs that I never got a chance to fix. It never came out because reasons. It's not possible to lift the code we had because reasons. It's still my goal, and goatpig's, to get a deterministic build system going. It's just going to take awhile because we're both busy, and this isn't something you can rush. If somebody wants to coordinate with goatpig and do a "clean room" solution, I'm more than happy to review your work. (While far from an expert, I've spent enough time in the guts of Core's build system to have a good idea of what to look for, not to mention Cory Fields, the Core build guru, gave a lot of good advice when he was lending a hand.)

Don't trust me? No problem! I encourage skeptics to roll their own versions. As long as everything's set up properly, you just run a set-it-and-forget-it script that should take ~20 min. to complete. Just be forewarned that the script is somewhat reliant on my particular system's setup. I shored it up a bit once I moved over to a VM. You may still have issues. Please let me know if you're having issues.
legendary
Activity: 3766
Merit: 1364
Armory Developer
droak was the OSX maintainer at ATI. He provides me with the builds (I debug the code through a SSH instance on his machine). I fully trust him, for what it's worth.

As for OSX support in general, I simply do not own a Mac, and it is apparently a mess to get OSX going in a VM. ATI had a full time employee, qualified and available to this task (droark). Being alone and without revenue, supporting OSX is a tough requirement for me. If droark didn't volunteer, I would have had to drop OSX support.

My long term plan is to break down the code base in sub modules and at least enable deterministic builds for mission critical libraries. But for now, this is all I've got.
pf
full member
Activity: 176
Merit: 105
Go over this with droark, he volunteers all the OSX maintenance for Armory. He'll PR the fix to my repo once it's done.
Even of droark maintains macOS, is the macOS binary still built by you on your computer (like the other binaries)? Just curious.
pf
full member
Activity: 176
Merit: 105
Armory definitely works for me on 10.12.2. Just sent and received coins today, actually. Smiley That said, can you do me a favor? Go to /Applications/Armory.app/Contents/MacOS/py/usr/lib/armory/armoryengine/ and edit ArmoryUtils.py at Line 1267. Once saved, start Armory and see if it finishes starting up.

Old:
Code:
LOGINFO('   Preferred Encoding    : ' + locale.getpreferredencoding())

New:
Code:
prefEnc = locale.getpreferredencoding()
if prefEnc == None:
   if os.environ.get('LC_ALL', '').upper() == 'UTF-8':
      prefEnc = 'utf-8'
   else:
      prefEnc = 'Unknown'
LOGINFO('   Preferred Encoding    : ' + prefEnc)

EDIT: Added a suggested fix.

That worked! Feel free to PR to goatpig. Thanks mate.
legendary
Activity: 3766
Merit: 1364
Armory Developer
Go over this with droark, he volunteers all the OSX maintenance for Armory. He'll PR the fix to my repo once it's done.
sr. member
Activity: 525
Merit: 282
Armory definitely works for me on 10.12.2. Just sent and received coins today, actually. Smiley That said, can you do me a favor? Go to /Applications/Armory.app/Contents/MacOS/py/usr/lib/armory/armoryengine/ and edit ArmoryUtils.py at Line 1267. Once saved, start Armory and see if it finishes starting up.

Old:
Code:
LOGINFO('   Preferred Encoding    : ' + locale.getpreferredencoding())

New:
Code:
prefEnc = locale.getpreferredencoding()
if prefEnc == None:
   if os.environ.get('LC_ALL', '').upper() == 'UTF-8':
      prefEnc = 'utf-8'
   else:
      prefEnc = 'Unknown'
LOGINFO('   Preferred Encoding    : ' + prefEnc)

EDIT: Added a suggested fix.
pf
full member
Activity: 176
Merit: 105
Does it get as far as creating a log file? If so, post it.
Yeah, it creates a log file. (I started with an empty AppSupport directory.) Here it is:

Code:
2016-12-30 05:40 (INFO) -- ArmoryUtils.py:1137 - C++ block utilities loaded successfully
2016-12-30 05:40 (INFO) -- ArmoryUtils.py:651 - Executing popen: sysctl hw.memsize
2016-12-30 05:40 (INFO) -- ArmoryUtils.py:651 - Executing popen: sysctl -n machdep.cpu.brand_string
2016-12-30 05:40 (INFO) -- ArmoryUtils.py:1247 -
2016-12-30 05:40 (INFO) -- ArmoryUtils.py:1248 -
2016-12-30 05:40 (INFO) -- ArmoryUtils.py:1249 -
2016-12-30 05:40 (INFO) -- ArmoryUtils.py:1250 - ************************************************************
2016-12-30 05:40 (INFO) -- ArmoryUtils.py:1251 - Invoked: /Applications/Armory.app/Contents/MacOS/py/usr/lib/armory/ArmoryQt.py
2016-12-30 05:40 (INFO) -- ArmoryUtils.py:1252 - ************************************************************
2016-12-30 05:40 (INFO) -- ArmoryUtils.py:1253 - Loading Armory Engine:
2016-12-30 05:40 (INFO) -- ArmoryUtils.py:1254 -    Armory Version        : 0.95.1
2016-12-30 05:40 (INFO) -- ArmoryUtils.py:1255 -    Armory Build:         : None
2016-12-30 05:40 (INFO) -- ArmoryUtils.py:1256 -    PyBtcWallet  Version  : 1.35
2016-12-30 05:40 (INFO) -- ArmoryUtils.py:1257 - Detected Operating system: MacOSX
2016-12-30 05:40 (INFO) -- ArmoryUtils.py:1258 -    OS Variant            : 10.12.2
2016-12-30 05:40 (INFO) -- ArmoryUtils.py:1259 -    User home-directory   : /Users/pf123/Library/Application Support
2016-12-30 05:40 (INFO) -- ArmoryUtils.py:1260 -    Satoshi BTC directory : /Users/pf123/Library/Application Support/Bitcoin/
2016-12-30 05:40 (INFO) -- ArmoryUtils.py:1261 -    Armory home dir       : /Users/pf123/Library/Application Support/Armory/
2016-12-30 05:40 (INFO) -- ArmoryUtils.py:1262 - Detected System Specs    :
2016-12-30 05:40 (INFO) -- ArmoryUtils.py:1263 -    Total Available RAM   : 8.00 GB
2016-12-30 05:40 (INFO) -- ArmoryUtils.py:1264 -    CPU ID string         : Intel(R) Core(TM) i5-3470S CPU @ 2.90GHz

2016-12-30 05:40 (INFO) -- ArmoryUtils.py:1265 -    Number of CPU cores   : 4 cores
2016-12-30 05:40 (INFO) -- ArmoryUtils.py:1266 -    System is 64-bit      : True
2016-12-30 05:40 (ERROR) -- Traceback (most recent call last):
  File "/Applications/Armory.app/Contents/MacOS/py/usr/lib/armory/ArmoryQt.py", line 44, in
    from armoryengine.ALL import *
  File "/Applications/Armory.app/Contents/MacOS/py/usr/lib/armory/armoryengine/ALL.py", line 8, in
    from armoryengine.ArmoryUtils import *
  File "/Applications/Armory.app/Contents/MacOS/py/usr/lib/armory/armoryengine/ArmoryUtils.py", line 1267, in
    LOGINFO('   Preferred Encoding    : ' + locale.getpreferredencoding())
TypeError: cannot concatenate 'str' and 'NoneType' objects

Looks like others are having the same problem: https://bitcointalk.org/index.php?topic=1670262.80
legendary
Activity: 3766
Merit: 1364
Armory Developer
Does it get as far as creating a log file? If so, post it.
pf
full member
Activity: 176
Merit: 105
That's armory_0.95.1_osx.tar.gz

To bypass Gatekeeper, I right-click Armory.app and clicked Open. After that, nothing happens. Every time I double-click on Armory.app nothing happens at all. It refuses to launch.

Any ideas?
Jump to: