Friday, January 22, 2016

File attachments in Android 2.3 and GMail


This post is about how to add attachments in GMail in Android 2.3.x from the file system.

Granted, many people are stuck with Android 2.3.x, so the post is specific to that branch of Android.

GMail app

This happened to me with the GMail app version 2.3.6 in Android 2.3.6 on a lower-end Samsung phone.

A few days ago (that was around 17.05.2015) I was trying to send two crash log files of a different app to its developer via Android's GMail app, and for some reason, sending the e-mail didn't work. I don't quite know why, and I lost the e-mail. One attachment was relatively small, and another was around 860 Kb (a bit large in some respects). I haven't investigated this issue online.

A day later, putting attachments in an e-mail in the Android GMail app and seeing that same letter as a draft in GMail on the web did work:
• If you insert attachments first in the GMail app, then do write some text into the message area, which unblocks the save-as-draft button; save the letter as draft and sync.

I haven't investigated how to do that in a browser in GMail, given that the GMail app method worked out for me.

Thursday, January 21, 2016

Can't see Instagram in Firefox?

Trouble was, that Instagram and embedded Instagram pictures recently stopped loading in Firefox.
This also affects other Gecko-based browsers.
> If you want to skip the story, jump to solution.

While I also use NoScript on desktop Firefox, and on Firefox for Android, all the necessary instagram domains were allowed.

On the desktop, I'm mostly using Firefox 39.0.3, because it plays well with Flash. (There were no issues like that with other browsers.) First I thought, that this was because I wasn't using the latest Firefox. As this Firefox version plays well with Flash, I didn't want to upgrade to the latest version, because with the latest Firefox, Flash playback on YouTube is jerky since Firefox 40.

But the Instagram issue repeated, when I was also using the latest Firefox for Android. Initially I thought, that this was the fault of Instagram, and since I don't use Instagram or Facebook, I didn't think much beyond that. And for a month or so, I couln't resolve it.

But when Instagram showed in a different computer in the latest desktop Firefox (43.0.4) with the same extensions installed, I began to investigate again.

When reloading a random Instagram page while also watching the Firefox Browser Console, I found an error, which, in pasted form, looks like this:
05:16:59.308 An error occurred during a connection to instagramstatic-a.akamaihd.net:443.

Peer attempted old style (potentially vulnerable) handshake.

(Error code: ssl_error_unsafe_negotiation)
1
After some searching, I found the solution in a game forum.

SSL safe negotiation setting

Turned out, that when perusing the Privacy Settings extension of Firefox, I had turned all the settings to most secure, and among them turned on security.ssl.require_safe_negotiation. After I turned that off, Instagram showed again.

If you don't have the Privacy Settings extension installed, go to about:config and type in or paste security.ssl.require_safe_negotiation . The boolean setting value for it should be false. If not (if it's true), then double-click the setting or press enter on it to set it to false. Or right-click for context menu to Toggle.


Otherwise, the Privacy Settings extension is awesome, and I recommend it to everyone.

Whereas people who manage instagramstatic-a.akamaihd.net, should implement new-style SSL/TLS handshakes to keep their corner of the web safe.

So this was the issue that affected me.

NoScript

If, on the other hand, the above is not an issue, then you might be having NoScript installed to defend your browser from malware, and among other things, it's blocking Instagram domains, which means they're not in the whitelist. Jump to domains.

NoScript has a blue "S" button that shows the status of whether a page is completely blocked, half-blocked (content from other domains has been blocked, which is most common), or completely allowed.

That button is usually visible in the location bar, or accessible through Firefox's hamburger menu. (If the blue 'S' is not there either, click the green Customize button in the hamburger menu to see if the NoScript button is listed in the 'Additional Tools and Features' section.)

One can change NoScript domain permissions thus:
* Hover the pointer over the blue "S" button, which launches a menu with a list of domains. If the NoScript menu is very long, it has small up and down arrows for scrolling.
* To whitelist a domain, click on "Allow domainname.tld". Alternately, domains can be blocked by clicking on "Block domainname.tld". This can be done in one go for several domains.
* Once the cursor hovers away from the menu, NoScript will automatically reload the affected page (or pages in other tabs). If a page or pages don't reload (per custom settings), they can be reloaded manually.

For Instagram, the following domain names must be allowed:
platform.instagram.com
instagramstatic-a.akamaihd.net
www.instagram.com
The above are all third-level domains, because they contain three name components separated by periods/dots.

By default, NoScript shows only base second-level domains, such as instagram.com without the www and a dot. For most common users with NoScript, allowing instagram.com and akamaihd.net is sufficient.

Monday, January 18, 2016

Independence Day: Resurgence website and Firefox

A quick post: www.warof1996.com might not display in Firefox and other Gecko-based browsers.

The reason is that the site is based on WebGL, and Firefox blocks WebGL, if the GPU (video card) driver is out of date or does not support WebGL.

The solution in Windows is to update GPU drivers either through the computer manufacturer's website or through the site of the GPU supplier — one of Intel, nVidia, or AMD/ATI, but not limited to only these.

Thorough care should be taken to match the driver to the correct display adapter model.

If that doesn't work, the GPU is too old, or EOL'd.
I strongly recommend not to force Firefox to use WebGL, because this move can damage hardware.
The alternative is to use Google Chrome or Chromium, which probably uses a CPU-based workaround; but if either the graphics adapter or the CPU or both are too old, then rendering is unlikely to work, or is too slow.

> Explanation — contains minimum driver versions that support WebGL.

In addition, visit about:support in Firefox and the Graphics section therein, which also recommends the minimum driver version for WebGL (Direct2D, etc). The posting contains the same warnings about possible damage to hardware if Firefox were forced to use WebGL.

System requirements

This table is incomplete. I've only gotten to test the website on three computers (with some reservations), and gotten an external report about another.
PCHardware/software specifications
CPUGPURAMOSFxChromeNotes
ASUS K53SC notebookIntel Core i3 2310M @ 2.1 GHz, dual-corei:Intel HD Graphics 3000
d:nVidia GeForce GT 520MX
4 Gb DDR3, 665.1 MHzWindows 7 SP1YesYesRequired driver updates: I had to upgrade both Intel and nVidia drivers through downloading them from their respective websites.
ASUS U46SVIntel Core i5 2410M @ 2.3 GHz, dual-corei: Intel HD Graphics 30008 GbWindows 10 (build unknown)SlowNot testedWebsite opens, but performance is slow and jerky, and the fan began working intensely.
d:nVidia GeForce GT 540M
ThinkPad R60e (0657-3WG)Intel Core Duo T2400 (Centrino)Mobile Intel 945GM Express2 Gb DDR2
(an upgrade from just 512 Mb)
Windows XP SP3NoSlow / okRendering was slow, but the site was usable.
Chrome: 48.0.2564.109 32-bit; Blink 537.36 JavaScript: V8 4.8.271.19, (This version already announced that it's to be retired on Windows xp.)
Instead of OpenGL, Chrome's default renderer in Windows is ANGLE, which translates OpenGL ES to Direct3D, as it has better driver support. Thus, results for Chrome can differ.
hp dv5204ea notebookIntel Celeron M 410 @ 1.46 GHzMobile Intel 945GM Express1 Gb DDR2, 266 MHzWindows XP SP3NoToo slowWhile I did upgrade the driver, its version is still less than required: The latest Windows XP driver for this GPU is 6.14.10.4926 (15.02.2008), but Firefox wants at least version "6.1400.1000.5218".
PCCPUGPURAMOSFxChrome
All this does not yet indicate much as to what the titular website's actual system requirements are. In notebook computers, the default video card used by any program in Windows is the integrated adapter, while nVidia software provides an option to launch programs using its own GPU.

The Asus notebook with greater specifications falls below the threshold, whereas the Asus notebook with slightly lesser specs, an older operating system and updated video drivers shows the website nicely.