Skip to content
This repository has been archived by the owner on May 15, 2020. It is now read-only.

Documentation for setup #17

Open
lgn-lvx3 opened this issue Nov 20, 2015 · 3 comments
Open

Documentation for setup #17

lgn-lvx3 opened this issue Nov 20, 2015 · 3 comments

Comments

@lgn-lvx3
Copy link

Hey guys, I haven't been able to successfully log anything to my GA app. I'm receiving this warning however

Received data was not a string, or was not a recognised encoding.

Any ideas? Its making the request successfully, but nothing is logged on GA backend.

@chagasaway
Copy link

I am facing this issue as well, any idea for a solution?

Thanks!

@lwansbrough
Copy link
Collaborator

@yutin1987
Copy link

https://github.com/facebook/react-native/blob/master/Libraries/Network/RCTNetworking.m#L349

    // If we still can't decode it, bail out
    NSLog(@"responseText: %@", responseText);
    NSLog(@"data: %@", data);
    NSLog(@"response: %@", response);
    NSString *strData = [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding];
    NSLog(@"strData: %@", strData);
    if (!responseText) {
      RCTLogWarn(@"Received data was not a string, or was not a recognised encoding.");
      return;
    }
2016-06-28 16:25:03.077 airpopo[5072:101005] responseText: (null)
2016-06-28 16:25:03.078 airpopo[5072:101005] data: <47494638 39610100 010080ff 00ffffff 0000002c 00000000 01000100 00020244 01003b>
2016-06-28 16:25:03.078 airpopo[5072:101005] response: <NSHTTPURLResponse: 0x7c00e050> { URL: https://www.google-analytics.com/collect?an=AirPoPo%20Client&cd=route&av=0.5.0&aid=com.dingtaxi.airpopo&aiid=0.6.0.1&t=screenview&ul=en-US&vp=320x568&v=1&tid=UA-78509036-3&cid=928E2B63-35AD-4D75-AD42-C172CF80A1DB&&z=48523941 } { status code: 200, headers {
    "Access-Control-Allow-Origin" = "*";
    Age = 562381;
    "Cache-Control" = "no-cache, no-store, must-revalidate";
    "Content-Length" = 35;
    "Content-Type" = "image/gif";
    Date = "Tue, 21 Jun 2016 20:12:02 GMT";
    Expires = "Mon, 01 Jan 1990 00:00:00 GMT";
    "Last-Modified" = "Sun, 17 May 1998 03:00:00 GMT";
    Pragma = "no-cache";
    Server = Golfe2;
    "alt-svc" = "quic=\":443\"; ma=2592000; v=\"34,33,32,31,30,29,28,27,26,25\"";
    "alternate-protocol" = "443:quic";
    "x-content-type-options" = nosniff;
} }
2016-06-28 16:25:03.078 airpopo[5072:101005] strData: (null)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants