I'm currently experimenting MobileFirst + Ionic across all platforms(what I'd tested: IOS, Android ,Windows and Web).
The guide that I followed.
Everything was working fine except for Windows Universal platform.
I'd built with Visual Studio 2013 and deployed on Windows 8.1. The app was built without error and runs. Later, I encountered following runtime error when I performed user interaction:
'WWAHost.exe' (Script): Loaded 'Script Code (MSAppHost/2.0)'.
Exception was thrown at line 4350, column 4 in ms-appx://316fdfca-e76a-477c-8ba4-1697624e2ab4/www/default/worklight/wljq.js
0x800a139e - JavaScript runtime error: SyntaxError
Exception was thrown at line 4368, column 4 in ms-appx://316fdfca-e76a-477c-8ba4-1697624e2ab4/www/default/worklight/wljq.js
0x800a139e - JavaScript runtime error: SyntaxError
Exception was thrown at line 8618, column 36 in ms-appx://316fdfca-e76a-477c-8ba4-1697624e2ab4/www/default/worklight/wljq.js
0x800a01ad - JavaScript runtime error: Automation server can't create object
Exception was thrown at line 147, column 118 in ms-appx://316fdfca-e76a-477c-8ba4-1697624e2ab4/www/default/worklight/worklight.js
0x800a1391 - JavaScript runtime error: 'crypto' is undefined
Exception was thrown at line 15274, column 11 in ms-appx://316fdfca-e76a-477c-8ba4-1697624e2ab4/www/default/3party/ionic/js/ionic.bundle.js
0x800a139e - JavaScript runtime error: [$injector:nomod] Module 'ngLocale' is not available! You either misspelled the module name or forgot to load it. If registering a module ensure that you specify the dependencies as the second argument.
http://errors.angularjs.org/1.4.3/$injector/nomod?p0=ngLocale
I also included winstore-jscompat.js in my project.
Any help will be appreciated.
According to IBM:
If you are developing a Windows 8 app with Worklight, you may have noticed two JavaScript exceptions being thrown in Visual Studio's output window:
0x800a139e - JavaScript runtime error: SyntaxError
0x800a1391 - JavaScript runtime error: 'crypto' is undefined
Analysis of the two errors has shown that they do not result from defects in Worklight. The syntax error in /www/default/worklight/wljq.js is expected and handled by the jQuery library. Visual Studio is not aware that the jQuery library is handling it, so it will still print this error, provided it is configured to break on JavaScript errors. More details on this error can be found in this StackOverflow question:
http://stackoverflow.com/questions/24131986/0x800a139e-javascript-runtime-error-syntaxerror
The crypto error in /www/default/worklight/worklight.js results from an open source library that is used by Worklight. Since this error is outside the Worklight code base, we will not be able to provide a fix for it.
While some concern has been raised over these errors, they should not alter the app's functionality and can be safely ignored.
Source: Runtime Exceptions in Windows 8 apps
Related
I use the iText7 component for extracting text from PDF on dotnet core 3, but for no apparent reason I started to receive the following error message: AdobeGlyphList.txt loading error: The type initializer for 'iText.IO.Util.ResourceUtil' threw an exception.
The error occurs on the highlighted line.
This worked for me. Before you get to that line of code you first need to enable the
Common Language Runtime Exception
in visual studio as shown
This will throw the actual error message causing this. In my case it was a library that was being referenced by itext that was missing. I guess because of .Net core or some other reason not sure why.
I searched for the dll and referenced it in my solution and it worked
Installing NuGet Microsoft.DotNet.PlatformAbstractions worked for me.
Recently received a new Android SDK (aar) to bind in Xamarin. When initially starting the binding I receive the error
COMPILETODALVIK : Uncaught translation error : com.android.dx.cf.code.SimException: invalid opcode ba (invokedynamic requires --min-sdk-version >= 26)
This error is due to the SDK containing Java 8 (v1.8) byte code and it needs to be compatible with Java 7 (v1.7) to support lower API versions of Android.
In your Android project (not the binding project), add the following property.
<AndroidEnableDesugar>True</AndroidEnableDesugar>
or if you are in VS 2019+ you can turn on D8 which enables this by default.
<AndroidDexTool>d8</AndroidDexTool>
Desugaring is the process of allowing Java 8 byte code to be converted into Java 7 compatible byte code. This is a Google process that performs the conversion and is part of the Xamarin.Android build process.
Then if the SDK doesn't have any dependencies, it should all work. If you have EmbeddedReferenceJars, then things get more complicated.
In Visual Studio 2017 you will experience errors similar to
Error: java.lang.TypeNotPresentException : Type io.reactivex.functions.Consumer not present
It will be unable to find these types in reference jars, because the desugaring processing isn't working properly. From Github Issues you eventually find the reason:
The first fix here is to add the `--classpath_entry` flag for every
`--input`, for some reason `Desugar` is not treating `--input` jars as
classpath entries
The bug is already tracked and fixed in Visual Studio 2019 Preview 2.
Now you switch to Visual Studio 2019 Preview 2 and you will come across this error.
Java.Lang.NoClassDefFoundError: Failed resolution of: Lcom/google/devtools/build/android/desugar/runtime/ThrowableExtension;
The desugaring processing is failing again because it needs this class to help communicate to the desugared code.
The class ThrowableExtension is actually found: https://github.com/bazelbuild/bazel/blob/master/src/tools/android/java/com/google/devtools/build/android/desugar/runtime/ThrowableExtension.java
You then take that Java class and you can compile it into a jar. A quick way to do it is copy that java file into a folder. Then inside that folder create a folder called output.
Call this command
javac -d ./output ThrowableExtension.java
Then move into the output directory and call this command
jar cvf desugar.jar *
It will create desugar.jar. Add that as an EmbeddedReferenceJar in your Android binding project. Your binding with Java 8 byte code with desugaring should now work.
Hopefully this might be resolved in a future Visual Studio version, so all these steps aren't necessary, but until then, at least you know what is happening and how to fix it.
I have a VB6 DLL being accessed from some C# code.
Using the compiled & registered VB6 DLL there is no problem. But when I load the VB6 source into the VB6 IDE and run the project, the next run of the C# code will fail with the error below.
Stopping the running DLL in the VB6 IDE will again allow the C# program to work from the compiled DLL.
The VB6 DLL is compiled with binary compatibility.
The error message I receive in C# is:
An unhandled exception of type 'System.InvalidCastException' occurred
in appname.exe
Additional information:
Unable to cast COM object of type 'dllname.classnameClass' to
interface type 'dllname._classname'.
This operation failed because the QueryInterface call on the COM
component for the interface with IID
'{D8AB6D65-F5E7-4B9C-A039-67DDC630E5F7}' failed due to the following
error:
Error loading type library/DLL. (Exception from HRESULT: 0x80029C4A
(TYPE_E_CANTLOADLIBRARY)).
Specifically this error occurs when the C# code tries to access any part of the interop object which actually comes from the underlying COM object. But accessing .NET Object-derived things like .ToString() work fine on that object.
Why am I getting this error?
Furthermore:
If I compile the C# code when the VB6 code is NOT running, it builds fine. But compiling when the VB6 code IS running, then I get an error:
BC30002 dllname.classname is not defined.
Thanks
Maybe someone else will have a deeper understanding, but this is what I eventually figured out:
Running either Visual Studio (.NET) or Visual Basic 6 as ADMIN while debugging in this scenario would cause the error. Running BOTH as WITHOUT ADMIN rights then it would work.
The quandary is that admin rights are needed for certain build operations (specifically, registering COM DLLs automatically). So that was the pitfall; ultimately I had to repeatedly switch between admin/non-admin settings for both tools in order to code-test-modify...
Note - when I've debugged in a different scenario where the program is a VB6 EXE debugging into C# code, this was never a problem. Everything could run in as admin no problem.
I'm currently using MinGW with a gcc 4.6 (nuwen distribution, also tried another one) and whenever an exception is about to be thrown in my application, the application crashes and I only get this:
"This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information."
Is it possible to fix this?
This only happens when some file is linked which includes a xerces-c header
I set up the environment according to this tutorial:
http://opencv.willowgarage.com/wiki/VisualC%2B%2B_VS2010
However the picture they want you to use is no longer there, so I just saved the supplied screen shot with the same name as the original file.
Builds fine, Begins to run but then I get a runtime error
Here is the runtime error:
OpenCV_HelloWorld.exe - Application Error : The application was unable to start correctly (0xc0150002). Click OK to close the application.
I looked in Event Viewer and found that it also set off a another error but did not announce
Here is the unannounced error:
Activation context generation failed for "C:\OpenCV2.1\bin\cxcore210d.dll". Dependent Assembly Microsoft.VC90.DebugCRT,processorArchitecture="x86",publicKeyToken="1fc8b3b9a1e18e3b",type="win32",version="9.0.21022.8" could not be found. Please use sxstrace.exe for detailed diagnosis.
As you can see it says to use sxstrace.exe however I don't appear to have that program. After a quick Google I read that the program was included in the Microsoft Windows Platform SDK, so I'm downloading the most relevant version (windows 7 version for c# and .net) and installing that to follow up on that, I'll post what I find as it comes.
Any help is very much appreciated
Unexpectedly the project builds and runs now. The only modifications made were removing spaces in the c++ directory and linker options from the tutorial. External changes were the completed installation of the windows platform SDK, however OpenCV has no dependencies with windows platform sdk. I am unsure how it was resolved, but it's no longer a problem.