Re: [google-appengine] IMAP using OAuth2 on App Engine
t = new SMTPTransport(session, unusedUrlName); // If the password is non-null, SMTP tries to do AUTH LOGIN. final String emptyPassword = null; transport.connect(host, port, userEmail, emptyPassword); return transport; } } Everything works fine locally regardless of how the code is triggered. Replicating the issue seen on the actual deployed App Engine instance can only be replicated by disabling the registration of the OAuth provider locally. Placement of debug messages within the OAuth2SaslClient and OAuth2SaslClientFactory indicate that the provider is not being hit at all on the node, although running locally these are being reached. Checked and all libraries and imports are on the whitelist for App Engine that relate to the Security Provider. Thanks, Glen On Monday, 29 July 2013 16:48:20 UTC+10, Vinny P wrote: > > On Sun, Jul 28, 2013 at 6:07 PM, Glen Whitaker wrote: > >> I'm trying to implement a service on App Engine that interacts with an >> Gmail account using OAuth2, Java 7 and App Engine SDK 1.8.2. The problem >> being encountered is via the use of sample code provided by >> https://code.google.com/p/google-mail-oauth2-tools/wiki/JavaSampleCodethe >> Security provider does not appear to be detected on a node although >> works locally fine. >> > > > When you run it locally, are you running it within the dev appserver or as > a stand-alone application? Did you build your application and add in the > libraries with Maven, or are you bundling them manually? Which libraries > are you adding (full names and version numbers preferred). > > > - > -Vinny P > Technology & Media Advisor > Chicago, IL > > App Engine Code Samples: http://www.learntogoogleit.com > > > > -- You received this message because you are subscribed to the Google Groups "Google App Engine" group. To unsubscribe from this group and stop receiving emails from it, send an email to google-appengine+unsubscr...@googlegroups.com. To post to this group, send email to google-appengine@googlegroups.com. Visit this group at http://groups.google.com/group/google-appengine. For more options, visit https://groups.google.com/groups/opt_out.
[google-appengine] IMAP using OAuth2 on App Engine
I'm trying to implement a service on App Engine that interacts with an Gmail account using OAuth2, Java 7 and App Engine SDK 1.8.2. The problem being encountered is via the use of sample code provided by https://code.google.com/p/google-mail-oauth2-tools/wiki/JavaSampleCode the Security provider does not appear to be detected on a node although works locally fine. The IMAP debug trace is: DEBUG IMAPS: mail.imap.fetchsize: 16384 DEBUG IMAPS: mail.imap.ignorebodystructuresize: false DEBUG IMAPS: mail.imap.statuscachetimeout: 1000 DEBUG IMAPS: mail.imap.appendbuffersize: -1 DEBUG IMAPS: mail.imap.minidletime: 10 DEBUG IMAPS: enable SASL DEBUG IMAPS: SASL mechanisms allowed: XOAUTH2 DEBUG IMAPS: trying to connect to host "imap.gmail.com", port 993, isSSL true * OK Gimap ready for requests from xxx.xxx.xxx.xxx Z A0 CAPABILITY * CAPABILITY IMAP4rev1 UNSELECT IDLE NAMESPACE QUOTA ID XLIST CHILDREN X-GM-EXT-1 XYZZY A0 OK Thats all she wrote! Z DEBUG IMAPS: AUTH: XOAUTH DEBUG IMAPS: AUTH: XOAUTH2 DEBUG IMAPS: protocolConnect login, host=imap.gmail.com, user=some...@gmail.com, password= DEBUG IMAPS: SASL authentication command trace suppressed DEBUG IMAPS: SASL Mechanisms: DEBUG IMAPS: XOAUTH2 DEBUG IMAPS: DEBUG IMAPS: No SASL support DEBUG IMAPS: SASL authentication failed DEBUG IMAPS: LOGIN command trace suppressed DEBUG IMAPS: LOGIN command result: A1 NO Empty username or password. Z DEBUG IMAPS: trying to connect to host "imap.gmail.com", port 993, isSSL true * OK Gimap ready for requests from xxx.xxx.xxx.xxx YY A0 CAPABILITY * CAPABILITY IMAP4rev1 UNSELECT IDLE NAMESPACE QUOTA ID XLIST CHILDREN X-GM-EXT-1 XYZZY SASL-IR AUTH=XOAUTH AUTH=XOAUTH2 A0 OK Thats all she wrote! YYY DEBUG IMAPS: AUTH: XOAUTH DEBUG IMAPS: AUTH: XOAUTH2 DEBUG IMAPS: protocolConnect login, host=imap.gmail.com, user=some...@gmail.com, password= DEBUG IMAPS: SASL authentication command trace suppressed DEBUG IMAPS: SASL Mechanisms: DEBUG IMAPS: XOAUTH2 DEBUG IMAPS: DEBUG IMAPS: No SASL support DEBUG IMAPS: SASL authentication failed DEBUG IMAPS: LOGIN command trace suppressed DEBUG IMAPS: LOGIN command result: A1 NO Empty username or password. YY java.lang.RuntimeException: javax.mail.AuthenticationFailedException: Empty username or password. YY This problem only occurs on a deployed node. Ensured that the provider was correct path and installed and using the latest versions of App Engine SDK that facilitates the IMAP and SMTP sockets. Triggering has been attempted via sample servlet and task on task queue. Thank you for assistance in advance. -- You received this message because you are subscribed to the Google Groups "Google App Engine" group. To unsubscribe from this group and stop receiving emails from it, send an email to google-appengine+unsubscr...@googlegroups.com. To post to this group, send email to google-appengine@googlegroups.com. Visit this group at http://groups.google.com/group/google-appengine. For more options, visit https://groups.google.com/groups/opt_out.
[google-appengine] Re: channel api not working on production
We are currently facing a similar problem where the client stops receiving messages from the server. What we have observed is the application will perform as expected, receiving messages opening up the channel on the initial few visits, however after a period of time the channel on the client will not receive any more messages despite being established. Diagnosis has been performed on both local dev mode and production instances and behaviour is the same, except on production it takes a longer period of time ( approximately 1 hr ) before reaching this channel state of not receiving on the client. The problem has been observed in both the latest versions of Chrome and Firefox. Through use of lsof and netstat it was found that a large number of sockets were being held open by the browser in a CLOSE_WAIT state, which once the process (firefox) that was holding these sockets was closed and released the channel started to receive again, although at a very slow rate ( the slow rate on recovery could be caused by the current task queue latency ). The problem does not exist if setting up a new channel with a new token every time, but when refreshing (disconnect/reconnect) the channel using the same token results in this problem where client stops receiving after a period of time. Still trying to find a solution to this problem. On Monday, 31 December 2012 07:00:42 UTC+11, 0914...@umt.edu.pk wrote: > > I've recently faced the problem. I've implemented some collaborative work > on my app. I've used the Channel API and it works really fine on localhost. > After deploy, the "update" in the other client is never received. why? > -- You received this message because you are subscribed to the Google Groups "Google App Engine" group. To unsubscribe from this group and stop receiving emails from it, send an email to google-appengine+unsubscr...@googlegroups.com. To post to this group, send email to google-appengine@googlegroups.com. Visit this group at http://groups.google.com/group/google-appengine?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
[google-appengine] Explicit Base 64 Encoding byte array required for special characters on deployed instance but not local instance
Recently we've been setting up a system where work is allocated outside of app engine and sends back to an App Engine application a JSONified Map containing a byte array that represents a pdf file's contents, which is then uploaded to Google Drive. Within a local configuration the the flow of the pdf is uploaded and appears correctly in Drive. However, when deploying this to an actual App Engine Node the file does not appear "valid". After debugging and diagnosis the issue is with the contents of special characters within the strings being passed, despite being UTF-8 encoded at every possible point. Originally URL Encoding was being used and failing still, however, after searching a solution proposed to Base64 encode the array of bytes, and thus this resolved the problem and Document uploaded correctly. The question therefore is what is the difference with respect to byte array handling that would require explicit base 64 encoding to handle special characters between a localised App Engine environment and a deployed instance? -- You received this message because you are subscribed to the Google Groups "Google App Engine" group. To view this discussion on the web visit https://groups.google.com/d/msg/google-appengine/-/uuE7XSA7ABQJ. To post to this group, send email to google-appengine@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.