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