Error in latin.js when the keyboard is called - firefox-os

I tried to add localization to my app. Using l10n.js worked just fine when I languages in the simulator to test it. But implementing l10n_date.js caused an error I couldn't figure out. So I pulled all references to localization from the code and the manifest. I figured I'll try again later.
However, when I run the app in the 1.3 simulator now, I get strange behavior. The moment the focus is on the input field and the keyboard pops up, all CSS formatting disappears. I thought it was an error in my code, but when I dug deeper, I found this error:
setLanguage: Unknown language: en_us: [Exception... "File error: Not found" nsresult: "0x80520012 (NS_ERROR_FILE_NOT_FOUND)" location: "JS frame :: app://keyboard.gaiamobile.org/js/imes/latin/worker.js :: setLanguage :: line 64" data: no]" latin.js:262
The moment the keyboard disappears, the formatting comes back. I'm assuming this happened because I switched languages before.

Related

Cannot export Sketch file to Zeplin. Forbidden 403 Error

I am new to both Sketch and Zeplin.
When I am exporting my artboard by pressing cmd + E everything seems to be fine.
Zeplin prompts me to select a project. When I select a project to export into, I get a notification saying "Exported 1 screen(s) to ProjectName".
However a short time later it gives me a error dialog and I cannot see any screen in my Zeplin project.
Here is the error dialog:
Note: My sketch app is in its trial period. But it's functioning well, besides this problem.
Thanks to #zeplin_io's fast support on Twitter I solved my problem.
Adjusting my Mac's Date & Time Pref.s to Auto solved issue.

WinRT - Windows Store - WinRT Originate Error - How do decipher such an error?

I'm working on a Windows Store app and I'm getting a WinRT error that doesn't really give me any information so I would like to know how to understand these sorts of errors.
Basically I get the error on the following line which is called inside OnPointerPressed:
m_gestureRecognizer->ProcessDownEvent(args->GetCurrentPoint(nullptr));
The error is:
First-chance exception at 0x76F54B32 (KernelBase.dll) in DXAML2.exe: 0x40080201: WinRT originate error (parameters: 0x80070057, 0x00000044, 0x03CEE72C).
This error didn't used to appear, the only thing I've changed is that this line is now wrapped in an if clause which tests if the current pointer's PointerId is the same as one I've stored just using == such as:
if(args->GetCurrentPoint(nullptr)->PointerId == m_UIPointerID)
I have no idea why this has started happening.
So my question is in two parts:
More generally, how do I understand what an error such as the above means?
And does anyone know this error has suddenly started happening now that I check the pointerId?
Thanks for your time.
P.S. I guess another thing that has changed is that there will already be 2 pointers on the screen (the one that gets pushed into this GestureRecognizer) as well as another one, hence the PointerId check.
"How to Decipher such an error"...
For any WinRT originate error, you can take the third address in the parameters list (in your example, 0x03CEE72C), and find a description of your error in the memory window.
While debugging, break when your error is thrown and open the memory window via Debug -> Windows -> Memory -> Memory 1
Copy and paste the address to get your "easy-to-find" error message.
As Raman said - it's good to look up the hex values shown. The first one is the memory location which won't tell you much without the symbols/source, which in this case is reported directly by Windows. Perhaps the public symbols can shed some more light on where the error came from, but the error code lookups are more helpful.
If you Bing for 0x80070057 you will find an MSDN article on Common HRESULT Values which lists
E_INVALIDARG : One or more arguments are not valid : 0x80070057
It doesn't give you all the details of course, so you're off to theorize. Perhaps you can only call args->GetCurrentPoint(nullptr) once and you should store/reuse the value? Maybe gesture recognizer is not configured correctly? Maybe the app window is not visible at the time the exception is thrown or the thread is wrong. Maybe some expected calls to gesture recognizer were missed due to filtering those out with these "if" statements.

Make Greasemonkey throw error on undefined variable

I've recently switched from chrome to firefox for greasemonkey development. I have some problems with debugging.
The following func
I meant to write:
self = this;
but instead I wrote
this=self;
Self wasn't defined, so the script didn't run, however, nor did I get any javascript error. Why and can I get them somehow? I get some errors.
Unfortunately, Greasemonkey - and javascript in general, along with at least a few other non-compiled languages - do not give very good debugging errors... I can't count the number of times it tells me there is a missing ) at the end of an argument list that doesn't exist, and it turns out my error is elsewhere...
When a script of mine won't run I add an alert after any value assignments and if they don't alert or alert the wrong data I have found the problem... for your example above I would debug by:
this=self;
alert(self);
Although I would probably see the problem when I went to add the alert, but if I didn't notice - the alert either wouldn't pop up or it would have the wrong value... and if it didn't pop up, the error console would likely say self not defined.

Why this element is "undefined" -- it clearly exists

I am getting what seems to be a very odd error in a web page. This is happening in both VS2008 and VS2012. In the following:
<div class="content_header" onclick="tierMenu(menu2,img2)">
<img id="img2" alt="Colapse Trips" height="9" src="Images/plus.gif" width="9" />
Travel Summary
</div>
clicking the plus image is supposed to change the image to a minus (expanding the item to display data). The tierMenu javascript method is called upon clicking, and it exists. But I am getting an error:
0x800a1391 - Microsoft JScript runtime error: 'img2' is undefined
"Img2" definitely exists. There is similar code in other places in the page, and they all behave the same way -- getting the same error. Odd thing is, the code is working fine in production. It's calling:
function tierMenu(objMenu,objImage)
{
if(objMenu && objImage)
{
...
}
}
It happens that my dev machine is 64-bit Windows 7. I can't imagine that this would be a problem. Any ideas?
Edited to Add: A colleague whose workstation is Win XP tried this on VS2008 and the problem did not occur. Really odd. The problem occurs on my workstation even when running outside of Visual Studio, i.e. directly from the browser using localhost.
This turns out to be a browser compatibility issue. If I put IE9 into compatibility mode the problem goes away.
It isn't the first time compatibility has beat me over the head. I will have to learn to try that first thing as soon as something weird like this happens.
Thanks to everyone who looked at this and puzzled over it with me.

Flashdevelop + haxe -- repeated "An I/O error has occured" errors

I'm getting small dialog boxes that pop up saying I/O Error occurred. What causes this, and how should I fix this?
Edit: what happens is that after i run my flash game, FlashDevelop will try to connect to the Flash debugger, but apparently fail and give me the above error. I have both the debug standalone player and the ActiveX debug control for Firefox.
To activate interactive debugging with haxe/Flash/FlashDevelop you have to add the fdb switch and network-sandbox. To do that open Project -> Properties -> Compiler Options -> Directives and add the following two lines:
fdb
network-sandbox
That should be all you need. After that you should be able to set breakpoints, inspect object fields and local variables and profile your code.
I didn't have haxe, but I had the same error and to get rid of it I followed the advice from here:
Specify the path to the debug player
(flashplayer_10_sa_debug.exe or
FlashPlayerDebug.exe in the SDK) in
FlashDevelop Tools > Program settings > FlashViewer

Resources