Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Adobe AIR Development

Reply
Visitor
inlineblue
Posts: 1
Registered: ‎11-13-2010
My Device: Not Specified

Cookies supported?

Given my recent testing with the PlayBook simulator, it appears that cookies are not enabled/supported. My app is communicating with a ColdFusion 8 server and the server manages client sessions.  The sessions work fine if I run my AIR app on my desktop.  However, if I run the app in the PlayBook simulator, sessions are not maintained between calls.  It appears that cookies are not enabled.  I've tried setting URLRequestDefaults.manageCookies = true but that didn't have any effect.  As far as I know, AIR uses the operating system's HTTP stack so it's at the mercy of what the OS provides.  Are cookies supposed to be supported?

 

BTW, I'm using the RemoteObject class to communicate with the server (ie. Flash Remoting), which uses HTTP under the hood.

Please use plain text.
Contributor
derekobrien
Posts: 12
Registered: ‎11-04-2010
My Device: Storm 9500
My Carrier: Vodaphone

Re: Cookies supported?

Don't know if cookies are supported in the simulator yet or not, but have you considered using Flash SharedObject? That works in the simulator as I'm using in my app, and of course it will work in the browser and on the desktop to.

 

Ref: http://www.republicofcode.com/tutorials/flash/as3sharedobject/

Please use plain text.
New Contributor
potwarka
Posts: 3
Registered: ‎11-20-2010
My Device: Not Specified

Re: Cookies supported?

I have found the same problem (i.e. my session IDs are not making it back to the server  - at least from what I can seen in the http header at the server ).

 

I have found something similar on the Samsung Android Tab ( although it appears to be intermittent - so it could be something else )

Please use plain text.
Contributor
quentin
Posts: 49
Registered: ‎11-18-2010
My Device: Flash Builder - PlayBook Simulator

Re: Cookies supported?

Same issue here, some services that rely on sessions fail with an auth error...

Anything new?

Please use plain text.
New Member
amritsingh
Posts: 1
Registered: ‎01-05-2011
My Device: Not Specified

Re: Cookies supported?

I have found the same problem. Session ID is not going back to the server.

I have been trying to port an AIR app on playbook.

I am using Windows 7

Following is my observation when I sniffed the AIR App working on Desktop and playbook simulator.

 

This is how the Desktop version of the AIR app works:

The app involves signing in to the server. After the user signs in, session is created and the cookie having the session ID comes back to the app. Post sign in, all the calls which are made to the server contains the session ID.

 

This is how the app works on playbook simulator:

Sign in goes through without any problem. Cookie (containing session info) comes to the playbook simulator. After the user is signed in none of the calls to server contains the session ID.

 

Other observations:

SharedObject is working as expected on playbook simulator.

I have explicitly set URLRequestDefaults.manageCookies to true. Even this does not make playbook simulator to send session ID along with the HTTP call to the server.

 

Is the AIR in the playbook simulator not saving the cookie information or is it not sending the session ID back with the calls?

Is it the problem with VMware player?

Is this only the simulator issue or is it there in the device as well?

Please use plain text.
Developer
peter9477
Posts: 6,473
Registered: ‎12-08-2010
My Device: PlayBook, Z10
My Carrier: none

Re: Cookies supported?

 


amritsingh wrote:

Is it the problem with VMware player?


 

I haven't tried doing this with AIR (i.e. direct URL requests etc) but wanted to point out that cookies are working fine with the QNXStageWebView component.

 

That at least proves (roughly) that the problem you are having is not with the VMWare Player --  and I can't think how it could be... cookies are merely a feature built on top of HTTP which is built on top of TCP sockets... there's really no way the player could interfere with them working.


Peter Hansen -- (BB10 and dev-related blog posts at http://peterhansen.ca.)
Author of White Noise and Battery Guru for BB10 and for PlayBook | Get more from your battery!
Please use plain text.
Visitor
davec6550
Posts: 1
Registered: ‎02-03-2011
My Device: 9700

Re: Cookies supported? - Any news

Hi,

 

First post - looked everywhere for answers!

 

Has there been any updates on this? As far as I can see, the automatic cookie handling doesn't work on the simulator and won't work on the device?

 

I'm guessing that I can't manually set the Cookies header since this seems to be dis-allowed in AS3?

 

So I'm hoping that this has been fixed in a newer build of the SDK/Simulator?

 

Apart from implementing my own Http stack in AS3 I cannot see a way round this?

 

Surely this is an issue for anyone accessing a http site which maintains a session state?

 

Many Thanks,

 

Dave

Please use plain text.
BlackBerry Development Advisor (Retired)
pbhattacherjee
Posts: 33
Registered: ‎08-07-2009
My Device: Not Specified

Re: Cookies supported? - Any news

Hi All,

 

Have you guys tried your apps running in the latest simulator?  There were several bug fixes and enhancements put into the 0.9.3 simulator.

 

If they don't work, could you please provide a snippet for what you're trying to do, or a base case, and I can try to get it fixed up for a future simulator.

 

Thanks,

 

Pro

Please use plain text.
Developer
jtegen
Posts: 6,541
Registered: ‎10-27-2010
My Device: HTC One, PlayBook, LE Z10, DE Q10
My Carrier: Verizon

Re: Cookies supported? - Any news

What are you looking for?

 

  • Application issues
  • Browser web site issues
  • QNX web view issues

The 0.9.3 simulator has been out for about a month.  I dont see anything posted about a simulator newer than 0.9.3.

Please use plain text.
Developer
peter9477
Posts: 6,473
Registered: ‎12-08-2010
My Device: PlayBook, Z10
My Carrier: none

Re: Cookies supported? - Any news

i think he's referring to earlier posts in this thread, or the original, where people not using the QNXStageWebView component were expecting cookie support.

 

I assume it was with URLRequest/Loader and such.


Peter Hansen -- (BB10 and dev-related blog posts at http://peterhansen.ca.)
Author of White Noise and Battery Guru for BB10 and for PlayBook | Get more from your battery!
Please use plain text.