B4R Question Firebase FCM not working with ESP32

Discussion in 'B4R Questions' started by janderkan, Oct 25, 2019.

  1. janderkan

    janderkan Active Member Licensed User

    https://www.b4x.com/android/forum/threads/firebase-push-messages-fcm.81025/#content

    I am using B4R 3.0, Esp8266 2.5.2, Esp32 1.0.4
    Using this example on the Esp8266 works fine.
    On the Esp32 the HttpJob/ParseResult function is not called.
    The data returned from Firebase in HttpJob/AStream_NewData event are the same with both boards, so the error is that the HttpJob/AStream_Error is not called.

    I have tried every combination of:
    B4R - 2.5.1 , 2.80 , 3.00
    Esp32 - 1.0.1 , 1.0.2 , 1.0.3 , 1.0.4

    Of course I can use a Timer and call the ParseResult function when no more data is coming, but I would like to know why the AStream_Error is not called

    Jan
     
  2. Erel

    Erel Administrator Staff Member Licensed User

  3. janderkan

    janderkan Active Member Licensed User

    This example works fine.

    But when I replace the version 2.2 with 1.78 in the FCM example there is no difference.
    I put this in the HttpJob - AStream_NewData sub
    Code:
    Log("AStream_NewData - " , Buffer)
    and I receive this:
    Code:
    AStream_NewData - HTTP/1.0 200 OK
    Content-
    Typeapplication/json; charset=UTF-8
    Date: Sun, 
    27 Oct 2019 20:26:03 GMT
    AStream_NewData -
    Expires: Sun, 
    27 Oct 2019 20:26:03 GMT
    Cache-Controlprivatemax-age=0
    X-Content-
    Type-Options:
    AStream_NewData - nosniff
    X-Frame-Options: SAMEORIGIN
    X-XSS-Protection: 
    1; mode=block
    Server: GSE
    Alt-Svc: quic=
    ":
    AStream_NewData - 443"; ma=2592000; v="46,43",h3-Q048=":443"; ma=2592000,h3-Q046=":443"; ma=2592000,h3-Q043=":443"; ma
    AStream_NewData - =2592000
    Accept-Ranges: none
    Vary: Accept-Encoding
    {
    "message_id":7833376844146425096}
    But still Main.JobDone is not called
     
    Last edited: Oct 27, 2019
  4. Erel

    Erel Administrator Staff Member Licensed User

  5. janderkan

    janderkan Active Member Licensed User

    Works fine.
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice