alebianco / ANE-Google-Analytics

Air Native Extension for Google Analytics on iOS and Android
http://alebianco.github.io/ANE-Google-Analytics/
MIT License
133 stars 44 forks source link

Doesn't works #56

Closed fix89 closed 9 years ago

fix89 commented 9 years ago

Hi, I'm trying to use your ane, but doesn't works. No errors runtime. Simply nothing tracked on realtime section on the google analytics web site. I'm using v2.0.7 RC2; AIR 15.0.302 ; iOS 8 on my iPhone 6

simple code:

import eu.alebianco.air.extensions.analytics.Analytics; import eu.alebianco.air.extensions.analytics.api.ITracker;

var analytics:Analytics = Analytics.getInstance(); var tracker:ITracker; var AnalyticsOk:Boolean=Analytics.isSupported();

if (AnalyticsOk) { trace("Analytics OK"); tracker = analytics.getTracker("my_traker_id"); }

tracker.startNewSession(); tracker.buildView("Vista predefinita").track(); Object(root).tracker.buildEvent("Global", "Open App").track();

alebianco commented 9 years ago

The tracking might take some time (up to 180secs with the default value) to be sent to google servers, during which time the app must stay open. if it doesn't, it will be dispatched on the next lunch, but that might not happen during development because of the uninstall/reinstall process.

set the dispatchInterval interval to something low, like 3 and set the debug flag to true then keep an eye on the device logs: google's libraries should log their operation and you should notice if there's any communication problem.

fix89 commented 9 years ago

Nothing... really strange. This is not my first app where I use your native extension (really thanks). Maybe some settings are wrong on google analytics consolle?

fix89 commented 9 years ago

Or maybe I need to add something in the app xml descriptor?

alebianco commented 9 years ago

just this:

<extensions>
   <extensionID>eu.alebianco.air.extensions.analytics.NativeGATracker</extensionID>
</extensions>

which is going to be there if you're using any IDE.

is the extension reporting that is supported? are you getting anything on the device logs?

fix89 commented 9 years ago

How can i get device log?

PS extension report that is supported

alebianco commented 9 years ago

From the xCode organizer, select Device Logs for your device. Also, can you try on the simulator and see if you have the same issues?

fix89 commented 9 years ago

Nothing. No log :(

alebianco commented 9 years ago

no logs at all or nothing about analytics? it should log something immediately when it's initialised

fix89 commented 9 years ago

no logs at all... schermata 2014-10-30 alle 15 11 54

alebianco commented 9 years ago

Not sure I can help much with that, looks like a problem with your system. The only thing that comes to mind is: the device is connected to your machine, right? (i know, pretty stupid question). Also, can you try the simulator? you might able to avoid this issue there ...

fix89 commented 9 years ago

Now i've found this log:

Incident Identifier: 4082F993-8075-4007-AE2B-EE25E569D0FA CrashReporter Key: 61871a3b45c887f9ab9e93946df0d472a297abae Hardware Model: iPhone7,2 OS Version: iPhone OS 8.1 (12B411) Kernel Version: Darwin Kernel Version 14.0.0: Tue Oct 7 00:04:33 PDT 2014; root:xnu-2783.3.13~4/RELEASE_ARM64_T7000 Date: 2014-10-30 15:44:20 +0100 Time since snapshot: 23 ms

Free pages: 2713 Active pages: 74735 Inactive pages: 36680 Speculative pages: 907 Throttled pages: 0 Purgeable pages: 0 Wired pages: 53730 File-backed pages: 36115 Anonymous pages: 76207 Compressions: 15727086 Decompressions: 9344708 Compressor Size: 84842 Uncompressed Pages in Compressor: 201768 Page Size: 16384 Largest process: Clash of Clans

Processes Name | | CPU Time| rpages| purgeable| recent_max| lifetime_max| fds | [reason] | (state)

com.apple.WebKit 0.138 1605 0 - 3982 50 (suspended) com.apple.WebKit 1.569 14318 0 - 13739 50 (suspended) MobileSafari <6b9b8fa0d5bc34c3ab83d2582b32d2a5> 1.254 10019 0 - 12866 50 (suspended) com.apple.WebKit 0.583 1534 0 - 2512 50 (suspended) familycircled 0.185 404 0 - 1775 50 (daemon) (idle) AppStore 3.424 8578 0 - 11370 50 (suspended) CMFSyncAgent <1c3dfda92a013659aa0d1e98b7887750> 0.076 179 0 - 553 50 (daemon) (idle) MessagesNotifica 2.210 2706 0 - 4618 50 (suspended) itunescloudd <803a7d02a3df3b45873006ceed132e7d> 3.578 1000 0 - 2055 50 (daemon) (idle) com.apple.datami <1c7e2dcebe9d35c487cf6a27d719c570> 0.049 137 0 - 434 50 (daemon) (idle) Clash of Clans <7f1aee65a2973961ba54111f7f208314> 39.439 52056 0 - 32178 50 (suspended) WirelessRadioMan 0.073 260 0 - 839 50 (daemon) (idle) CloudKeychainPro <98800bb05ca33d81babee80ebbd2008e> 0.054 158 0 - 481 50 (daemon) (idle) IMDPersistenceAg <37dfa00a6b313313910dfc2ee0a56b6d> 2.251 542 0 - 3306 50 (daemon) (idle) SiriViewService 1.378 2767 0 - 5487 50 (suspended) com.apple.voicet <0815f770b9f33a6e9b5547f6cc1de8fa> 0.052 233 0 - 833 50 (daemon) (idle) medialibraryd <8de7ce8f044d306db579dd0310f002b6> 4.492 452 0 - 1272 50 (daemon) (idle) mobileassetd 7.482 1339 0 - 1455 50 (daemon) (idle) geod 0.230 590 0 - 1416 50 (daemon) (idle) mobile_assertion <80206fabe8453aa9bb37413be884d704> 0.055 135 0 - 365 50 (daemon) (idle) amfid <5ace58058eef325bac3f9d2e7a41bb3e> 0.725 845 0 - 939 50 (daemon) (idle) CallHistorySyncH <7c8997eb5dd331ce818f355d02abb48a> 0.069 377 0 - 1262 50 (daemon) (idle) nsurlstoraged <10db92edbbd236eea4b13bebeaa37a16> 15.883 1213 0 - 2128 100 (daemon) (idle) MobileCal 1.622 1365 0 - 3414 50 (suspended) recentsd 19.847 1480 0 - 1923 50 (daemon) (idle) calaccessd 44.453 1882 0 - 2634 50 (daemon) (idle) RemindersWidget <47fe581f713d3013b26e83bcf4eaabeb> 18.144 1915 0 - 3309 50 (suspended) timed <83a2a58fd15c38aba1f8db16fe174ea6> 14.125 305 0 - 715 50 (daemon) (idle) syslog_relay <840c2bf07e5f3eb8b3365725868d032d> 0.376 109 0 - 237 50 (daemon) (idle) lsuseractivityd <59b260b0b6c13aa2883a23e84096ecc8> 14.341 447 0 - 1747 50 (daemon) (idle) touchsetupd <6d8af03089e93d99b824ef2bcf15f06e> 3.344 204 0 - 682 50 (daemon) (idle) lockbot <17605f33ee2835ec994f4cae5cac35b2> 1.209 210 0 - 570 50 (daemon) (idle) awdd 12.030 2110 0 - 2184 50 (daemon) (idle) cloudd <467aba9532c53425a65288987c2e5e72> 130.057 2925 0 - 3361 200 (daemon) (idle) MobileGestaltHel <07f982fa78ba345ab678448ef6708c95> 4.673 175 0 - 540 50 (daemon) (idle) keybagd 7.316 312 0 - 353 50 (daemon) (idle) routined 128.519 1029 0 - 1607 50 (daemon) (idle) callservicesd <53b377fe33f3310d8af76a5f8ec05fe1> 0.162 524 0 - 1756 50 (daemon) (idle) healthd <33e2a5f67a433342aa33cec828d94246> 2.356 1105 0 - 2023 50 (daemon) (idle) librariand <8c9e23364d3a3a38831070bb19c4422c> 0.430 298 0 - 953 50 (daemon) (idle) mobactivationd <9fae32491b523451add8fd662c75faab> 2.548 231 0 - 782 50 (daemon) (idle) afcd 0.532 157 0 - 932 50 (daemon) (idle) misagent 0.452 190 0 - 339 50 (daemon) (idle) profiled <8745c7c4c7523f58bd935ad5731cd266> 8.836 890 0 - 1803 50 (daemon) (idle) containermanager 11.908 612 0 - 808 50 (daemon) (idle) installd 50.100 1157 0 - 3394 50 (daemon) (idle) swcd <95a43e53d1c13da4bb66849fce207126> 0.097 187 0 - 516 50 (daemon) (idle) mobile_installat <688526c9218c38c48cffb024c818c468> 2.706 743 0 - 1102 50 (daemon) (idle) assetsd <94dd53187c18322e92095ff79d3567e0> 11.404 3378 0 - 4614 50 (daemon) (idle) aosnotifyd <5fcb5978644d31af996b30c829be01d4> 1.083 569 0 - 1944 50 (daemon) (idle) findmydeviced 0.785 605 0 - 2020 50 (daemon) (idle) nehelper <3bd0bc2893e738a5a165ac8115696c15> 0.944 238 0 - 705 50 (daemon) (idle) pkd <2fc611b6d1d432999223db97207411cc> 5.071 502 0 - 654 50 (daemon) (idle) atc <9d34f87fbc6138a5aa5ce78606be5d99> 7.277 2060 0 - 5378 50 (daemon) (idle) tipsd 1.095 406 0 - 1419 50 (daemon) (idle) coresymbolicatio <09a629143bfc3a7d9228b414bb958ae9> 0.202 98 0 - 219 50 (daemon) (idle) diagnosticd <71f3f0e85d9d3fdd9ec31a889ab7aeb7> 0.329 135 0 - 215 50 (daemon) (idle) ContainerMetadat <13c0a0f812e8312d8664a4c82f714a0a> 1.573 2040 0 - 3335 50 highwater (idle) homed 2.102 405 0 - 1269 50 (daemon) (idle) assistant_servic <6cf9d3efc0553cb8a27cc5fb6e7d1f05> 0.530 1065 0 - 3172 50 (daemon) (idle) assistantd <0219a0f42fc3370d9517675fbe60fa9d> 23.563 1327 0 - 2909 50 (daemon) (idle) networkd_privile 1.327 107 0 - 222 50 (daemon) (idle) accountsd 245.670 2456 0 - 4851 50 (daemon) (idle) syncdefaultsd <372da3e60b6e38158cc2c7b0df05e809> 0.176 663 0 - 1384 50 (daemon) (idle) DuetHeuristic-BM <3be5c879f0c73a828a1cc0c92c804901> 7.798 413 0 - 845 50 (daemon) (idle) securityd 395.621 851 0 - 1443 50 (daemon) (idle) coreduetd <0002a01cca3532228221fdfa31f66c4a> 1393.708 2232 0 - 2508 50 (daemon) (idle) cfprefsd <9006298e365a3a03b8403196ba98d29b> 225.261 1315 0 - 1855 50 (daemon) (idle) sandboxd <41e17e071adb36bda10ba8d23dd4305e> 0.762 163 0 - 557 50 (daemon) (idle) WhatsApp <29d3f75201683e49aa6864ee2f5c0b51> 7.008 5665 0 - 10472 50 (background) Facebook <31dc24cb7f3b34a386baae89d385b3e4> 333.071 18091 0 - 18379 100 (background) nsurlsessiond 1771.895 1180 0 - 2223 200 (daemon) seld <765a0a7044d03e7b8cac6298d904d4de> 9.728 285 0 - 796 50 (daemon) nfcd 7.789 297 0 - 720 50 (daemon) passd 21.734 1246 0 - 3080 50 (daemon) biometrickitd <16a81b5b73e935c69a2301bb2505cdce> 60.167 692 0 - 805 50 (daemon) gamed <059e9b9abd7a320ebe2059cb08e21d9f> 110.067 2360 0 - 3076 200 (daemon) bird 84.414 2468 0 - 3920 50 (daemon) notification_pro <21d124f55aa3326e832237602bbcb239> 1.870 225 0 - 439 50 (daemon) MobileSMS <095512433aeb3245a20995682537eba3> 2.150 3076 0 - 5636 50 (resume) (continuous) MobileMail <9ab0e94c812a35b48bfb9247ad5bc666> 61.880 2606 0 - 4919 100 (resume) (continuous) lsd 64.553 1096 0 - 1536 50 (daemon) tccd <09c47a77799f311e9760bdf727854390> 32.565 364 0 - 880 50 (daemon) kbd <353f8323c90131248dc3ffea34198938> 331.638 3768 0 - 8046 50 (daemon) InCallService <641cb741cc4c387fa97895f49c65dc0e> 662.577 2471 0 - 5190 50 (resume) (continuous) ptpd <7bbf9eda115c34f8b6f7dee2581e6c04> 3.820 1278 0 - 2630 50 (daemon) BTServer 41.309 713 0 - 1807 50 (daemon) wifid 292.070 835 0 - 1791 50 (daemon) discoveryd <95c25671ae3c32ee8622591fd5d19761> 1022.685 2455 0 - 2554 200 (daemon) lockdownd <413f08805af93cabae2757393cd899ea> 75.094 496 0 - 986 50 (daemon) imagent <0700045eaa803925987221760d8799ac> 568.466 1950 0 - 4223 50 (daemon) identityservices <579d18471dec3fd890be600ff343beef> 519.287 1264 0 - 2320 50 (daemon) mediaserverd <4809d883646e360eb8dd8a84d4bc9806> 5186.628 18182 0 - 18392 100 (daemon) iaptransportd <5c41df46b8de3535832ab9c2a48721db> 44.944 413 0 - 746 50 (daemon) syslogd <05f6b5e5512938a892bac5af23ab1c08> 183.973 456 0 - 395 50 (daemon) powerd <854edfcea1eb331dbc2820ed8635ed91> 294.593 621 0 - 702 50 (daemon) apsd <130455ed9f8e321dadcc21d9f715f0f3> 368.952 990 0 - 2080 100 (daemon) networkd 2162.203 993 0 - 1728 50 (daemon) sharingd 210.066 983 0 - 2419 50 (daemon) dataaccessd <9697275f4cf83af3831861af286b477d> 1250.799 2609 0 - 3513 50 (daemon) vmd 0.882 259 0 - 761 50 (daemon) itunesstored <66d87b96eb703101b901222e2ff365a5> 329.292 3548 0 - 5050 100 (daemon) SCHelper 21.313 154 0 - 323 50 (daemon) locationd 183.829 2842 0 - 4294 50 (daemon) com.apple.Stream 3.667 234 0 - 705 50 (daemon) mediaremoted <0749929c2b2b3c719f93f10892d235b0> 5.491 313 0 - 1078 50 (daemon) SpringBoard <7c1aa02fc04d3e19a2f1ff28b6b7e10b> 6261.982 22870 0 - 23513 100
backboardd <11829fb1a5ff39bb9fef92e5783c1c9f> 19478.509 15349 0 - 6078 50 (daemon) fseventsd <391c1f7a879b369196a28e62271f1c78> 78.745 988 0 - 1233 50 (daemon) UserEventAgent 1940.132 2703 0 - 2864 200 (daemon) configd <601e4d08d81c300c9ee3f57d638d666a> 572.184 641 0 - 1286 50 (daemon) fairplayd.H2 51.690 216 0 - 1739 50 (daemon) assertiond 120.890 515 0 - 856 50 (daemon) distnoted <473ac03b0d4834518e54b826db35f79b> 24.651 341 0 - 413 50 (daemon) wirelessproxd <8f301e7f78c63856aaec9529ef246ccf> 11.773 306 0 - 793 50 (daemon) discoveryd_helpe <7b0af17b203838bd9a48ed7430b3c576> 0.298 160 0 - 503 50 (daemon) filecoordination <29dc66b208e43e89a6fb6c88b8aad6e6> 10.424 449 0 - 921 100 (daemon) aggregated 3312.824 1999 0 - 2260 50 (daemon) ubd <567a128020b73346904f199e21712ad3> 0.042 238 0 - 849 50 (daemon) CommCenter 5861.896 5282 0 - 7155 50 (daemon) notifyd <5fa8fd5e44c83f64be1475b882b16c82> 401.697 475 0 - 455 50 (daemon)

End

alebianco commented 9 years ago

that's a crash log but i can't really say what was the cause. maybe logging has to be enabled on the device? not sure... (and please use something like http://pastebin.com/ for this things or the issue will be unreadable)

fix89 commented 9 years ago

Solved. The problem was another native extension... one about notification (by distriqt). Removed, and now everything works. Sorry :)

alebianco commented 9 years ago

Right, I had a similar issue but it should warn you when compiling if I remember correctly. In the next release I'll make some adjustments so the extension will play nicely with others.