kennylerma / facebook-actionscript-api

Automatically exported from code.google.com/p/facebook-actionscript-api
0 stars 0 forks source link

AS3: login + logout + login = Error #2004: StageWebView/dispose() #240

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. init() then login() then logout()
2. login() again with same parameters
3. get error (before login window appears)

What is the expected output? What do you see instead?
Expect to be able to login, logout, then change users, but cannot login for a 
second time ever

What version of the product are you using? On what operating system?
Windows 7 Home Premium 64-bit version 6.1 (Build 7600)
Adobe® Flash® Builder™ (code named Burrito) Preview Version
GraphAPI_Mobile_1_5.swc
blackberry-tablet-sdk-0.9.1
using the blackberry playbook simulation provided in Burrito

Please provide any additional information below.

We're trying get a basic actionscript example working that will allow a user to 
login to facebook or change users from within an app.

I have it working thus far:
1) initialize the app and
  a) recognize if a session is active - display username and logout button or
  b) recognize if no session active - display login button
2) login works the first time, app recognizes session and displays username and 
logout button
3) logout button always works (so far) - takes you back to login screen

but...

4) the second time you login (i.e., you logged in, logged out, and logged in 
again, or even logout1-login1-logout2-login2 if a session was already active) 
it gives me this error before the login window appears:

ArgumentError: Error #2004: One of the parameters is invalid.
    at flash.media::StageWebView/dispose()
    at com.facebook.graph::FacebookMobile/createWebView()[C:\...\mobileAPI\com\facebook\graph\FacebookMobile.as:492]
    at com.facebook.graph::FacebookMobile/login()[C:\...\mobileAPI\com\facebook\graph\FacebookMobile.as:375]
    at com.facebook.graph::FacebookMobile$/login()[C:\...\mobileAPI\com\facebook\graph\FacebookMobile.as:126]
    at MobileFacebookLogin/loginClick()[C:\...\Adobe Flash Builder Burrito Preview\MobileFacebookLogin\src\MobileFacebookLogin.as:211]

The call to login() is identical both times:
FacebookMobile.login(loginHandler, stage, [])

This is the logout call:
FacebookMobile.logout(logoutHandler)

Let me know if you need any more information

thanks,
Gavin and Frank

Original issue reported on code.google.com by gavin.e...@gmail.com on 7 Jan 2011 at 11:30

GoogleCodeExporter commented 9 years ago
I may be running into the same issue, although I am running my app on the 
BlackBerry PlayBook simulator and it doesn't report errors back, so I'm not 
sure.

But the basic observation is the same: The initial login works, but if you then 
log out and try and log back in again, it doesn't work. What I see is a blank 
white screen for about 15 seconds, and then my application exists.

Original comment by daniel.b...@gmail.com on 10 Jan 2011 at 5:35

GoogleCodeExporter commented 9 years ago
That's about what I get on the simulator also.

I'm also getting some different behaviour now.

ATM it won't let me log in the first time.

Had some other strange behavior earlier where it seemed to like some accounts 
more than others. Also permissions window is loading blank and freezing (won't 
even let you close it - just reopens blank).

Very strange. Will post more when we can get some repeatable behaviour

Original comment by gavin.e...@gmail.com on 10 Jan 2011 at 5:33

GoogleCodeExporter commented 9 years ago
We seem to have worked this one out.

By adding this.webView = null to FacebookMobile.logout we were able to solve 
the problem and log in and out ad infinitum

Original comment by gavin.e...@gmail.com on 10 Jan 2011 at 9:28

GoogleCodeExporter commented 9 years ago
okay, scratch that

definitely NOT solved a.t.m.

Got a dev response on a blackberry board: apparently it's in their 
webView.dispose() method (or something). Fix to come "soon"

Original comment by gavin.e...@gmail.com on 11 Jan 2011 at 4:03

GoogleCodeExporter commented 9 years ago
Every time I use the StageWebView the app crashes and the playbook goes back to 
the home screen. Very frustrating. 

Original comment by t...@blueearth.net on 26 Jan 2011 at 10:27

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
A fix will be included in our next release. Here's the blackberry board for 
those who are curious: 
http://supportforums.blackberry.com/t5/Tablet-OS-SDK-for-Adobe-AIR/AS3-facebook-
SDK-login-logout-login-Error-2004-StageWebView/m-p/723835/highlight/true#M4882

Original comment by rovertn...@gmail.com on 9 Feb 2011 at 5:16

GoogleCodeExporter commented 9 years ago
Thanks very much for pursuing this guys! Is it supposed to be fixed in 0.9.3, 
or is it still forthcoming?

Original comment by daniel.b...@gmail.com on 12 Feb 2011 at 2:25

GoogleCodeExporter commented 9 years ago
We're just fixing the bug in the next release of the Facebook AS3 Graph 
Api...we aren't responsible for Blackberry's SDK.

Original comment by rovertn...@gmail.com on 14 Feb 2011 at 4:32

GoogleCodeExporter commented 9 years ago
Hi,
I'm having a similar issue. Has any progress been made with this?
Richard

Original comment by mccormac...@gmail.com on 30 Mar 2011 at 7:28

GoogleCodeExporter commented 9 years ago
Hey mccormac...@googlemail.com, this should be fixed in v1.6. Are you using the 
updated API?

Original comment by rovertn...@gmail.com on 31 Mar 2011 at 3:55

GoogleCodeExporter commented 9 years ago
Hey @rovertn...@gmail.com, yes I am using v1.6. It turns out my problem was due 
to the FacebookMobile.logout function not clearing the login "cookie"(?) so 
when I next called FacebookMobile.login it remembered the previous user and 
automatically logged them in. 
Rich

Original comment by mccormac...@gmail.com on 31 Mar 2011 at 7:31

GoogleCodeExporter commented 9 years ago

Original comment by rovertn...@gmail.com on 4 Apr 2011 at 8:47

GoogleCodeExporter commented 9 years ago
This bug is still apparent in 1.8.1

Original comment by sidney.dekoning on 25 Jun 2012 at 1:40