Monday, October 23, 2017

Windows 10 won't sleep and restarts instead of shutting down due to old iPad

Just a quick note to myself, my windows 10 desktop wouldn't go to sleep, hibernate and would always reboot itself after I asked it to shutdown.

Turns out it was caused by an old iPad 2 which is no longer supported (stuck on 9.3.5) which I had plugged in via USB, for testing purposes.

Once I unplugged the old iPad, Windows 10 started to behave normally!

Sunday, September 03, 2017

Chrome is cutting off pages when printing

Just a quick heads up for anyone struggling with Chrome not printing all pages.

There are some known issues with Chrome

If you're affected please log in to the Chrome bug tracker and star any of the following issues

(but please don't post redundant me too comments)

Printing cut off when using bootstrap grid

Print page scaling cuts off content

Print selection is missing some contents / pages

getBoundingClientRect() wrong when printing

Thursday, June 01, 2017

Safari: A problem occurred with this webpage so it was reloaded (Update)

After filing an initial bug and reaching out to some Apple developers, Apple has been able to
reproduce the problems causing these crashes in Safari, here is the list of bugs filed which
reproduce the cryptic error message "A problem occurred with this webpage so it was reloaded"

Out of memory crash with MapBox-gl-js

Camera/Canvas file input crash: A Problem Occurred with this Webpage so it was Reloaded

Pinch zoom crash: A problem occurred with this web page so it was reloaded

Page that allocates and destroys canvas elements in a loop gets jettisoned on iOS

It does somewhat concern me that after trawling thru github, I found lots of developers battling these
problems but nobody had bothered to report the issue back to the webkit bug tracker (radar is simply
a black hole from the late 20th century).

By default iOS has reporting analytics turned off, which may be the reason why these kind of
problems have been occurring for years without being resolved.

The crash logs on iOS for these bugs indicate it's an out of memory, aka Memory leak/GC problem,
but they only include a list of processes and doesn't even seem to include the url of the page which
triggered the crash.

Maybe does Apple get more detailed crash reports, but from an outside perspective it seems they
don't and it's their users and web developers who are suffering as a result.




Thursday, May 18, 2017

Mobile Safari: A problem occurred with this webpage so it was reloaded

This is one of the most frustrating and cryptic error messages thrown on the web today.

There are legions of articles which suggest playing with various setting on iOS, but in reality don't bother with them.

Basically this message means Safari crashed (like Chrome Aw Snap, but without any extra information or the ability to provide feedback),

One of the most likely cause for this to happen is when Mobile Safari runs out of memory,
in my current case it relates to a crash after attempting to take a photo from <input type="file"> and resizing via canvas

You can find crash logs under Settings -> Privacy -> Analytics -> Analytics Data (iOS 10)

As far as bug reporting goes, Apple operates their own event horizon with their radar system, but you can try a few of these public resources, http://www.openradar.mehttps://bugs.webkit.org/

Meanwhile, other major browsers make developers life easier with a more open approach:









Wednesday, October 05, 2016

How to stop a dead NBN battery unit beeping every 15 minutes

When the battery backup unit for a NBN Fibre (FTTH) NTD (box on the wall) reaches the end of it's life, it starts to beep every 15 minutes. BEEP BEEP BEEP

These days most people have landlines and most likely any devices plugged into the NTD won't have power to function anyway during a blackout, so you don't really need it and besides we all have mobiles these days.

How do you stop the annoying beeping? 


Just remove the battery from the box. Simple eh?

Thursday, March 03, 2016

How to expand all child nodes in the Chrome Dev Tools Elements Panel

Here is the chromium bug to expose this super useful feature via the UI

Wednesday, December 02, 2015

Firefox iOS: SecurityError: DOM Exception 18 with openDatabase()

Firefox has been relased for iOS as another Safari/Webkit wrapper, but it's currently unusable with Web SQL due to I think privacy settings.

Bugzilla Bug: SecurityError: DOM Exception 18: An attempt was made to break through the security policy of the user agent.

Here is a very simple test case

Of course you might say, why not just use indexedDB? Well due to it being broken in the initial release in IE6, I mean Safari and Apple's terrible old school, we only update our browser with the operating system approach, that's not practical without doing version sniffing and writing Web SQL to IndexedDb migration logic. fun fun!

Friday, October 23, 2015

Glyphicons showing up as Emoji in Safari

With the latest version of Safari 9 (iOS 9.1), I encountered a problem with Glyphicons (with bootstrap 3.3.5) showing up as Emoji.

It only happens intermittently when offline using an appcache.

Meanwhile, I also had Font Awesome Icons on the same page which were working fine.

I found a few Stack Overflow posts
How to prevent Unicode characters from rendering as emoji in HTML from JavaScript?
How to prevent Bootstrap's glyphicon rendering to emoji (Opera, FF)?

and a closed bootstrap bug
Bootstrap v3.1.1: Wrong glyphicons on iPad 

But none of them had any solution which worked, but then doing some further research, I then discovered that Bootstrap v4 is dropping Glyphicons

So, the solution I'm using is to get ready for Bootstrap v4 and just dump Glyphicons entirely

UPDATE: Turns out it was a PBKAC, I didn't have a .woff entry in the appache manifest, as glorious IE6 (Safari) doesn't support woff2 yet


Monday, October 19, 2015

Some notes about developing offline web apps with Chrome

I have been doing a fair bit of work developing offline support in web apps lately, I thought I'd share a few problems I've learnt along the way.

The above links are all (nearly all) bug reports, please star the issues if you care about them, please don't spam the bug reports with useless "I'd like to see this fixed" messages.

Hopefully this info might save you a bit of time

Safari - Web SQL - 14 unable to open database file [SOLVED]

Just a quick post, if you ever encounter "14 unable to open database file" in Safari, it's probably due to Safari apparently not properly Garbage Collecting db handles from openDatabase calls.

The solution is simply to re-use your database connections via a connection pool, as is common practice in many other application servers.

Apparently this got a bit better with Safari 8, Safari 7 was much worse.

I solved this myself after reading this issue https://github.com/pouchdb/pouchdb/issues/1068

Tuesday, September 08, 2015

Debugging web apps on iOS from Windows using Firefox's WebIDE

The WebIDE in Firefox Developer edition (Shift-F8) supports Remote Debugging of browsers on  iOS and Android devices all via a single interface.

Once you have connected, just select the tab you want to debug from the Open App drop down menu.

You might need to reboot after installing Firefox Developer Edition for the iOS link to work

Internally it uses Valance

Super useful, especially if you don't have a Mac handy

Saturday, August 08, 2015

Is Pura Milk GMO Free?

Dear Zac,

Lion is committed to providing products of the highest possible standards in terms of quality and food safety.

Lion products are not Genetically Modified (GM) or derived from Genetically Modified ingredients, and we ensure complete compliance with National, State and Territory Food Stan

Lion will not accept milk which contains GM material.

Lion has an extensive QA program for its farm supply base, to ensure its milk supply is of the highest standards in terms of quality and food safety.

Scientific evidence establishes that GM material present in stock feed is not transferred to milk, because of the nature of the digestive system of the cow.  Even so, in recognition of some consumer concern, Lion recommends that farmer suppliers avoid GM feed for their cows.

Routine testing on finished product is carried out to verify that products are confirmed as GM free.

Lion is committed to complying with the Australian and New Zealand Foods Standards Code, and other applicable legislation in relation to products manufactured or sold outside of Australia or New Zealand. 

To that end, all products are labelled in accordance with the requirements of the Australian and New Zealand Food Standards Code.


I thought this might be useful information for those who are concerned about GMO foods.


Personally, having read this article below, I now regret previously financially supporting Greenpeace

The war against genetically modified organisms is full of fearmongering, errors, and fraud. Labeling them will not make you safer.


Wednesday, August 05, 2015

iinet port forwarding http, https not working? SOLUTION

If you are an iiNet customer trying to port forward a home web server, remember to first log into toolbox and turn off the port forwarding first.

It may take up to 15 minutes to take affect.

Hopefully this might save you some frustration trying to solve this problem

If you need to check if your port is open, http://canyouseeme.org/ is handy, as is GRC's ShieldsUP

Port Blocking


This facility allows you to enable or disable port blocking on your ADSL / Dialup / Naked DSL account.
The following can be toggled:
  • Port 25 (smtp) inbound and outbound
  • Port 80 (http) inbound
  • Port 135 DCOM SCM inbound
  • Port 139 (netbeui/ipx) inbound
  • Port 443 (https) inbound
  • Port 445 Microsoft Windows File sharing / NETBIOS inbound
These ports are commonly used for security exploits and denial of service attacks. If, however, you would like to disable port blocking on the above ports, you can do so by clicking the toggle button above. Note: Please be aware that it may take up to 15 minutes for your port blocking settings to take effect


Tuesday, April 14, 2015

BROKEN: Web apps launched from the iOS home screen always reload

Sadly mobile Safari has a sordid history of being broken in each new release, but mobile web apps have been broken for a very long time (since circa 2010).

It appears that if you save a web page using a manifest to the homepage, it doesn't really work. Each time you click the icon from the homepage or switch back to the application, the damn webpage is reloaded, which is fine for a simple webpage, but we are talking about Web Apps.

It would appear that at blame is iOS and it's faux multitasking.

There is a lot of stuff over on Stackover flow about this, i.e. Stop reloading of web app launched from iPhone Home Screen . Alas, no solutions but advice to persist your application state in localstorage (or you could risk indexeddb which is another sad Safari story) but that doesn't solve the underlying problem.

Meanwhile, Chrome on Android just works a treat, Web Apps don't reload when you switch or launch them.

My main frustration with Web Apps via Chrome on Android is that the Fullscreen API doesn't allow you to expose the browser chrome and thus settings from full screen mode.

This means it's even more complicated for users wanting to re-enable navigator.geolocation support after ignoring or denying the first and only prompt. Try walking your parents thru that over the phone...

Please prove me wrong or tell me the next iOS release addresses this issue?

Saturday, July 05, 2014

How to get real line numbers in Chrome when using a wrapped console.log function

If you use a wrapped console.log function in your javascript, it's rather annoying that the console log entries always refer to the wrapping function rather than the relevant line in your source code.

Fortunately, Chrome has a workaround Tips and Tricks: Ignoring library code while debugging in Chrome (remember to open and close dev tools as described in the article)

There are a number of good reasons to wrap your console log calls, firstly handling old browsers which don't always have a console and secondly, keeping a buffer of console logs which can be included when capturing and reporting client side errors

While on the subject of client side errors, Tracekit is a useful library which provides stack traces for javascript errors

Saturday, June 28, 2014

Front runner for Political Meme of the Year

Liberals celebrate passing the Carbon Tax repeal bills in the HoR (again)

Sunday, January 19, 2014

SOLUTION: When OSX won't recognise an exFAT external hard drive

A little gotcha with exFAT (a disk format like FAT32/NTFS etc which both OSX and Windows support out of the box) is that silly old OSX will only recognise the disk if the cluster size is 4,096 or less.

So if you can't see an external exFAT disk from a Mac, you probably need to backup the data and then reformat the disk with a cluster size of 4,096 or less.. if that doesn't work, carefully delete the partition from OSX and recreate it.

4,096 is rather shit for large files like photos, mp3, etc but anyway, it works

Saturday, December 21, 2013

My Mum's Summer Pudding Recipe

Serves 6
  • 8-12 slices day old white bread
  • 900 g of frozen fruit blackberries/raspberries/mixed berries but not strawberries
  • 100g-170g white sugar


Mum adds 1 chopped green apple (per pudding) diced to make the fruit go further.

Rinse a 900 ml pudding basin with cold water. Trim the crusts from the bread slices. Cut a circle from 1 slice to fit the bottom of the basin. Cut enough wedge-shaped pieces to fit around the sides. Press bread in firmly to line the basin making sure there are no gaps. Reserve a few pieces of bread to cover the top.

Trim the fruits and put them into a saucepan. Add the sugar, cover with a pan lid, and cook gently for 5 minutes, or until fruit is softened. Turn hot fruits into the lined pudding basin. Cover the top with the remaining pieces of bread and put a weighted plate on top. Allow to stand overnight.

Remove the weighted plate and place a serving plate over the pudding. Invert pudding on to the plate and serve with cream.

Mum's tips:

  1. Very little extra trouble to make two instead of one (recipe is for one).
  2. If you add a little bit of extra fruit and sugar it will give you extra juice. (Sugar and fruit must be in the same proportions).
  3. Any type of pudding basin can be used (Not sure if metal OK because of the acidic action of fruit on metal).
  4. The pudding should come to about half a cm from the top of the bowl.
  5. If the top layer of bread is still white add a bit more juice.
  6. Then cover with two layers of glad wrap tightly. With weight on top put in fridge.
  7. When ready to eat remove glad wrap, loosen gently with a knife and put a plate on top and invert.
  8. However careful you are, there are always white patches and stain with juice.
  9. Remaining juice put in a bottle in the fridge and pour over pudding to serve plus cream.
Update: Mum got the original recipe from Katie Stewart's Cookbook ISBN 0 330 28556 4 (1985)