Why is my connection to Google, Gmail or HSTS Site Untrusted?

Connection to Google untrusted? Fix below!

Lately, I have had issues connecting to Google, Google Mail and other random services over the last few months. I did some digging today and fixed (I believe) the issue. If you are having problems with security messages like the below, try these steps to see if it fixes the problem. I'll put some narrative/background info below if you are curious as to my findings.

Here's an example of what I would see if I dug into the Untrusted Message:

How in the world is accuweather the actual cert for google?

Solution: Here's what I did.

In short, you need to remove the offending certificates. Your browser will re-ask for them and get the right ones

Google Chrome: (screen shots below)

  1. Click on the 3 horizontal lined Hamburger menu
  2. Click on Advanced Settings
  3. Click on HTTPS/SSL Manage Certificates
  4. Click on Untrusted Certificates Tab
  5. Remove all that said Fraudulent

Mozilla Firefox (screen shots below)

  1. Click on the 3 horizontal lined Hamburger menu
  2. Click on the Options button
  3. Click on the Advanced Menu on the right
  4. Click on the Certificates Tab
  5. Click on the View Certificates Button
  6. Click on the Servers Tab and remove the expired certificates

Google Chrome Screenshots

Mozilla Firefox Screenshots

Ok, so what is this all about?

From my research, certain sites using HSTS (HTTP Strict Transport Security) are throwing security alerts upon connection to pages on the domain. In March 2011 an HTTPS/TLS Certificate Authority (CA) was tricked into issuing fraudulent certificates. Patches to the major web browsers blacklisted a number of TLS certificates that were issued after hackers broke into the Certificate Authority. These were high value certs and likely state sponsored cyber-attacks from Iran. Below is the list of domains affected:

  • mail.google.com
  • www.google.com
  • login.yahoo.com
  • login.skype.com
  • addons.mozilla.org
  • login.live.com
  • global trustee

The weird thing about this, is my computer wasn't even manufactured in 2011. I purchased it in 2013! There must have been a recent update to either the servers matching the domains above, or to my browsers or operating system a few months ago. Regardless, connecting to the domains in the above list has been problematic with random security warnings and even blockages on my own computer.

Let me know if this fixed the problem for you!

NativeScript button event not firing

I spent a bit of time trying to understand why a tap event failed to fire on a button in NativeScript. Here was the original code segments:

Button Code

view plain print about
1<Button text="Pay Debt" tap="payDebtAction" visibility="{{ debt===0 ? 'collapse', 'visible'}}" />

Tap Event Handler Function

view plain print about
1exports.payDebtAction = function(args){
2 var page = args.object;
3 console.log("paydebt");

The intent of this code was to hide the Pay Debt button if there was no debt. In exports.payDebtAction(), there was a call to the view-model to reduce the debt by the appropriate amount. When I ran the code, I did not get any output in the console. Thus, the code to reduce the debt never ran and the button never disappeared from the view.

Using the Throw-Stuff-At-The-Wall method, I eventually removed the visibility attribute from the Button declaration, and handled hiding the button in the code behind file like this:

view plain print about
1<Button text="Pay Debt" tap="payDebtAction" id="payDebtButton" />

Tap Event Handler Function

view plain print about
1exports.payDebtAction = function(args){
2 var page = args.object;
3 console.log("paydebt");
4 GameViewModel.payDebt();
5 var debt = GameViewModel.get("debt");
6 if( debt < 1){
7 View.getViewById(page, "payDebtButton").visibility='collapse';
8 }

Notice the id attribute on the button. I use that ID to get a reference to the control, then set the visibility property in javascript, not in the view XML. This code works as expected.

I'm not 100% sure what I learned, but perhaps if there is a way to sum it up, is to not try to do so much in the XML layer. The JS layer is a lot more powerful anyways.

Updating from NativeScript 1.4 to NativeScript 1.5

I ran into an issue updating NativeScript 1.4 to NativeScript 1.5. The symptom:

view plain print about
1> nativescript@1.5.0 postinstall C:\Users\DanWilson\AppData\Roaming\npm\node_modules\nativescript
2> node postinstall.js

Basically, after uninstalling and reinstalling NativeScript on Windows 7 (maybe other OS's are affected also), the process would hang at the node postinstall.js. By hang, I mean it was stuck at the above status for 15 minutes. I looked at the source for postinstall.js and nothing specifically stood out to me as potentially the problem. Hat tip to Jen Looper for the suggestion to upgrade Node.js. Upgrading to the latest 4.x fixed the issue for me.

Why were you running an out of date Node.js DAN?

The NativeScript Getting Started Documentation stipulated Node .12 at the time. Since NativeScript has been released, they have updated the documentation to now include Node 4.x.

It is possible a fresh install might work on .12 or an older version of Node, however once I updated to the latest Node Binaries, the install for NativeScript 1.5 finished promptly. If you have issues upgrading to NativeScript 1.5, freshen up your Node.js version and that should take care of it.

Application Upgrade

Another thing I noticed, was a difference in the values in the root package.json for the value "tns-core-modules" was 1.4.0. I manually changed that value to 1.5.0 and the application built and deployed successfully. I'm not sure if you HAVE to do that, but I did it and saw no ill effect.

Before manually changing tns-core-modules

Before I manually changed the value of tns-core-modules, I ran npm install to ensure my dependencies were set correctly. Here is what happened:

view plain print about
1C:\_web\NativeScript\TradeOMatic>npm install
2npm WARN package.json @ No description
3npm WARN package.json @ No repository field.
4npm WARN package.json @ No README data
5npm WARN package.json @ No license field.

After manually changing tns-core-modules

view plain print about
1C:\_web\NativeScript\TradeOMatic>npm install
2npm WARN package.json @ No description
3npm WARN package.json @ No repository field.
4npm WARN package.json @ No README data
5npm WARN package.json @ No license field.
6tns-core-modules@1.5.0 node_modules\tns-core-modules

As you can see from the final line, the tns-core-modules for my specific project were updated to the 1.5.0 version.

The best way to develop and run NativeScript projects in an emulator

I develop NativeScript on Windows. As in most new, shiny technology, developing on Windows has it's quirks. In this post, we'll talk about 3 different ways to run your NativeScript project in an emulator, as well as the pros and cons of each method. I'm also going to use the Android platform. The iOS commands are the same, except for swapping iOS for the keyword android in the command.

All methods assume you have an emulator for your platform, with a device profile created. Additionally, at least on Android, it is necessary to start the device emulator you wish to target using the Android Virtual Device Manager, or some other mechanism.

Basic: tns run android --emulator

Run this command every time you want to push the latest version of your code to the emulator.


  • You get to see any console output. This means you can debug your application using console.log("foo") statements and see the output.
  • You will stay up to date on your facebook feeds. See Cons below for explanation.


  • The console logs are VERY chatty. There are heaps of measurement logging and other things not immediately relevant to the application. The sheer amount of logs, can make it hard to find your output.
  • You'll pay a 2 minute tax, at least, waiting on the emulator to get your changes. Change a single character and use this method again? Then you'll pay the 2 minute tax again. (I'm using an SSD laptop with 16GB of RAM.)
  • Because of the latency between updates, I am painfully reminded of my poor typing skills.
  • If this was the only option to write Native mobile applications, I'd probably decide it wasn't for me and go do something else.


At this stage, I can not see a single positive reason to use tns run android --emulator that can't be achieved with one of the below options. In short, you probably don't want to use the workflow tns run android --emulator. As a stretch, perhaps you need to see the Native logs, like all of the measurement logging. Right now I don't need that, so this method is pointless and masochistic.

Interactive: tns livesync android --emulator --watch

This process watches for source code changes and will automatically build and push the latest version of your code to the emulator.


  • The time between making a source code change, and seeing the effect of the change in the emulator, is WAY faster than tns run android --emulator. This is somewhat comparable to running a browser based application.
  • I prefer this method when I'm working on layouts, visual changes, or light work inside view-models.
  • Did I mention how fast changes are propagated?
  • If there is an error, you will get a stack trace on your emulator screen.
  • As of NativeScript 1.5, you will see console.log() outputs in your terminal window. YAY!


  • You get NO console output. All console.log() statements are /dev/null'd.This is no longer true as of {N} 1.5. Console.log() output is streamed to the terminal, without the chattiness of the above method.


If you want more options with how to deal with non-visual logging in NativeScript, write a custom TraceWriter and push the output you want into a frame of your application, or send it over an API or whatever. You can find out more here: tracing-nativescript-applications. Just search for Writing a Custom TraceWriter for an example of your options.

Genymotion: tns debug android --geny "Google Nexus 4 - 5.1.0 - API 22 - 768x1280" --debug-brk

This process watches for source code changes and will automatically build and push the latest version of your code to the emulator and start a debugging session in Google Chrome.


  • Changes are propagated quickly, much like tns livesync android --emulator --watch
  • You have introspection, breakpoint and other tools using Google Developer Tools.
  • From my informal testing, the time to complete the initial build and show the app on the screen is less with Genymotion, than it is with the tns livesync android --emulator --watch process.


  • This requires a separate account with Genymotion. There is a free personal account and several paid options.
  • No matter what I do, this doesn't work on my platform. It's the albino tiger of debugging. If you can see it working, then you have something special. However, Genymotion never comes out of the cave to perform for me.

Which one should you use?

Once your environment is successfully set up, spend some time to get Genymotion installed. If you can get it working on your system, then you have the Holy Grail of NativeScript debugging. Fast change propagation, interactive debugging, variable inspection and so on. If this does not work for you, then you are probably best served using tns livesync android --emulator --watch. Now that console.log() statements are sent into the terminal, you can debug iteratively, though without the breakpoints and introspection you'd get in a Google Chrome debug session.

Appendix: why doesn't Genymotion work on your platform?

If I knew the answer to that, I wouldn't have been inspired to write this article. I'd just use Genymotion and be happy.

On my system, I can start the Genymotion emulator, connect with a debugging session in Google Chrome and see my application successfully deployed. What does not work is the debugging session. I get the following error in my javascript console:

view plain print about
1Page.getResourceTree failed.
2ReferenceError: process is not defined

While googling for a resolution, I can see others report a similar issue, however no combination of repudiation steps makes this error go away. Thus, the debugging session is not enabled and I get none of the benefits of using Genymotion.

It is a shame, but I make do with the combination of tns run android --emulator and tns livesync android --emulator --watch as needed.

TNS Build Android Hangs

Occasionally, while running a NativeScript application on android, the process hangs and does not complete. I have not gotten to the bottom of this, but I can tell you how I resolve the issue to continue running my application.

Symptoms - one of these

view plain print about
1C:\_web\NativeScript\TradeOMatic>tns livesync android --emulator --watch
2Project successfully prepared
3The application with id "org.nativescript.TradeOMatic" is not installed on the device yet.
4Project successfully prepared
view plain print about
1C:\_web\NativeScript\TradeOMatic>tns build android
2Project successfully prepared

In the above cases, the behavior is the terminal is stuck at the Project successfully prepared status and does nothing. I can watch which binaries are in control of the process, and on Windows, it gets stuck on find.exe.

If the tns livesync android --emulator --watch command hangs, I usually just run tns build android. Usually, this kicks off the build process. If it doesn't, I'll run tns build android again. This almost always works.

If, for some reason, no combination of the commands executed the build process. I remove the Android specific platform processes, then added them again. Example:

view plain print about
1C:\_web\NativeScript\TradeOMatic>tns platform remove android
2 C:\_web\NativeScript\TradeOMatic>tns platform add android

When the build process runs, you will see a lot of console output. Example:

view plain print about
1Project successfully prepared
2execute: copyAarDependencies, addAarDependencies before configuration
3:preBuild UP-TO-DATE
4:preDebugBuild UP-TO-DATE
6:preReleaseBuild UP-TO-DATE
7:prepareComAndroidSupportAppcompatV72311Library UP-TO-DATE
8:prepareComAndroidSupportSupportV42311Library UP-TO-DATE
10:compileDebugAidl UP-TO-DATE
11:compileDebugRenderscript UP-TO-DATE
12:generateDebugBuildConfig UP-TO-DATE
13:deleteJavaDir UP-TO-DATE
14:cleanLocalAarFiles UP-TO-DATE
15:collectAllJars UP-TO-DATE
16:ensureMetadataOutDir UP-TO-DATE

Then the changes made to the application are ready for deployment. You can use your favorite emulator command to push the build. I prefer tns livesync android --emulator --watch because changes are picked up and deployed automatically, significantly reducing the amount of time needed to validate each change on the emulator.

What happens when you choose the wrong Datatype for an Identifier Column

Choosing database column data types can be dicey. Choose an overly large data type, and indexes will be overly large, storage will fill up and other bad things can happen.

Choose an overly small one, and you end up with hard errors.

A common data type for a database identity column is an int. However, if your application gets popular, it can break. Pastebin is a victim of it's own success :)

How to fix a Node.js package error when installing NativeScript

NativeScript is a free open source offering from Telerik allowing mobile development in Javascript with 100% Access to Native Platform APIs in iOS, Android and Windows Phone. With NativeScript, the entire native platform functionality is available in the JavaScript layer. I've finally found the packaging and tooling I want to use to develop native applications in iOS and Android, while using a single language.

I develop in Windows and I love it for my daily work. However, occasionally, using Node.js on windows is a bit more complicated than on other platforms. While following the very comprehensive Getting started guide for NativeScript, I ran in to a sticky issue. Here is the issue and resolution in case it helps you, my weary web traveler friend.

Firstly, the root cause of the error was my fault. Even though the Getting Started Guide stated I needed to install "The latest Node.js 0.10.x or 0.12.x stable official release", I went off-script and installed Node 4.x. Surely this would work, right?

After spending a fair amount of time struggling with the CLI command to install NativeScript, I re-read the install docs and figured out my Node version was not the right version, so I uninstalled Node.js 4.x and installed Node 0.12.x.

After running the installer again, I still ran into issues. Part of the issue was the C++ compiler not being available. The standard way to get a C++ compiler is to install Visual Studio, though through research, I found Microsoft is offering a standalone C++ compiler specifically to help out with node. This comment by Sara Itani, discusses the new compiler, how it was tested and has the links to download what you need.

I applaud the new and improved Microsoft for their work to support the more modern development platforms like Node.

Once I had the compiler installed, I hit another error. This error was caused because the earlier version of Node.js 4.x left some paths out there that no longer resolved. Once I fixed the paths in the \nodejs\nodevars.bat, and ensured they pointed to the current install of Node 0.12.x, I was able to complete the install. Below is an example of the NativeScript install script output before the error.

view plain print about
1[C:\Users\DanWilson]npm i -g nativescript
2npm WARN excluding symbolic link docs\stylesheets\hightlight.css ->
4npm WARN excluding symbolic link docs\assets\ir_black.css -> ../../node_modules/
6npm WARN excluding symbolic link docs\stylesheets\hightlight.css -> ../../node_m
8npm WARN engine xmlbuilder@2.2.1: wanted: {"node":"0.8.x || 0.10.x"} (current: {
13> utf-8-validate@1.0.1 install C:\Users\DanWilson\AppData\Roaming\npm\node_modul
15> node ./build.js
17`win32-ia32-v8-3.28` exists; testing
18Binary is fine; exiting
19npm WARN excluding symbolic link examples\TestFramework\Test Framework.framework
20\Resources -> Versions/Current/Resources
21npm WARN excluding symbolic link examples\TestFramework\Test Framework.framework
22\Test Framework -> Versions/Current/Test Framework
23npm WARN excluding symbolic link examples\TestFramework\Test Framework.framework
24\Versions\Current -> A
25npm WARN excluding symbolic link docs\stylesheets\hightlight.css -> ../../node_m
29> bufferutil@1.0.1 install C:\Users\DanWilson\AppData\Roaming\npm\node_modules\n
31> node ./build.js
33`win32-ia32-v8-3.28` exists; testing
34Binary is fine; exiting
36> fibers@1.0.6 install C:\Users\DanWilson\AppData\Roaming\npm\node_modules\nativ
38> node build.js || nodejs build.js
40`win32-ia32-v8-3.28` exists; testing
41Binary is fine; exiting
45> ref@1.1.3 install C:\Users\DanWilson\AppData\Roaming\npm\node_modules\nativesc
47> node ./build.js
49`win32-ia32-v8-3.28` exists; testing
50Binary is fine; exiting
51npm WARN excluding symbolic link docs\assets\ir_black.css -> ../../node_modules/
53npm WARN excluding symbolic link examples\TestFramework\Test Framework.framework
54\Resources -> Versions/Current/Resources
55npm WARN excluding symbolic link examples\TestFramework\Test Framework.framework
56\Test Framework -> Versions/Current/Test Framework
57npm WARN excluding symbolic link examples\TestFramework\Test Framework.framework
58\Versions\Current -> A
59npm WARN excluding symbolic link docs\stylesheets\hightlight.css -> ../../node_m
61npm WARN excluding symbolic link docs\stylesheets\hightlight.css -> ../../node_m
66> ws@0.4.32 install C:\Users\DanWilson\AppData\Roaming\npm\node_modules\nativesc
68> (node-gyp rebuild 2> builderror.log) || (exit 0)
70if not defined npm_config_node_gyp ( node "%~dp0\..\..\node_modules\node-gyp\bin
71\node-gyp.js" %* ) else ( node %npm_config_node_gyp% %* )
75> ffi@2.0.0 install C:\Users\DanWilson\AppData\Roaming\npm\node_modules\nativesc
77> node ./build.js
79`win32-ia32-v8-3.28` exists; testing
80Binary is fine; exiting
81npm ERR! Windows_NT 6.1.7601
82npm ERR! argv "C:\\Program Files (x86)\\nodejs\\\\node.exe" "C:\\Program Files (
83x86)\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "i" "-g" "nativescript"
84npm ERR! node v0.12.7
85npm ERR! npm v2.11.3
86npm ERR! code ELIFECYCLE
88npm ERR! ws@0.4.32 install: `(node-gyp rebuild 2> builderror.log) || (exit 0)`
89npm ERR! Exit status 1
90npm ERR!
91npm ERR! Failed at the ws@0.4.32 install script '(node-gyp rebuild 2> builderror
92.log) || (exit 0)'.
93npm ERR! This is most likely a problem with the ws package,
94npm ERR! not with npm itself.
95npm ERR! Tell the author that this fails on your system:
96npm ERR! (node-gyp rebuild 2> builderror.log) || (exit 0)
97npm ERR! You can get their info via:
98npm ERR! npm owner ls ws
99npm ERR! There is likely additional logging output above.
101> nativescript@1.4.3 preuninstall C:\Users\DanWilson\AppData\Roaming\npm\node_mo
103> node preuninstall.js
105Trying to kill adb server. Some running Android related operations may fail.
107npm ERR! Please include the following file with any support request:
108npm ERR! C:\Users\DanWilson\npm-debug.log

What I found annoying about this error, and the reason why I'm posting it here, is because the error points to a failure in the ws package.

view plain print about
1npm ERR! ws@0.4.32 install: `(node-gyp rebuild 2> builderror.log) || (exit 0)`
2npm ERR! Exit status 1
3npm ERR!
4npm ERR! Failed at the ws@0.4.32 install script '(node-gyp rebuild 2> builderror
5.log) || (exit 0)'.
6npm ERR! This is most likely a problem with the ws package,
7npm ERR! not with npm itself.
8npm ERR! Tell the author that this fails on your system:
9npm ERR! (node-gyp rebuild 2> builderror.log) || (exit 0)
10npm ERR! You can get their info via:
11npm ERR! npm owner ls ws
12npm ERR! There is likely additional logging output above.

However, I could install the WS package separately with no issue.

Good luck and happy developing with NativeScript!

I backed a Standing Desk Kick Starter

Kickstarter is all the rage, isn't it? As the owner of 3 small businesses, I really like the capabilities kickstarter brings to the table. The ability to fund a project based on merit alone, rather than create and shop a business plan to the venture capital industry, makes a ton of sense. My only complaint is I didn't come up with kickstarter and make it my business before they did.

I've been working from home for 9 years. I find myself to be much more productive when I'm in control of my environment. Coffee is made the way I want, when I want it. I can turn my music up to help me blast through mundane tasks. I can have complete quiet when I need it.

I have had this nagging feeling over the last few years that my desk/chair setup isn't what I need. I have a very hard time maintaining correct posture in a chair. When I need to concentrate, I often sit in very uncomfortable postures that cause pain.

Yeah, so what does this have to do with Kickstarter?

My friend Dan Skaggs turned me on to a kickstarter project that is offering to make a high quality motorized standing desk. I decided it's just what I needed. What I need is a way to get a standing desk the EXACT height I need for a comfortable work environment, and also a way to return the desk to a sitting position when I want.

Also, if I decide standing desks aren't what I need, I can keep it at a sitting height. So no fear of commitment, right?

The project is over the original $50,000 goal by a long shot, so others feel the same way as I do. If everything goes well, I'll have a standing desk shipped to my house by July. It'll take a few weeks for me to get adjusted to working in a standing fashion, but I have some fairly reasonable hopes that if I stand for a portion of the day, I'll be able to solve my bad-posture-under-concentration problem to a reasonable degree.

The Project

Take a look at World's First Smart, Connected Office Desk -- Powered By AI.. They have a smart option, with a phone app, and a regular option without all the electronic whiz, bang capabilities. I chose the regular option because I didn't see the need for all the bells and whistles, when I'm just getting started. After reading more about the capabilities, I may be starting to regret my decision. I am now 50%/50% the smart option would be worth the money for my specific purposes.

I also ordered mine without the table top. I have an idea to make a very cool, custom wood top. For now, I can use glass desk top I have now.

Really, in a nutshell, I'm out $348 for a motorized standing desk (with no top) shipped to my house. That's a pretty good deal and is a lot more cost effective than the other standing desks out there that often cost over $1,000.

Once I get the desk, set it up and work through my initial growing pains, I'll post on my thoughts.

ColdFusion 11 - MySQL no Suitable Driver

For reasons too complicated to get into, ColdFusion 11 no longer ships with a JDBC driver for MySQL. This is a change over previous versions of ColdFusion. Largely, this is because of a license issue relating to redistributing the Jar file.

How to fix it

The fix is easy:

  1. download the JDBC driver JDBC Driver for MySQL (Connector/J) here: http://dev.mysql.com/downloads/connector/j/.
  2. in the Platform select box, choose platform independent
  3. next, choose the tar or zip version appropriate for your platform. If you don't know which to pick, choose the zip version.
  4. next, on the screen titled "Begin Your Download - mysql-connector-java-5.1.35.zip", scroll to the bottom and choose the small link "No thanks, just start my download."
  5. finally, once the download completes, extract "mysql-connector-java-5.1.35-bin.jar" and put it in the lib directory of your CF install. For me it is located at: C:\ColdFusion11\cfusion\lib (your platform and coldfusion edition impacts the path for you.
  6. restart ColdFusion and validate your datasource in the ColdFusion Administrator.

That's all there is too it!

Presentation Files - Our application got popular and now it breaks!

I've just posted the presentation "Our application got popular and now it breaks!" that was delivered at Dev.Objective() 15. If you were at the conference and would like the presentation files, you can find a PDF version here. You can also view this presentation on Slideshare

So you helped build a cool application and the public is flooding your site with traffic. What's that smell? Is a server on fire? Oh No! If only you'd thought more about the performance implications of some of your decisions, things would be better. Now, the phones ring at 4AM with angry customers, rousing you out of bed. There isn't enough coffee in the world to get you through these disastrous weeks ahead. You could have avoided all of this by coming to this session.

Bullet Points:

  • Simple design decisions that come back to bite you
  • How to use infrastructure for fun and profit
  • Making the data tier work for you
  • Performance traps and how to get out of them
  • How to be sure your application can handle popularity
  • The audience should have a working knowledge of server programming