Ski jump preparation - redneck style

January 4th, 2018

Why use a shove when it is easier using the front loader?

Experiencing Valfjället

January 3rd, 2018

No school yesterday, so me and #1 and #2 went to Valfjället for a nice day of skiing.

Winter fun the old fashioned way

January 3rd, 2018

#3 and me testing winter fun the old fashioned way

Blog upgraded to latest version

January 1st, 2018

It has been a while since the last time I did upgrade my blog engine, so it was really needed now. I did struggle trying to find the guidelines for the manual upgrade. Actually, I did not find them, so I decided to try out the automatic upgrade for the first time. And I must say I'm impressed, the whole process took about 2 minutes, upgrading from 6.5.x to now latest stable. Actually, I did now remember that I have tried out the automatic option the last time, but then it did actually fail due to me being a bit to impatient. Things must have been improved a lot since the last time since there was no way I could interrupt things now. So - B2Evolution is still best!

Front loader, the swiss army knife

December 31st, 2017

Needed to change the light bulb, and again the combo "front loader and wife" to the rescue.

At the racecourse for the first time

December 31st, 2017

Two days ago I was invited to join a couple of friends to the racecourse at Momarken, or maybe better explained as "tag along" since I had no clue at all, but no problem anyhow, we had a lot of fun and I was even home before Elin had gone to bed, so we where all nice boys on tour.

The nerdy Xmas present - a "smart" cooking probe

December 31st, 2017

Really looking forward to trying out the new "smart cooking probe with bluetooht" on New Years Eve when the turkey is to be placed in the oven. No I do not need to be in the kitchen anymore, I can sit in the livingroom and have full control of the temprature. It will show a graph of how the temp has increased over time, and I can even share it on social cool is that? But actually, I am hoping that I at least can stand outside and check the temp since for instance when preparing deer roast I put it in the oven for several hours and just go outside, so based on that I do mean that I do have a valid use case for the use of the app on my phone.

The baking soda oven cleaner trick

December 31st, 2017

It does actually work

Almost no X-mas at home this year

December 31st, 2017

Had some issues the day before X-mas this year

PhantomJS and 0kb PDF-files

December 13th, 2017

Have spent the past few days troubleshooting an issue with PhantomJS. While veryfing in development and test all was fine, the application running on WebSphere did produce PDF's like a charm. But when we moved to stage that did not work. The strange thing was that all tests we did from command line was fine, but the application kept on producing 0kb files - the logs told us. Not empty files, empty PDF's produced by PhantomJS will be 5kb, so this was another issue. So, a new version of the application was deployed which did not delete from the temp folder, .js and .html file was found, but no still no PDF.

I did from previous problems know that a 0kb file on Windows is not always a real file, more a pointer to a file that was there before. And after hours of work with no progress, other than improved logging and good test suites (but not that good since they did not test what caused the error), it turned out to be a .css import in the HTML causing the error. The import statement should be environment aware, but it turned out that it was referring to the development environment. This worked out fine in test since there was no firewall blocking the endpoint, but in stage it was. HTML-files with the import statement pointing to a blocked endpoint caused PhantomJS to produce nothing. Even if the code
console.log(prettyTime() + " [INFO] Now create pdf")
page.render(output, {format: 'pdf'});
console.log(prettyTime() + " [INFO] PDF has now been created")

did not throw any error. While writing this post I did search for page.render and error handling and found this post Must admit that I do not understand what

I have changed this behavior to make it more clear. You can do catch() from promise.

really means. I will forward it to the developers. Anyhow, html-file with this error causes PhantomJS to produce nothing without any error. If we removed the import, all fine.