Friday, October 12, 2018

Angular 6 Component Require JSON ExpressionChangedAfterItHasBeenCheckedError


In an Angular 6 project, a simple component that gets json data from a local file generates error: ExpressionChangedAfterItHasBeenCheckedError


Do not use the following method to import local json data into the component:
const data = require('./data.json');

Use other standard approaches e.g.

this.http.get(this.dataUrl).subscribe((data: any) => {
// Do something with json data!

Saturday, August 11, 2018

Ionic 4 Debug With Chrome Sources

In Ionic 3, it was easy to find source .ts code in Chrome's developer tools "Sources" tab for debugging. In Ionic4, it's difficult to find.

In Chrome developer tools "Sources" tab drill into:
webpack:// > . > src > app

Ionic 4 + Capacitor Calling Local API Blocked Mixed Content Error

Ionic 4 + Capacitor app running locally on device. NodeJS + Express + MongoDB API running local on http (not https).

Can hit local API successfully when running Ionic in browser on API url localhost or IPv4 address (e.g.

When running on device (connected via USB) get the following error on all API calls (in Chrome developer tools network tab): (blocked-mixed-content)

Add: "allowMixedContent": true
To: \capacitor.config.json

Tuesday, April 24, 2018

Windows 10 Boot Failure Error Code 0xc000000e

Windows tries to load but fails with blue screen.

Your PC/Device needs to be repaired
The application or operating system couldn’t be loaded because a required file is missing or contains errors.
File: \Windows\system32\winload.exe
Error Code:0xc000000e


I was unable to recover from this error! But Peter was able to -- highly recommended -- he knows his stuff:

Notes based on my limited understanding of the problem:

This was one of the clearest articles I could find.
However, my understanding is it's not a suitable fix for a UEFI SSD system drive.

This was one of the clearest articles I could find suitable for UEFI.

My results from command prompt: list vol

What tripped me up is I kept thinking the UEFI volume was the same as the system drive. I could assign a letter and see the files on my system drive (i.e. my C:\ drive with windows). But this is the wrong drive to use for bcdboot. The UEFI is apparently always FAT32. I "think" I should have been using volume 5. Volume 7 seems to be from my Windows 10 recovery disk.

So I should have been running (from command prompt) this:
sel disk 0
list vol
sel vol 5
assign letter=G: Note: G is a unique drive letter not already in use.

Restoring from a recent restore point did NOT resolve the issue. But was done before the boot repair above.

BIOS boot mode changed from "Dual" to "UEFI". Unclear if this was a necessary fix. My understanding is this was NOT necessary. PC had been working with zero issues for the past 3 months.

Friday, January 19, 2018

SuperMicro Desktop Workstation Build 2018

Personal SuperMicro Desktop Workstation Build 2018


  • Happy with price/value/performance.
  • A key requirement was a motherboard with at least one Thunderbolt 3 port.
  • SuperMicro chasis made building the PC very simple and worth every cent. Not visually appealing but not ugly. Fairly quiet.
  • CPU is hitting 100% for minutes with WAMP / Magento 2. In hindsight, would choose a motherboard that supports Xeon E5 which would have allowed for a CPU with more than 4 cores.
  • Broke the first motherboard unplugging the monster GPU. Additional cost to junk/replace.
  • BIOS bootup time seems long. ~15 secs.
  • Chasis front panel plug to motherboard not keyed. Easy to plug in the wrong way. Cable is short, so harder to plugin correct way.
  • More USB ports on the back needed.

SuperMicro Support Q&A

Question: How do I install Windows 10 to the blank system SSD from USB.

Answer: OS must be installed with UEFI mode for M.2 SSD. See youtube link as a reference.

Question: What is the correct boot order to boot of the SSD system drive.

Answer: Change “UEFI Hard Disk: Windows Boot manager” to boot order #1.

Question: BIOS boot time is slow ~15 secs. How can I improve the speed.

Answer: BIOS needs to detect all the devices inside the system before booting to OS. You can try to disable all the PCIe slots option rom inside the BIOS and disable all the unnecessary features inside the BIOS like serial port.

Question: GPU covers the SSD M.2 port and is awkward to get it in and out. Can I use another port as it would make it easier to install and I’d have direct access to the SSD (if needed).

Answer: you can use slot #2 for your GPU if you don’t have any PCIe card on slot #4. If you have PCIe cards on both slot #2 & #4, then both slots will run as x8.

Components Checklist

  • Motherboard
  • CPU
  • CPU Heatsink
  • CPU Thermal Paste (just in case)
  • RAM
  • GPU
  • Chasis
  • SSD (system)
  • HDD (data)
  • SSD (portable/external)


Supermicro Motherboard ATX for up to Xeon E3-1200v5
SuperMicro X11SAT (-F IPMI support was out of stock)

Intel Xeon E3-1275 v6 Kaby Lake 3.8 GHz 4 x 256KB L2 Cache 8MB L3 Cache LGA 1151 73W BX80677E31275V6 Server Processor

Interesting article on why to choose Xeon:

CPU Heatsink
Supermicro 2U Active CPU Heat Sink Socket LGA1150/1155 (SNK-P0046A4)

CPU Thermal Paste
Arctic Silver 5 High-Density Polysynthetic Silver Thermal Compound AS5-3.5G
*Didn't need because heatsink came with grease. Buy just in case heatsink needs to be removed.

Supermicro 16GB 288-Pin DDR4 2400 (PC4 19200) Server Memory (MEM-DR416L-SL01-EU24)
4 x $206 = $824

Nvidia GTX 1070 Ti
*Nvidia GTX 1080 Ti (preferred but out of stock globally).

865 Watts
SUPERMICRO CSE-743TQ-865B-SQ Black Pedestal Server Case 865W 2 External 5.25" Drive Bays

Power watts/calculator:

SSD System 1TB
SAMSUNG 960 PRO M.2 1TB NVMe PCI-Express 3.0 x4 Internal Solid State Drive (SSD) MZ-V6P1T0BW
HDD Data
WD Black 2TB Performance Desktop Hard Disk Drive - 7200 RPM SATA 2Gb/s 64MB Cache 3.5 Inch - WD2003FZEX

HDD Backup
WD Blue 6TB Desktop Hard Disk Drive - 5400 RPM SATA 6Gb/s 64MB Cache 3.5 Inch - WD60EZRZ

External SSD
Samsung Portable SSD T5 540 MB/s
*Temporary until a good/reliable/portable Thunderbolt 3 external drive available.

Friday, July 21, 2017

Magento 2 Enable Product on Import

How to enable (or explicitly disable) a product using Magento 2 out-of-the-box product import.

Include column product_online in the import and set values (1=enable, 0=disable) accordingly. Note that we'd expect this column to be called status instead since this is the attribute name. But adding column status instead does not work.

Friday, May 26, 2017

Magento 2.1 SOAP API Basics

Version: Magento 2.1+

The Magento SOAP API is made up of many services. Each service contains API endpoints.

Services that return sensitive data are secure and require a security token to access e.g. salesOrderRepositoryV1GetList. Services that do not return sensitive information do not require a token and are publicly available e.g. directoryCountryInformationAcquirerV1GetCountriesInfo

List of anonymous guest services is here: /soap/default?wsdl_list=1

Magento admin > Configuration > Services > Web API Security > Allow Anonymous Guest Access = Yes will allow additional anonymous guest services to be accessible. These services may return somewhat sensitive data e.g. cmsPageRepositoryV1.

Specify the service in the WSDL url. Specify multiple services in the WSDL url as needed. e.g. /soap/default?wsdl&services=customerCustomerRepositoryV1,salesOrderRepositoryV1

A token can be obtained by creating in Magento admin > System > Integrations > Create New Integration. Use the Access Token in the header of SOAP calls. e.g. $opts = ['http' => ['header' => "Authorization: Bearer " . $token]];

A token can also be obtained by creating a Magento admin user and then requesting a token based on the username/password e.g. $token = $request->integrationAdminTokenServiceV1CreateAdminAccessToken(array("username"=>"myusername", "password"=>"mypassword"));

Calling SOAP APIs from a PHP script may cache WSDL files on the client. For example, it was not possible to call protected APIs with a token. After deleting client wsdl files in /tmp folder the issue was resolved.