Global error handlers in AIR/HTML
Dear Adobe,
there is good article on flobal error handling in Flex and AIR 2.0: http://www.adobe.com/devnet/flex/articles/global-exception-handling.html
Is there a global javascript exception handling mechanism in AIR/HTML? window.onerror does not work (that seems to be Webkit bug fixed in latest Chrome, but not yet in the AIR environment).
Dear Adobe,
any thoughts?)
Similar Messages
-
i have a macbbook air(2013) using mountain lion 10.9.2 i have photoshop cs4 and now get error 150:30(license error), i tried looking to delete flex net program but i don't seem to have it. how do i resolve this?
Please refer:
http://helpx.adobe.com/x-productkb/global/error-licensing-stopped-mac-os.html
Regards,
Ashutosh -
Flex bug in global error handling
My application's global error handler (uncaught error handler) works mostly, but I found a case where it doesn't work, but should. Before I filed an official bug report I wanted to post the issue here.
Here is the issue: in a module, ErrorEvents that are not listened for and are dispatched by a Flex component are never caught in the application's uncaught error handler.
I have a sample project that demonstrates this. Here is the module in my test case:
<?xml version="1.0" encoding="utf-8"?>
<s:Module xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx">
<fx:Script>
<![CDATA[
private function onClickSparkDispatch():void {
dispatchEvent( new ErrorEvent( ErrorEvent.ERROR, false, false, "test" ) ); // this isn't caught in the uncaught error handler
private function onClickNonSparkDispatch():void {
var nonSparkDispatcher:EventDispatcher = new EventDispatcher();
nonSparkDispatcher.dispatchEvent( new ErrorEvent( ErrorEvent.ERROR, false, false, "test" ) ); // this is caught in the uncaught error handler
]]>
</fx:Script>
<s:HGroup>
<s:Button label="Module Spark Dispatch (broken)" click="onClickSparkDispatch()" />
<s:Button label="Module Non-Spark Dispatch" click="onClickNonSparkDispatch()" />
</s:HGroup>
</s:Module>
Using Flex 4.6
My application statically links in the Flex SDK ("merged into code" in Flash Builder).
My applications works around these two exsiting bugs:
https://bugs.adobe.com/jira/browse/SDK-28018
http://blogs.adobe.com/aharui/2011/04/catching-uncaughterror-in-flex-modules.html
Is this a bug?
Thanks,
RickIt’s been reported. Here is more information and a workaround. http://blogs.adobe.com/aharui/2011/04/catching-uncaughterror-in-flex-modules.html
-
Global error page - compatible with partial page rendering
My global error page doesn't show in some isolated cases. Could this be because of partial page rendering? What changes might be needed to have it work in all cases?
I have created a global error page and set it in the web.xml with:
<error-page>
<exception-type>java.lang.Exception</exception-type>
<location>pages/htmlErrorPage.html</location>
</error-page>
This displays the htmlErrorPage when errors occur in nearly all my tested cases. However, when the test error is created inside one page redraw I find that the application dies without ever displaying my error page. On the console I get an error message that starts with:
Jun 13, 2008 12:54:11 PM oracle.adfinternal.view.faces.renderkit.core.xhtml.PanelPartialRootRenderer encodeAll
SEVERE: Error during partial-page rendering
javax.faces.el.EvaluationException: javax.faces.FacesException: javax.faces.FacesException: Can't instantiate class: 'com.softrek.adf.view.managed.JFreeChartPlotter'.. class com.softrek.adf.view.managed.JFreeChartPlotter : java.lang.NullPointerException
at com.sun.faces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:190)
at com.sun.faces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:143)
But my error page doesn' t show up. I've used the identical test error in most other parts of my application and it shows - so other than the partial page rendering going on, I can't see why this case would be different.
Is there any known bug (or feature) about the use of an error page during partial page rendering?
Any ideas will be welcome.I'm unclear on how I would get the error to redirect.
I've changed my web.xml to go to a servlet of my creation, set up the mapping and all.
It works fine for exceptions generated in a backing bean normally.
When the exception occurs as part of partial page rendering the error servlet is not called and the user's session dies.
This is being done in JDeveloper 10.1.3.3
The new web.xml contains:
<error-page>
<exception-type>java.lang.Throwable</exception-type>
<location>/servlet/errorAction</location>
</error-page>
Which is working for errors generated under most circumstances but not when they are inside my partial page change.
How do I get errors to go to my error page when the error occurred during PPR?
PS. Using the PartialPageUtils.isPartialRequest() method generated a recursive error in my error servlet. This looks like the known limitation for Faces error handling. -
A few days ago I very happily discovered the new global error handling available in flash-player (FP) 10.1
Now while all works well in Firefox (using Adobe's FP 10.1.102.64), nothing happens in Chrome (using Google's FP 10.1.103.22).
I can disable Google's FP using the "about:plugins" page in Chrome, restart the browser, and then everything works since the browser falls back to the other flash plugin installed, which is again Adobe's FP 10.1.102.64.
Is this a known bug?Don't tell me the uncaught error handler only works for a debugger version....??
The documentation, which I read quite carefully, doesn't have a word on this. It suggests rather the opposite:
"When content is running in a debugger version of the runtime, such as the debugger version of Flash Player or the AIR Debug Launcher (ADL), an uncaught error dialog appears when an uncaught error happens. For those runtime versions, the error dialog appears even when a listener is registered for the uncaughtError event. To prevent the dialog from appearing in that situation, call the UncaughtErrorEvent object's preventDefault() method." -
Global Error Handling - Possible?
Hi there!
Does anyone know if it's possible to catch unhandled errors
that occur in a flex application globally?
The Application.error event allows you to capture Error
Events that arise when communication with the outside world fails
for one reason or another, but as much as I've googled I haven't
been able to find anything for capturing coding errors such as
nullpointers etc. at runtime without wrapping every single line of
code with a try-catch.
In an ideal world I would like to catch these errors and
report them for logging on the server. Has anyone managed to
achieve this without resorting to try-catch-spamming?
The Flex-application in question is a central part of an
e-commerse system so it's rather silly that live errors remain
largely untracked...
Your thoughts would be highly appreciated!Hi,
Try referring the below links...
http://www.summa-tech.com/blog/2010/01/04/global-error-handling-in-flex/
http://livedocs.adobe.com/flex/3/html/help.html?content=11_Handling_errors_06.html
You have one sample demo with source in first link.
Hope this will be helpful.
If this post answers your question or helps, please kindly mark it as such.
Thanks,
Bhasker Chari -
Hello All,
I want to know if there is away to do Global Error Handling in Flex so that in case of any error, the pop-up (showing the exception stack trace) on the client machine should not come, instead I would be able to handle the exception in a more subtle manner.
Can I do something at the application level to prevent this ?? or should it be handled in each Flex method individually, code enclosed between try-catch blocks ?
Thanks & Regards,
AgrajHi,
Try referring the below links...
http://www.summa-tech.com/blog/2010/01/04/global-error-handling-in-flex/
http://livedocs.adobe.com/flex/3/html/help.html?content=11_Handling_errors_06.html
You have one sample demo with source in first link.
Hope this will be helpful.
If this post answers your question or helps, please kindly mark it as such.
Thanks,
Bhasker Chari -
Error while installign AIR Application (invalid package signature errorID=5022)
Hi All,
I am new to Adobe AIR and facing error while Installing AIR application. This specially happens when in include a folder named "htmls" in the assets directory in my project.
This folder have lots of html files and others folders. These file names have some special characters as well like ". & - _".
However I can install the Application when I exclude this folder and everything works fine. Not able to find out the exact problem.
Looking forward for help !!
Log contents:
.airappinstall
failed while unpackaging: [ErrorEvent type="error" bubbles=false cancelable=false eventPhase=2 text="invalid package signature" errorID=5022]
starting cleanup of temporary files
application installer exiting
.airinstall
App installer failed; exit code 7
begin quittingYou may have found a bug in the AIR installer or packager. Given that the signature is an XML file, the "&" character seems the most likely culprit.
The only short-term workaround is to identify which characters cause the problem and avoid using it.
You should avoid the following characters in any case, since these cannot be used in file names on all platforms:
Character Hexcode
various 0x00 - x1F
* x2A
" x22
: x3A
> x3C
< x3E
? x3F
\ x5C
| x7C -
Using Facebook SDK in Air HTML environment
Hi,
I am building an AIR application using HTML/JS and I'm trying to work with Facebook Javascript SDK for some simple functionality.
It seem however when running and an AIR environment I am not able to access the FB object.
I have the SDK locally so I know its there but simple FB.init() and FB.login() are non-existent and without errors...
I also tried using the FB AS3 library by incldeding it in <script> tags but this gives me an error
TypeError new window.runtime.com.facebook.graph.Facebook() is not a constructor
Don't know if its because my xml namespace is version 2.0 and not 1.5 (1.5 errors as well but it says some IFilePromise class is not found.
Can the Javascript SDK be used in building Adobe AIR HTML apps?Annoyingly the SDK hasn't been updated in over three years. I've had a casual look via Visual Studio's object inspector to see if I can spot any new methods or properties that could be useful but if they are there then they are hidden well. Media Kind, for example, was introduced in iTunes 9, I think, but can't be read from code.
I don't know what tasks you're hoping to automate, but you might find some of my scripts useful either in their own right or as food for thought.
tt2 -
Consuming SOAP services from AIR/HTML (JavaScript).
Hi All.
I am trying to consume SOAP web services from an AIR/HTML application for a research on AIR I am doing for my company, and I am having very little success.
I am creating JavaScript clients using apache's cxf wsdl2js utility.
When I try to use the client to call any web service I've tried, I always get an 'error 500' response.
The web services work fine if i call them from other clients.
Before trying cxf generated clients I googled a lot to see if there was a more native way of doing these calls from AIR, but found nothing. I don't see anything in documentation or the web about it.
Am I the only one trying this?
Could this be a cross-domain issue? I'm certainly hoping AIR apps don't have this issue.
Any pointers as to how to succesfully consume SOAP services from AIR is greatly appreciated.
Thanks!In Visual Basic, you can set Network Credentials like this (assuming that you first declare Public CallWebService001 As New <WebReference>):
' Create a new instance of CredentialCache.
Dim mycredentialCache As Net.CredentialCache = New Net.CredentialCache()
' Create a new instance of NetworkCredential using the client
' credentials.
Dim credentials As Net.NetworkCredential = New Net.NetworkCredential(<username>, <password>)
' Add the NetworkCredential to the CredentialCache.
mycredentialCache.Add(New Uri(CallWebService001.Url), "Basic", credentials)
' Add the CredentialCache to the proxy class credentials.
CallWebService001.Credentials = mycredentialCache -
Adobe Air - HTML, Javascript and Threading
Hello,
I am developing an application using Adobe Air - HTML and
Javascript. What I am trying to do is to implement threading in
Javascript. I am using implementing threading in Javascript as per
this Neil blog.
Click
Here. It clearly says that this threading works only in Firefox
2.0 and I am trying to use this in with my Adobe Air, but when I
try to refer a function , it gives me error saying "unable to find
it".
I was wondering if this is the best way to go for threading
in Adobe Air HTML application or there is some other way also.
Thanks,
JaikishanHi jjalan,
The yield and generator functionality is only available in
Firefox's javascript execution engine. When you are executing
javascript in AIR, it is done by the webkit and squirrelfish. Take
a look at
http://webkit.org/blog/189/announcing-squirrelfish/
If you can find a javascript library that works on safari /
webkit, chances are high that it may work in AIR.
Also, you can always do pseudo-threading via the age old
setTimeout() -
Define global error page on global-web.xml
Dear fellows:
We want to create a common 404 web error page for all our J2EE applications. We have added these error pages to the global-web.xml through the Visual Administrator:
on several system local folders such as:
usrsap<SID><j2ee-instance>j2eecluster
usrsap<SID><j2ee-instance>j2eecluster<server-inst>
usrsap<SID><j2ee-instance>j2eecluster<server-inst>apps
usrsap<SID><j2ee-instance>j2eecluster<server-inst>sap.com
However, everytime we provoke the server error in order to retreive this Global Error Web Page, the system does not seem to find our custom error page, giving the following message:
The request cant be processed.
Details: Requested resource ( /testerrorpage.html ) not found.
We have discovered that the application was not trying to look up for our web Error page, but for another one located inside the application. However, we don't want to add a specific application web page but a global one common for all of them.
Since there is not any common folder, such as global/root folder, we dont know where the custom error page should be placed. Do we need to do something else?
We are currently using WAS: 6.40 SP 11 PatchLevel 89291.313.
Does anyone know how to configure this global error page? It is possible to do it?
Thank you
Gonzalo
Message was edited by: Gonzalo Pérez-PrimHello,
Yes, Uvaylo is right, the only way to edit the content of the global-web.xml is through the visual administrator --> Configuration Adapter.
I have the same problem as Gonzalo, I have modified the global-web.xml and added custom errors pages for each HTTP error and exceptions. The big deal is when I try to specify in the <b>location</b> field of <b>error-page</b> item: I dont know where I should place my custom error page. I have tried the same paths as Gonzalo did with the same result, when the error event is raised the error page is not found. In the log appears the following entry:
Processing an http request by the error page [/testerrorpage.html] finished with errors.
Probably the exception [com.sap.engine.services.servlets_jsp.server.exceptions.ServletNotFoundException:
Requested resource ( /custom_error.html ) not found.]
thrown by the requested servlet [/testerrorpage.html] cannot be processed.
The error is: com.sap.engine.services.servlets_jsp.server.exc
Please help! Where can I place my custom error pages, to make them available for all the applications of the server?
Thanks in advance for your help! -
Writing customized error handlers
Hi
I am trying out the exception handler example of Duncan Mein's at
http://djmein.blogspot.com/2007/04/custom-error-handling-in-apex.html.
In the example he talks about writing an Exception Handlers.
where is this done in apex
regards
TonyIt's not a validation that produces that message. It's a URL redirect to the f procedure that contains the notification_msg argument. You really can't use the same method in your application as messages like this also require that a checksum be passed to f.
You can use process error messages (an attribute of a page process) containing session state references though. Like "Process Failed: error code: &P55_ERROR. ". Of course your code has to save an appropriate value into P55_ERROR first.
May I ask why you aren't going to use/build upon Duncan Mein's method?
Scott -
Errors during packaging AIR mobile application.
I have two problems with AIR 3.7.
First problem is the same as described in topic http://forums.adobe.com/message/5211842
If I compile with flah -debug=true it is ok. But with -debug=false I can't package my .apk/ipa file because of error:
"error 304: Initial window content is invalid"
I tried with newest AIR SDK beta (downloaded from http://labs.adobe.com/downloads/air.html) dated as "Apr 16 2013" (build number 1680) but the same result.
Second problem is when I try to use .swf file compiled with -debug=true flag. Here is output:
'/opt/adobe_sdks/AIR_3.7/bin/adt' -package -target ipa-ad-hoc -provisioning-profile 'Profil_Radek_B.mobileprovision' -storetype pkcs12 -keystore 'Iphone Developer Radoslaw Bulat.p12' -storepass XXXX test.ipa test-app.xml icons/icon114.png icons/icon128.png icons/icon16.png icons/icon32.png icons/icon36.png icons/icon48.png icons/icon512.png icons/icon57.png icons/icon72.png test.swf
Exception in thread "main" java.lang.Error: Unable to find named traits: org.papervision3d.core.geom::Pixels
at adobe.abc.Domain.resolveTypeName(Domain.java:232)
at adobe.abc.Domain.resolveTypeName(Domain.java:149)
at adobe.abc.GlobalOptimizer$InputAbc.resolveTypeName(GlobalOptimizer.java:273)
at adobe.abc.GlobalOptimizer$InputAbc.resolveSlotType(GlobalOptimizer.java:956)
at adobe.abc.GlobalOptimizer$InputAbc.resolveType(GlobalOptimizer.java:536)
at adobe.abc.GlobalOptimizer$InputAbc.resolveTypes(GlobalOptimizer.java:449)
at adobe.abc.LLVMEmitter.generateBitcode(LLVMEmitter.java:332)
at com.adobe.air.ipa.AOTCompiler.convertAbcToLlvmBitcodeImpl(AOTCompiler.java:611)
at com.adobe.air.ipa.BitcodeGenerator.main(BitcodeGenerator.java:104)
If I try to package .apk file everything is ok.
Here are additional commands I use:
$ /opt/adobe_sdks/AIR_3.7/bin/mxmlc -version
Version 2.0.0 build 353448
$ /opt/adobe_sdks/AIR_3.7/bin/amxmlc -compiler.source-path project-air/src/ flash/src/ flash/lib/GreenSock/ flash/lib/HiResStats/lib/ flash/lib/as3corelib/ flash/lib/asunit/ flash/lib/mochi/src/ flash/lib/starling/src/ flash/lib/starling-imagebatch/src/ flash/lib/feathersui/src/ -swf-version=20 -static-link-runtime-shared-libraries=true -locale en_US -define=CONFIG::DEBUG,false -frame start "App" -define=CONFIG::CLASSIC,true -compiler.include-libraries flash/lib/assets.swc flash/lib/flash.swc flash/lib/analytics.swc flash/lib/as3crypto.swc flash/lib/CJSignals\ 1.0.32.swc flash/lib/Stardust\ 1.3.186.swc flash/lib/PNGEncoder2.swc -managers flash.fonts.AFEFontManager -debug=true -o test.swf project-air/src/AirMain.asI checked attached project from https://bugbase.adobe.com/index.cfm?event=bug&id=3532285 and my results are as follows:
If I compile it as it was stated in compile_and_package.bat file ($AIR_HOME/bin/amxmlc +configname=airmobile -swf-version=$SWF_VERSION -debug=false -output out/Main_non_debug.swf src/Main.as) it works ok
But if I change "+configname=airmobile" to "+configname=air" (which I believe is default) it will produce bad .swf file (which I cannot package with adt).
I've tried it with my project and results are the same: with +configname=airmobile it works ok but with +configname=air it produce bad .swf.
Could you please verify if it behaves the same for you? -
How can i set a global error page for all error cod
how can i set a global error page for all error code?
i don't want to leave a long list in the web.xml file.could any one help me?
thanksIf u have a common Error JSP named as ErrorPage.jsp
You need to have the following piece of code in the JSP as :
<%@ page isErrorPage ="true"%>
This makes it as the Common Error Page for the Application. Now all you need to do is from other JSP's throw the Exception to teh container. The container will redirect to this Page and process accordingly.
Thanks and regards,
Pazhanikanthan. P
Maybe you are looking for
-
CTS Project in System Landscape
Hi, for chaRM,i want to clarrify about CTS project creation. 1. Whether CTS & IMG Project Should Exist in all satellite system ? 2. How to create a IMG & CTS Project.? In tx Solar_project_admin we can able to create the IMG project for all roles (DEV
-
Cannot find InfoProvider for selection specified
Hi All, When executed RSPLAN in BI System , it took us to EP screen , in that InfoProvider , Aggregation Levels , Filter....etc tabs are there. When selected InfoProvider , Z* or * or empty and when clicked on start button.. The following message is
-
Customer Services : disconnection
how to complete disconnection if meter is not found on site?
-
Unable to send Book from Lightroom 5 to Blurb
I have Lightroom and a Mac computer About a month ago , I uploaded my book to Blurb from Lightroom - no issues. Today after taking out a few photos , also removing 2 page spreads , justifying the printed pages to the right instead of the middle of th
-
it's a shame progress causes the loss of functionality... you can no longer navigate without looking at your ipod. yeah the screen is nice but i'm quite active and i don't want to pull the ipod out everytime i adjust the volume or fast-forward/skip s