manojdcoder / fabric

Twitter Fabric Integration
Other
23 stars 7 forks source link

How to setup properly #8

Open parnanzio opened 8 years ago

parnanzio commented 8 years ago

Hi, I'm using the v 1.0.1 of this module in my Alloy project.

I followed all the instructions in the documentation, but then it doesn't work. The only way it can load correctly is by opening the builded XCodeProject with XCode and using the standard way to install Crashlytics (by using the Fabric app).

I think there is a smarter way to use this module, isn't it?

My step: . install the plugin . configure the cli hook (for iOS) . install the module . insert the crash code after initialization . run the app

Right now on the Crashlytics dashboard my new version doesn't appear. It appears only when building from XCode (with the process described above).

What am I missing?

manojdcoder commented 8 years ago

Did you try a clean build?

parnanzio commented 8 years ago

Yes.. many times, but is not working.

Here are my steps:

In the fabric dashboard the new app version doesn't appear, neither the crash.

parnanzio commented 8 years ago

Here are some logs:

[object TiFabricModule] loaded
Fabric.Crashlytics.version : 3.8.1
2016-09-19 14:15:27.638 SFA BP 2[34427:9209703] [Crashlytics:Crash] WARNING: CLSLog has been used before (or concurrently with) Crashlytics initialization and cannot be recorded. The message was: 
-[TiCrashlyticsModule leaveBreadcrumb:] line 42 $ (
    "app is crashing now through crash method"
)

This is the function I'm calling:

function simulateCrash(){
    FABRIC.Crashlytics.leaveBreadcrumb("app is crashing now through crash method");
    FABRIC.Crashlytics.crash();
}
parnanzio commented 8 years ago

@chrisribe do you think the problem could be in the shell script not being executed?

zozo4kin commented 7 years ago

@parnanzio how did you integrate it? I copied ti.fabric folder to ti.plugins, but I'm getting "Couldn't find module: ti.fabric for architecture: armv7". I realised, that ti.fabric folder doesn't contain iphone folder, and I copied it to ti.fabric. But result is the same.

parnanzio commented 7 years ago

@zozo4kin there are some steps not written. You must:

I'm still having problems when compiling from Titanium: the module is integrated in the app, but cannot trace any crash..

Please @manojdcoder / @chrisribe reply with the right steps to install this module!

chrisribe commented 7 years ago

Hi Parnanzio and zozo4kin,

If you are not seeing the app in the dashboard it means it did not register correctly. I am out of the country right now. But if I remember correctly, you must install and run the Fabric.io app. Then open your app build in xcode. There are instructions to register the app via xcode. Then you must copy the secret key to the module... I am not sure of the last part, I may be confusing another project. I would to review my code and submit an example.

https://docs.fabric.io/apple/fabric/settings/api-keys.html

Hope this points you in the right direction... Chris

parnanzio commented 7 years ago

@chrisribe Thanks for the reply, but the problem is not about the secret key or the registration of the app. The problem is that once the app is registered, nothing gets traced on fabric.io. If I try to log something or crash the app, on the dashboard nothing is received. And new version of the app are not visible if I don't pass through XCode.

The module from Titanium is not triggered. @manojdcoder said it could be the shell script is not executed. From the code:

shellScript = '\\nchmod 755 ../../modules/iphone/ti.fabric/' + VERSION + '/platform/Fabric.framework/run\\n..
parnanzio commented 7 years ago

@chrisribe @manojdcoder I debugged the cli hook and it seems that the script cannot find the name="Post-Compile" string to inject the code! https://github.com/manojdcoder/fabric/blob/master/plugins/ti.fabric/cli/hooks/run.js#L50

prjoshi60 commented 7 years ago

Did anyone manage to integrate Crashlytics in alloy project? If yes can you guys help me to do it?

prjoshi60 commented 7 years ago

@chrisribe @manojdcoder

We have tried the above module, integrated everything as per the instructions for iOS. After running the app in simulator we find the logs as follows.

[INFO] : crash1/1.0 (5.2.2.b685ddb) [INFO] : [object TiFabricModule] loaded [INFO] : Fabric.Crashlytics.version : 3.7.2 [INFO] : ACS Login Results for environment development:

[INFO] : 2017-05-10 19:47:17.608 crash1[73986:509440] [Crashlytics:Crash] Warning: NSUncaughtExceptionHandler is 'TiUncaughtExceptionHandler' in '/Users/XXXX/Library/Developer/CoreSimulator/Devices/71B148C9-E09E-4334-9FEE-AE40955FCD48/data/Containers/Bundle/Application/4BABB52F-A328-4A67-A9F8-677D0674614E/crash1.app/crash1' [INFO] : 2017-05-10 19:47:35.455 crash1[73986:509440] [Crashlytics:Answers] Answers Event tracking is disabled for this application. Ignoring CLSAnswersSignUpEvent { { [INFO] : method = "signup-button"; [INFO] : success = true; [INFO] : } customAttributes={ [INFO] : }} [INFO] : 2017-05-10 19:47:46.453 crash1[73986:509440] [Crashlytics:Answers] Answers Event tracking is disabled for this application. Ignoring CLSAnswersCustomEvent { { [INFO] : customEvtName = customValue; [INFO] : } } [INFO] : 2017-05-10 19:47:47.262 crash1[73986:509440] [Crashlytics:Answers] Answers Event tracking is disabled for this application. Ignoring CLSAnswersCustomEvent { { [INFO] : customEvtName = customValue; [INFO] : } } [INFO] : 2017-05-10 19:47:48.898 crash1[73986:509440] [Crashlytics:Answers] Answers Event tracking is disabled for this application. Ignoring CLSAnswersSignUpEvent { { [INFO] : method = "signup-button"; [INFO] : success = true; [INFO] : } customAttributes={ [INFO] : }} [INFO] : Application started [INFO] : crash1/1.0 (5.2.2.b685ddb) [INFO] : [object TiFabricModule] loaded [INFO] : Fabric.Crashlytics.version : 3.7.2 [INFO] : 2017-05-10 19:47:51.834 crash1[74082:510685] [Crashlytics:Crash:Reports] Packaged report with id '931b973bd1574954807744ff42eec90e' for submission [INFO] : 2017-05-10 19:47:51.835 crash1[74082:510685] [Crashlytics:Crash:Reports] Submitting report [INFO] : 2017-05-10 19:47:51.835 crash1[74082:510685] [[Crashlytics:Crash:Reports]] Submitting async /Users/XXXX/Library/Developer/CoreSimulator/Devices/71B148C9-E09E-4334-9FEE-AE40955FCD48/data/Containers/Data/Application/CD139A58-364B-4A6A-806A-1FF1904F9CC2/Library/Caches/com.crashlytics.data/com.vmware.crash1/v3/prepared/50BFCF3C-7344-458D-BB81-D18FCBA9147C.multipartmime

[INFO] : 2017-05-10 19:47:54.309 crash1[74082:510669] [Crashlytics:Crash:Reports] completed submission of /Users/XXXXX/Library/Developer/CoreSimulator/Devices/71B148C9-E09E-4334-9FEE-AE40955FCD48/data/Containers/Data/Application/CD139A58-364B-4A6A-806A-1FF1904F9CC2/Library/Caches/com.crashlytics.data/com.vmware.crash1/v3/prepared/50BFCF3C-7344-458D-BB81-D18FCBA9147C.multipartmime [INFO] : 2017-05-10 19:47:54.310 crash1[74082:510669] [Crashlytics:Crash] report submission successful

But we are not able to see the entries for the same on Crashlytics Dashboard.

aleang commented 7 years ago

Hi @prjoshi60 , did you ever encounter the original problem? [Crashlytics:Crash] WARNING: CLSLog has been used before (or concurrently with) Crashlytics initialization and cannot be recorded. The message was: -[TiCrashlyticsModule leaveBreadcrumb:] line 42 $ ( "app is crashing now through crash method" )

The app crashes when I test using crash() but my logs only display what is above, not as much as your logs. I am working on a Titanium project using SDK 6.0.0 and have