This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 131880 - [saas] error message for services using callback should be improved
Summary: [saas] error message for services using callback should be improved
Status: RESOLVED WONTFIX
Alias: None
Product: webservices
Classification: Unclassified
Component: Manager (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: Milan Kuchtiak
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-04-02 23:47 UTC by Lukas Jungmann
Modified: 2016-07-07 09:54 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Lukas Jungmann 2008-04-02 23:47:19 UTC
-d'n'd some facebook or flickr service into a JSP/Servlet
-fill in required auth. properties
-build project
-run a servlet/jsp

=> if the callback for the application is not set up correctly then run fails with:

"java.io.IOException: Failed to get a valid authentication token." which very often is not true and it can be very hard
for the user to find a real problem

It would be good to improve this error message to include possible cause of the problem. The message could be for example:
"java.io.IOException: Failed to get a valid authentication token. Does your FaceBook Callback URL point to
FacebookSocialNetworkingServiceCallback?", similarly for flickr service(s).
Comment 1 Peter Liu 2008-04-03 01:58:16 UTC
Lukas,  how did you get the IOException?  For me, if the callback is not properly set up with Facebook, you'll get an
error page in the browser.  It never gets redirected back to our code, so I am afraid no error message will help here.

 
Comment 2 Lukas Jungmann 2008-04-03 10:43:55 UTC
In the server log, there I can see (if I set ie www.nb.org for callback URL at facebook):

java.io.IOException: Failed to get a valid session key.
        at
org.netbeans.saas.facebook.FacebookSocialNetworkingServiceAuthenticator.getSessionKey(FacebookSocialNetworkingServiceAuthenticator.java:61)
        at
org.netbeans.saas.facebook.FacebookSocialNetworkingService.friendsGetLists(FacebookSocialNetworkingService.java:43)
        at test.GenericResource.getXml(GenericResource.java:56)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
...
Comment 3 Peter Liu 2008-04-03 21:45:11 UTC
It turns out the IOException you see in the server log has nothing to do with facebook callback registration.  In fact,
you will see the IOException even in the case when you have everything set up correctly.

What is going on here is that the first time we try to log in, we will send a redirect to the login page. However, the
original thread will continue executing and fail and get an IOException since we haven't logged in yet.   The exception
is harmless but it would be nice if we fail more gracefully or figure out a way to short circuit the original thread. 

The fix for this will be involved and risky so I am not going to attempt it for 6.1.  Since the exception is harmless,
I am lowering the priority to P3 and will try to fix this in a future release. 
Comment 4 Lukas Jungmann 2008-04-03 21:53:47 UTC
ok, I agree with P3
Comment 5 Denis Anisimov 2011-10-07 06:16:05 UTC
Need to understand details deeply.
At least fix is risky as it states. So it is not for current release.
Comment 6 Martin Balin 2016-07-07 09:54:01 UTC
This old bug may not be relevant anymore. If you can still reproduce it in 8.2 development builds please reopen this issue.

Thanks for your cooperation,
NetBeans IDE 8.2 Release Boss