[flexcoders] Re: LocalConnection issue in AIR to AIR application
Hi, Kevin! To answer your earlier question, yes, the error was coming from the Send side. The error only occurs if the listening ( Connected ) application is not running and connection or if the Send( name ) specifies an incorrect name. The problem was the difficulty of the PublisherId not being available in the debugger for my Sending app while my real listening app was running ( not in the debugger ). I will try your suggestion to use the -PubId argument to ADL. It has been painful doing deployment builds to test the code, since there is no debugger available. I resorted to adding debug code to write to a log file. I now am succesfully communicating bidirectionally between my two applications and have built the handshaking, acknowlegments, etc. needed to make it useful. Thanks for the help! Pete
[flexcoders] Re: LocalConnection issue in AIR to AIR application
Hi, Kevin. Thanks for the pointer. I looked at the example in the arthropod debugger class. Unfortunately, it is only the send half of the equation. It did point me into the direction of verifying that the domain name is correct. The error I receive from the Send status event is: type=status bubbles=false cancelable=false eventPhase=2 code=null level=error There is not much to go with. My test sample applications display the names used in the Connect and Send, everything seems to be in order. Not sure how I can post code here. A google search found only a few hits on the above error. One was the same post a few times about using in FLASH when the receiving swf file was not running. Another was in German, and my high school German was over 30 years ago. Any ideas about this are appreciated! Pete
[flexcoders] Re: LocalConnection issue in AIR to AIR application
Ok, I have found the issue. It seems that this event is thrown if the Send connection name does not match the name of an application that is currently accepting messages. In other words, the connection name used in Connect command on the receiver does not match, or the receiving application is not running. What was confusing to me was the way to get at the correct connection name for the Send command. On the receiver's Connect command, I used this: _InterCommAppTestB. It gets combined with app# then the domain name, in my case com.applebysw.test then the application name, InterCommAppTestB, followed by . then the publisher id, then : and then the connection name used in the Connect command, _InterCommAppTestA. The receiver's local connect .domain property gives you most of that, you just need to append the : and then the connection name. In my case, the domain is: app#com.applebysw.test.InterAppCommB.publisher id hex digits The connection name on the Send must then be: app#com.applebysw.test.InterAppCommB.publisher id hex digits._InterAppCommTestB Note that this will not work in the Flex debugger, since the publisher id is an empty string until the AIR app is signed and published. Perhaps it would work if you ran both the sending and receiving apps in the debugger at the same time, I don't have any more time for experiments with this. I was not able to make the connection work unless I used the _ prefix on the connection name. On the receiver, I also had to use either .allowDomain(*) or .allowDomain( app#com.applebysw.test.InterAppCommA.publisher id hex digits) Note that the above is the domain name of the sending app. This was confusing to me, but it worked. I hope that this saves someone else some time, it was a long day yesterday... Pete
[flexcoders] Re: LocalConnection issue in AIR to AIR application
Please note a correct to a typo in the fourth paragraph above: It gets combined with app# then the domain name, in my case com.applebysw.test then the application name, InterCommAppTestB, followed by . then the publisher id, then : and then the connection name used in the Connect command, _InterCommAppTestB. The last word previously was _InterCommAppTestA, and was not correct.
RE: [flexcoders] Re: LocalConnection issue in AIR to AIR application
So if I understand you, this is the calling (outbound side of the request) and this error is in the console output? Phase 2 means that it was in the targeting phase of the dispatch. Are you calling allowDomain() on the connection object? From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Pete Appleby Sent: Thursday, January 15, 2009 4:49 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: LocalConnection issue in AIR to AIR application Hi, Kevin. Thanks for the pointer. I looked at the example in the arthropod debugger class. Unfortunately, it is only the send half of the equation. It did point me into the direction of verifying that the domain name is correct. The error I receive from the Send status event is: type=status bubbles=false cancelable=false eventPhase=2 code=null level=error There is not much to go with. My test sample applications display the names used in the Connect and Send, everything seems to be in order. Not sure how I can post code here. A google search found only a few hits on the above error. One was the same post a few times about using in FLASH when the receiving swf file was not running. Another was in German, and my high school German was over 30 years ago. Any ideas about this are appreciated! Pete image001.jpgimage002.jpg
RE: [flexcoders] Re: LocalConnection issue in AIR to AIR application
And one other important note. The ADL runtime (the debug player) needs special handling in order for enable communication to happen. You need to set command-line arguments to make it work with Air to Air communication work. Note: When you run your application with ADL (or with a development tool such as Flash CS3, Flex Builder, or Dreamweaver), the publisher ID is null and must be omitted from the domain string. When you install and run your application, the publisher ID must be included in the domain string. You can assign a temporary publisher ID using the ADL command line arguments. Use a temporary publisher ID to test that the connection string and domain name are properly formatted. adl [-runtime runtime-directory] [-pubid publisher-id] [-nodebug] application.xml [root-directory] [-- arguments] -pubid publisher-id Assigns the specified value as the publisher ID of the AIR application for this run. Specifying a temporary publisher ID allows you to test features of an AIR application, such as communicating over a local connection, that use the publisher ID to help uniquely identify an application. The final publisher ID is determined by the digital certificate used to sign the AIR installation file. Better yet, export your Air runtimes and try without the adl fun. KFB From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Pete Appleby Sent: Thursday, January 15, 2009 4:49 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: LocalConnection issue in AIR to AIR application Hi, Kevin. Thanks for the pointer. I looked at the example in the arthropod debugger class. Unfortunately, it is only the send half of the equation. It did point me into the direction of verifying that the domain name is correct. The error I receive from the Send status event is: type=status bubbles=false cancelable=false eventPhase=2 code=null level=error There is not much to go with. My test sample applications display the names used in the Connect and Send, everything seems to be in order. Not sure how I can post code here. A google search found only a few hits on the above error. One was the same post a few times about using in FLASH when the receiving swf file was not running. Another was in German, and my high school German was over 30 years ago. Any ideas about this are appreciated! Pete image001.jpgimage002.jpg