Aurora pushes the demo error "Response timeout" according to the official website example, but the mobile client can still receive the push message, and it is more than one?

Source: Internet
Author: User
Keywords Php
Tags autoload
 !--? php require_once ' vendor/autoload.php '; use Jpush\model as M;use Jpush\jpushclient;use Jpush\exception\apiconnectionexception;use jpush\exception\apirequestexception;//Date_ Default_timezone_set (PRC); Date_default_timezone_set ("Asia/shanghai"), $app _key= ' 10310527ba9fce07c22bc849 '; $master _secret= ' Fa3bf270631e1a688281efbe ';//echo "
   
     start 
    

"; $br = '
'; $client = new Jpushclient ($app _key, $master _secret) ; $tname = "testteacheraqq_com"; $day = "2016-1-12 11:01:02"; $oid = "123424"; $result = $client->push ()->setplatform (M\all)->setaudience (M\audience (M\alias (Array ($tname)))->setnotification (M\notification ("Linghaowa N.the appointment at ". $day." Had finished. # ". $oid))->send ();//Echo ' Push Success. ' $BR;//Echo ' Sendno: '. $result->sendno. $BR;//Echo ' msg_id: '. $result->msg_id. $BR;//Echo ' Response JSON: '. $result->json. $BR;

Back-end only once, but the phone will receive up to 4, the browser will also error

Fatal error: Uncaught exception 'JPush\Exception\APIConnectionException' with message 'Response timeout. Your request has probably be received by JPUsh Server,please check that whether need to be pushed again

Reply content:

 !--? php require_once ' vendor/autoload.php '; use Jpush\model as M;use Jpush\jpushclient;use Jpush\exception\apiconnectionexception;use jpush\exception\apirequestexception;//Date_ Default_timezone_set (PRC); Date_default_timezone_set ("Asia/shanghai"), $app _key= ' 10310527ba9fce07c22bc849 '; $master _secret= ' Fa3bf270631e1a688281efbe ';//echo "
   
     start 
    

"; $br = '
'; $client = new Jpushclient ($app _key, $master _secret) ; $tname = "testteacheraqq_com"; $day = "2016-1-12 11:01:02"; $oid = "123424"; $result = $client->push ()->setplatform (M\all)->setaudience (M\audience (M\alias (Array ($tname)))->setnotification (M\notification ("Linghaowa N.the appointment at ". $day." Had finished. # ". $oid))->send ();//Echo ' Push Success. ' $BR;//Echo ' Sendno: '. $result->sendno. $BR;//Echo ' msg_id: '. $result->msg_id. $BR;//Echo ' Response JSON: '. $result->json. $BR;

Back-end only once, but the phone will receive up to 4, the browser will also error

Fatal error: Uncaught exception 'JPush\Exception\APIConnectionException' with message 'Response timeout. Your request has probably be received by JPUsh Server,please check that whether need to be pushed again

Is the network latency problem, you can set the Connect_timeout in the SDK longer (10 seconds) just fine.

It is also recommended to upgrade to the latest SDK, the new version of the interface than the old easy to use a lot!

  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.