Support » Plugin: WPGPlus » [Plugin: WPGPlus] Failing for German users

  • ResolvedPlugin Author John Eckman

    (@johneckman)


    Received comments on Google+ that this is failing for German users.

    Warnings being thrown:

    Warning: DOMDocument::loadHTML() [domdocument.loadhtml]: htmlParseEntityRef: expecting ';' in Entity, line: 60 in ..../wordpress/wp-content/plugins/wpgplus/gplus.php on line 72
    
    Warning: DOMDocument::loadHTML() [domdocument.loadhtml]: htmlParseEntityRef: expecting ';' in Entity, line: 60 in ....wordpress/wp-content/plugins/wpgplus/gplus.php on line 72
    
    Warning: DOMDocument::loadHTML() [domdocument.loadhtml]: htmlParseEntityRef: expecting ';' in Entity, line: 60 in ..../blog/wordpress/wp-content/plugins/wpgplus/gplus.php on line 72
    
    Warning: DOMDocument::loadHTML() [domdocument.loadhtml]: Input is not proper UTF-8, indicate encoding ! in Entity, line: 64 in ..../blog/wordpress/wp-content/plugins/wpgplus/gplus.php on line 72
    
    Warning: DOMDocument::loadXML() [domdocument.loadxml]: Input is not proper UTF-8, indicate encoding ! Bytes: 0xC4 0x6E 0x64 0x65 in Entity, line: 1 in ..../blog/wordpress/wp-content/plugins/wpgplus/gplus.php on line 139
    
    Warning: Cannot modify header information - headers already sent by (output started at ..../blog/wordpress/wp-content/plugins/wpgplus/gplus.php:55) in ..../blog/wordpress/wp-includes/pluggable.php on line 866

    Maybe an issue with how Google+ gets encoded in German? Some other characters in the stream which make the xml loading fail?

    http://wordpress.org/extend/plugins/wpgplus/

Viewing 15 replies - 31 through 45 (of 65 total)
  • Plugin Author John Eckman

    (@johneckman)

    @herbert – Progress!

    When I look at the body of the response, though it is German:

    Nutzungsbedingungen f�r mobile Google-Dienste
    Indem Sie auf “Akzeptieren” tippen, stimmen Sie zu, dass Google Ihren Standort in diesem Produkt verwendet, und akzeptieren die Nutzungsbedingungen f�r mobile Google-Dienste.

    My google translate says this is something about accepting the terms of service for the mobile app.

    So WPGPlus is trying to post as you from https://m.google.com/ but because you haven’t accepted that terms of service it is failing.

    Can you visit m.google.com and accept the terms of service there? Unfortunately, you may need to do it from a phone, or at least by using a web browser extension to let you fake your “user-agent” string into thinking it is a phone.

    Plugin Author John Eckman

    (@johneckman)

    @ari – note that one of the status codes there is a 404.

    When you are trying to post the form you’re getting a 404 error from google.

    Do you have 2 step authorization enabled?

    http://lifehacker.com/5756977/set-up-googles-two+step-verification-now-for-seriously-enhanced-security-for-your-google-account

    Can you visit m.google.com and log in to plus from your phone?

    @john,

    I have tested the publishing from my iPhone.
    With success. 🙂

    But what is the reason why the publishing via my iMac failed.
    Regards
    Herb

    Plugin Author John Eckman

    (@johneckman)

    @herb – it should work from WordPress now as well.

    WPGPlus, the plugin, uses m.google.com to post to – it basically impersonates you and pretends to be a phone publishing to Google+ – this is all because Google+ doesn’t yet have an API that allows publishing.

    The problem was that Google+ was presenting to the plugin an “acccept the terms of service” button which the plugin didn’t know how to handle.

    I’m hoping that once Google knows your userid has accepted those terms, it will allow the plugin to publish.

    I never had that 2-step verification set up. Seemed more trouble than needed. But did it now. Can see google on mobile fine.

    Same publishing routine. Same debug codes.

    2012-02-19 18:22:23 : publish_to_gplus running, included wpgplus.php
    2012-02-19 18:22:23 : publish_to_gplus running, postID is 7888
    2012-02-19 18:22:23 : wgplus_safe_post_google running, post_id is 7888
    2012-02-19 18:22:23 : wgplus_safe_post_google running, username is blahblah and password is blah blah
    2012-02-19 18:22:25 : login data posted
    2012-02-19 18:22:25 : status code was 200
    2012-02-19 18:22:25 : wgplus_safe_post_google running,  past log in
    2012-02-19 18:22:30 : Getting form for posting
    2012-02-19 18:22:31 : Got form, status was 200
    2012-02-19 18:22:32 : and base url is https://m.google.com/ServiceLogin
    2012-02-19 18:22:32 : Posted form, status was 404
    2012-02-19 18:22:37 : wgplus_safe_post_google running,  past update
    2012-02-19 18:22:37 : publish_to_gplus done running

    @john,

    Many thanks. Now I can publish from macBook, iMac an even a Windows PC (Win7).

    There ist only one problem left

    mal sehen, was “nun”?

    I guess “ is the “
    But was was the secret? The “acccept the terms of service”.

    Regards
    Herb

    “nun”?

    I guess is the “

    That is the problem left.
    Herb

    Plugin Author John Eckman

    (@johneckman)

    @ari – I wasn’t asking you to set up 2-factor authentication, in fact having it on will likely cause WPGPlus to fail.

    What’s happening in your case is something different than what was happening for herb37.

    Note the line that says:

    2012-02-19 18:22:32 : and base url is https://m.google.com/ServiceLogin

    Whereas in my case that base url is something more like this:

    https://m.google.com/app/plus/x/1l9exn92wmiuh/

    Though the actual url changes each time – the point being you’re still stuck at servicelogin not inside the app.

    Have you actually logged in to the m.google.com site from your phone or just viewed it without logging in?

    @herb37 – since this thread is getting so long and I’m not sure I understand the issue, can you start a new thread for the “nun” quotes mark problem?

    Updates:

    First: I can log in and move around my Google Mobile services from my mobile device.

    Second: I installed your new development version but same story when publishing in that it doesn’t post to G+.

    Here is the debug file (and inserted blah in security places):

    2012-02-19 23:33:04 : publish_to_gplus running, included wpgplus.php
    2012-02-19 23:33:04 : publish_to_gplus running, postID is 7895
    2012-02-19 23:33:04 : wgplus_safe_post_google running, post_id is 7895
    2012-02-19 23:33:04 : wgplus_safe_post_google running, username is blah
    password is blah
    2012-02-19 23:33:06 : login data posted
    2012-02-19 23:33:06 : status code was 200
    2012-02-19 23:33:06 : wgplus_safe_post_google running,  past log in
    2012-02-19 23:33:11 : Getting form for posting
    2012-02-19 23:33:11 : Post text is Test of dev version.
    
    2012-02-19 23:33:12 : Got form, status was 200
    2012-02-19 23:33:12 : Response was:
    <?xml version="1.0" encoding="UTF-8"?>
      <!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.0//EN" "http://www.wapforum.org/DTD/xhtml-mobile10.dtd">
      <html xmlns="http://www.w3.org/1999/xhtml">
      <head>
      <title>Sign in</title>
      </head>
      <body dir="ltr">
    <img src='https://accounts.google.com/google_white.gif'
         border="0"
         align="bottom"
         alt="Google" />
      <div class="fieldContent"
           style="background-color:#e8eefa;">
      <b>Google+</b>
      <br />
      <font size="-1">Sign in with your Google Account</font>
      <br />
    <form id="gaia_loginform"
          action="https://accounts.google.com/ServiceLoginAuth"
          method="post" >
      <input type="hidden" name="continue" id="continue"
               value="https://m.google.com/app/plus/x/?v=composeamp;group=m1camp;hideloc=1amp;login=1" />
      <input type="hidden" name="followup" id="followup"
               value="https://m.google.com/app/plus/x/?v=composeamp;group=m1camp;hideloc=1amp;login=1" />
      <input type="hidden" name="service" id="service"
               value="webupdates" />
      <input type="hidden" name="dsh" id="dsh"
               value="blah" />
      <input type="hidden" name="btmpl" id="btmpl"
               value="mobile_tier2" />
    <input type="hidden" name="timeStmp" id="timeStmp"
           value=''/>
    <input type="hidden" name="secTok" id="secTok"
           value=''/>
      <input type="hidden"
             name="GALX"
             value="blah" />
    <span class="gaia le lbl">Email:</span>
      <br />
    <input type="text" name="Email"
           id="Email" size="18"
           value=""  class="gaia le val" />
      <br />
      <span style="color: #666666; font-size: 75%"
            class="gaia le val">ex: pat@example.com</span>
    <br />
    <span class="gaia le lbl">Password:</span>
    <br />
    <input type="password"
           size="18"
           name="Passwd" id="Passwd" class="gaia le val" autocomplete="off" />
    <div align="left">
      <input type="submit" class="gaia le button" name="signIn"
             value="Sign in" />
    </div>
    </form>
      </div>
      <b>Don't have a Google Account?</b>
      <br />
      <b><a href="https://accounts.google.com/SignUpWidget?service=webupdatescontinue=https%3A%2F%2Fm.google.com%2Fapp%2Fplus%2Fx%2F%3Fv%3Dcompose%26group%3Dm1c%26hideloc%3D1%26login%3D1followup=https%3A%2F%2Fm.google.com%2Fapp%2Fplus%2Fx%2F%3Fv%3Dcompose%26group%3Dm1c%26hideloc%3D1%26login%3D1btmpl=mobile_tier2">Create an account now</a></b>
      <br />
    <p class="footer">
     <font size="-1">
      copy;2012 Google
      - <a href="http://m.google.com/m/help?hl=en" id="mobileFooterHelpLink">Help</a>
      - <a href="http://m.google.com/tospage?hl=en" id="mobileFooterTosLink">Terms of Service</a>
      </font>
    </p>
      </body>
    </html>
    
    2012-02-19 23:33:12 : and base url is https://m.google.com/ServiceLogin
    2012-02-19 23:33:12 : Posted form, status was 404
    2012-02-19 23:33:12 : Post text was Test of dev version.
    
    2012-02-19 23:33:12 : Header of response was Array
    2012-02-19 23:33:12 : Body was <html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <title>Error
    404
    (Not Found)!!1</title>
    <style type="text/css">
            blahblahblah style codes here blahblahblah
          </style></head>
    <body><a href="//www.google.com/" id="g"><img src="//www.google.com/images/logo_sm.gif" alt="Google"></a>
    <p><b>404.</b>
    <ins>That's an error.</ins></p>
    <p>The requested URL <code>/ServiceLogin</code> was not found on this server.
    <ins>That's all we know.</ins></p></body></html>
    2012-02-19 23:33:17 : wgplus_safe_post_google running,  past update
    2012-02-19 23:33:17 : publish_to_gplus done running

    The question remains the same: Why is this pointing to the base url of https://m.google.com/ServiceLogin

    Question: Should I see something listed in the list of apps and services etc authorized to connect to my Google account?

    Plugin Author John Eckman

    (@johneckman)

    No, you should not see anything listed in authorized.

    Google provides no API for publishing to Google+, so I’m working around that by using the mobile interface.

    For some reason, your login to google+ is failing. Are you certain the password and email address you’ve provided are the correct ones for logging in to your google+ account?

    Did you visit m.google.com on a phone / mobile device, login, and make sure the terms of service has been accepted?

    Yes, my email/pass is correct.
    Yes, I can visit m.google.com.
    And, yes, the terms are accepted by default when logging in.

    Plugin Author John Eckman

    (@johneckman)

    @ari – when you visit m.google.com, are you doing so from a mobile device? And when you visit, you can log in and post?

    Google is sensing user agent and will send different responses to different client types. But WPGPlus impersonates a mobile client – so I don’t know why it would get a different experience than you do.

    Did you turn off 2-factor authorization?

    I’m not sure what else to check at this point – clearly cURL is not able to log you in, as the form it gets is not the update status form but a “Log in with your google account” form.

    Why it isn’t able to log you in I don’t know as it isn’t showing an error page.

    I suppose I could add debugging further up stream where the login credentials get submitted – I just added yet another debug version if you are interested in trying futher – you can email me the debug.txt it outputs.

    There must be something in the Google+ response that might indicate why login is not working

    Yes I can visit m.google.com from my android and I can post to my feed there fine. I did turn off the 2-part authorization.

    I reinstalled the dev version. Debugger is telling me the script was presented with a verification screen, not recognizing the device or whatever accessing it. But… first, I had already turned off the 2-part verification and second, I can post to g+ on my mobile browser fine.

    Weird.

    I wonder if the problem lies in curl itself? Maybe because it’s not my computer accessing but a remote server IP?

Viewing 15 replies - 31 through 45 (of 65 total)
  • The topic ‘[Plugin: WPGPlus] Failing for German users’ is closed to new replies.