Git Product home page Git Product logo

titanium-crashlytics's Introduction

Crashlytics in Titanium

Use the native Crashlytics iOS / Android SDK in Titanium.

Supporting this effort

The whole Firebase support in Titanium is developed and maintained by the community (@hansemannn and @m1ga). To keep this project maintained and be able to use the latest Firebase SDK's, please see the "Sponsor" button of this repository, thank you!

Requirements

  • iOS: Titanium SDK 10.0.0+
  • Android: Titanium SDK 9.0.0+

Setup

In general, remember to not use any Crashlytics API's before actually opening your first window. While this might not result in a crash on iOS, the native Android SDK will error if being used before your app finished launching due to requiring the native Activity.

iOS

  1. Create a new folder scripts/ in your project root

  2. Copy the run and upload-symbols shell files from this repo's helper/ directory to scripts/ in your project

  3. Make sure your Firebase project is configured properly and you have your GoogleService-Info.plist in place as described here.

  4. Make sure the upload-symbols file's permissions are correct, running chmod +x PROJ_ROOT_PATH/scripts/upload-symbols (replace PROJ_ROOT_PATH with your real project root path)

  5. You are ready to go!

Android

var crash = require("ti.crashlytics");
crash.crash();  // test crash
  1. Add the following to the <application> tag inside the manifest configuration in your tiapp.xml:
<meta-data android:name="firebase_analytics_collection_enabled"
  android:value="true"/>
<meta-data android:name="google_analytics_adid_collection_enabled"
  android:value="true"/>
<service
  android:name="com.google.android.gms.measurement.AppMeasurementService"
  android:enabled="true"
  android:exported="false"/>
<service
  android:name="com.google.android.gms.measurement.AppMeasurementJobService"
  android:permission="android.permission.BIND_JOB_SERVICE"
  android:enabled="true"
  android:exported="false"/>
<service
  android:name="INSERT_YOUR_APP_PACKAGE_NAME.gcm.RegistrationIntentService"
  android:exported="false"/>
<receiver
  android:name="com.google.android.gms.measurement.AppMeasurementReceiver"
  android:enabled="true">
  <intent-filter>
    <action android:name="com.google.android.gms.measurement.UPLOAD"/>
  </intent-filter>
</receiver>
  1. You are ready to go!

Example

See the Sample App for an example of configuring the required API keys and project settings.

API's

Cross platform API's

Crashlytics.log(message)

Log a Custom Event to see user actions that are uniquely important for your app in real-time.

Crashlytics.userId = myUserId

Specify a user identifier which will be visible in the Crashlytics UI.

Crashlytics.recordError({ domain, code, userInfo })

Records non-fatal errors. Note: The code and userInfo parameters are iOS-only.

Android only API's

Crashlytics.crash()

Simulate a crash (for testing purpose)

Crashlytics.throwException()

Simulate an exception (for testing purpose)

Author

Hans Knöchel (@hansemannnn / Web)

License

MIT

Contributing

Code contributions are greatly appreciated, please submit a new Pull-Request!

titanium-crashlytics's People

Contributors

bduyng avatar francescolombardo avatar hansemannn avatar jordanbisato avatar m1ga avatar petenathan42 avatar rlustemberg avatar yuranevmer avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

titanium-crashlytics's Issues

Production build fails on PhaseScriptExecution Script-000000000000000000000041.sh

Ti SDK version: 9.0.1.GA and 8.3.1.GA
Titanium CLI: 5.2.2
Alloy: 1.14.5
firebase-core: 2.2.0
ti-crashlytics: 1.2.2
firebase-analytics: 1.4.1
OS: Catalina 10.15.4

[ERROR] ** ARCHIVE FAILED **
[ERROR] The following build commands failed:
[ERROR]         PhaseScriptExecution [Ti]\ Crashlytics /Users/timpoulsen/repos/skypanther
/client_app/build/iphone/build/Intermediates/AppName.build/Release-iphoneos/AppName.build
/Script-000000000000000000000041.sh
[ERROR] (1 failure)

That file contains:

#!/bin/sh
/bin/bash "../../scripts/script-titanium-crashlytics.sh"

That script file doesn't exist there. In fact I cannot find it anywhere in the build folder. It is maybe not being copied from PROJECT/scripts/script-titanium-crashlytics.sh.

Seems similar to issue #25 but in my case, I do have firebase core installed and instantiated/configured.

Resolutions I tried:

  • Putting the scripts/script-titanium-crashlytics.sh file inside the app folder instead of PROJECT
  • In that file, hard coding the full path to the uploadDSYM executable
  • Updating ti.runscriptphase.js with the full path to the script-titanium-crashlytics.sh file
  • Updating ti.runscriptphase.js to use the /bin/bash shell path since I thought Catalina didn't include sh
  • My App ID happens to contain a hyphen, which I thought might mess up the shell script. I tried various combinations of quotes around portions or all of the uploadDSYM command.

Android Issue When Resuming Activity

So I implemented the 1.1.1 version of the module and it works great until I run ti.barcode which starts a new activity. When I close the barcode scanner or anything else that creates a new activity the crash of crashlytics happens where it needs to be registered and gives the whole error like below.

[ERROR] CrashlyticsCore: This app relies on Crashlytics. Please sign up for access at https://fabric.io/sign_up,
[ERROR] CrashlyticsCore: install an Android build tool and ask a team member to invite you to this app's organization.

I was going to look at your 1.1.1 version code but that is not what I can view from github. I cloned the repo but the code is the 1.1.0 version and 1.1.1 is only in the releases where you can't view the actual module file code.

I think that the Fabric initialization needs to occur on the onResume lifecycle event instead of the onStart if that is still how 1.1.1 is written. This would allow the module to restart itself everytime the main activity is running.

Let me know if that will work and if so can you update github with the 1.1.1 code so I can make the change.

Thanks,

is it a fabric crash?

  1. Crashed: com.twitter.crashlytics.ios.exception
    0 myapp 0x1028785ec CLSProcessRecordAllThreads + 4330178028
    1 myapp 0x1028789d4 CLSProcessRecordAllThreads + 4330179028
    2 myapp 0x102868250 CLSHandler + 4330111568
    3 myapp 0x102876be4 __CLSExceptionRecord_block_invoke + 4330171364
    4 libdispatch.dylib 0x1db1e97d4 _dispatch_client_callout + 16
    5 libdispatch.dylib 0x1db1ca5fc _dispatch_lane_barrier_sync_invoke_and_complete + 56
    6 myapp 0x102876650 CLSExceptionRecord + 4330169936
    7 myapp 0x10287647c CLSExceptionRecordNSException + 4330169468
    8 myapp 0x102876070 CLSTerminateHandler() + 4330168432
    9 libc++abi.dylib 0x1da978838 std::__terminate(void (*)()) + 16
    10 libc++abi.dylib 0x1da9788c4 std::terminate() + 84
    11 libobjc.A.dylib 0x1da983d5c _destroyAltHandlerList + 10
    12 libdispatch.dylib 0x1db1e97e8 _dispatch_client_callout + 36
    13 libdispatch.dylib 0x1db1c0c34 _dispatch_continuation_pop$VARIANT$armv81 + 404
    14 libdispatch.dylib 0x1db1c0314 _dispatch_async_redirect_invoke + 592
    15 libdispatch.dylib 0x1db1cc9d4 _dispatch_root_queue_drain + 340
    16 libdispatch.dylib 0x1db1cd248 _dispatch_worker_thread2 + 116
    17 libsystem_pthread.dylib 0x1db3c91b4 _pthread_wqthread + 464
    18 libsystem_pthread.dylib 0x1db3cbcd4 start_wqthread + 4

--

Fatal Exception: NSInvalidArgumentException
0 CoreFoundation 0x1db7a927c __exceptionPreprocess
1 libobjc.A.dylib 0x1da9839f8 objc_exception_throw
2 CoreFoundation 0x1db6c5ab8 -[NSOrderedSet initWithSet:copyItems:]
3 CoreFoundation 0x1db7aeac4 forwarding
4 CoreFoundation 0x1db7b075c _CF_forwarding_prep_0
5 myapp 0x1028839e0 -[ANSAttributeDictionary initWithDictionary:]
6 myapp 0x10288d368 -[ANSCustomEvent attributesDictionary]
7 myapp 0x10288d280 -[ANSCustomEvent dictionaryRepresentation]
8 myapp 0x10288785c -[ANSWriteEventOperation generateFormattedLogLineWithEvent:]
9 myapp 0x102887148 -[ANSWriteEventOperation initWithEvent:metadata:logFileUrl:]
10 myapp 0x10289011c __37-[ANSAnswersController enqueueEvent:]_block_invoke
11 Foundation 0x1dc20def8 NSBLOCKOPERATION_IS_CALLING_OUT_TO_A_BLOCK
12 Foundation 0x1dc11a3e0 -[NSBlockOperation main]
13 Foundation 0x1dc1198c8 -[__NSOperationInternal _start:]
14 Foundation 0x1dc20fc7c __NSOQSchedule_f
15 libdispatch.dylib 0x1db1e8a38 _dispatch_call_block_and_release
16 libdispatch.dylib 0x1db1e97d4 _dispatch_client_callout
17 libdispatch.dylib 0x1db1c0c34 _dispatch_continuation_pop$VARIANT$armv81
18 libdispatch.dylib 0x1db1c0314 _dispatch_async_redirect_invoke
19 libdispatch.dylib 0x1db1cc9d4 _dispatch_root_queue_drain
20 libdispatch.dylib 0x1db1cd248 _dispatch_worker_thread2
21 libsystem_pthread.dylib 0x1db3c91b4 _pthread_wqthread
22 libsystem_pthread.dylib 0x1db3cbcd4 start_wqthread

  1. com.apple.main-thread
    0 libsystem_kernel.dylib 0x1db33b0f4 mach_msg_trap + 8
    1 libsystem_kernel.dylib 0x1db33a5a0 mach_msg + 72
    2 CoreFoundation 0x1db73aa10 __CFRunLoopServiceMachPort + 236
    3 CoreFoundation 0x1db735920 __CFRunLoopRun + 1360
    4 CoreFoundation 0x1db7350b0 CFRunLoopRunSpecific + 436
    5 GraphicsServices 0x1dd93579c GSEventRunModal + 104
    6 UIKitCore 0x207fa1978 UIApplicationMain + 212
    7 myapp 0x1027a06ec main + 69 (main.m:69)
    8 libdyld.dylib 0x1db1fa8e0 start + 4

  2. com.apple.uikit.eventfetch-thread
    0 libsystem_kernel.dylib 0x1db33b0f4 mach_msg_trap + 8
    1 libsystem_kernel.dylib 0x1db33a5a0 mach_msg + 72
    2 CoreFoundation 0x1db73aa10 __CFRunLoopServiceMachPort + 236
    3 CoreFoundation 0x1db735920 __CFRunLoopRun + 1360
    4 CoreFoundation 0x1db7350b0 CFRunLoopRunSpecific + 436
    5 Foundation 0x1dc102fac -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 300
    6 Foundation 0x1dc102e3c -[NSRunLoop(NSRunLoop) runUntilDate:] + 96
    7 UIKitCore 0x208087494 -[UIEventFetcher threadMain] + 136
    8 Foundation 0x1dc22f6a4 NSThread__start + 984
    9 libsystem_pthread.dylib 0x1db3c82c0 _pthread_body + 128
    10 libsystem_pthread.dylib 0x1db3c8220 _pthread_start + 44
    11 libsystem_pthread.dylib 0x1db3cbcdc thread_start + 4

  3. JavaScriptCore bmalloc scavenger
    0 libsystem_kernel.dylib 0x1db345ee4 __psynch_cvwait + 8
    1 libsystem_pthread.dylib 0x1db3c54a4 _pthread_cond_wait$VARIANT$armv81 + 628
    2 libc++.1.dylib 0x1da91d090 std::__1::condition_variable::wait(std::__1::unique_lockstd::__1::mutex&) + 24
    3 JavaScriptCore 0x1e2940aa8 void std::__1::condition_variable_any::wait<std::__1::unique_lockbmalloc::Mutex >(std::__1::unique_lockbmalloc::Mutex&) + 108
    4 JavaScriptCore 0x1e2944a9c bmalloc::Scavenger::threadRunLoop() + 176
    5 JavaScriptCore 0x1e2944214 bmalloc::Scavenger::Scavenger(std::__1::lock_guardbmalloc::Mutex&) + 10
    6 JavaScriptCore 0x1e2945c54 std::__1::__thread_specific_ptrstd::__1::__thread_struct::set_pointer(std::__1::__thread_struct*) + 38
    7 libsystem_pthread.dylib 0x1db3c82c0 _pthread_body + 128
    8 libsystem_pthread.dylib 0x1db3c8220 _pthread_start + 44
    9 libsystem_pthread.dylib 0x1db3cbcdc thread_start + 4

  4. com.twitter.crashlytics.ios.MachExceptionServer
    0 libsystem_kernel.dylib 0x1db33b0f4 mach_msg_trap + 8
    1 libsystem_kernel.dylib 0x1db33a5a0 mach_msg + 72
    2 myapp 0x10286321c CLSMachExceptionServer + 4330091036
    3 libsystem_pthread.dylib 0x1db3c82c0 _pthread_body + 128
    4 libsystem_pthread.dylib 0x1db3c8220 _pthread_start + 44
    5 libsystem_pthread.dylib 0x1db3cbcdc thread_start + 4

  5. com.apple.NSURLConnectionLoader
    0 libsystem_kernel.dylib 0x1db33b0f4 mach_msg_trap + 8
    1 libsystem_kernel.dylib 0x1db33a5a0 mach_msg + 72
    2 CoreFoundation 0x1db73aa10 __CFRunLoopServiceMachPort + 236
    3 CoreFoundation 0x1db735920 __CFRunLoopRun + 1360
    4 CoreFoundation 0x1db7350b0 CFRunLoopRunSpecific + 436
    5 CFNetwork 0x1dbd4e74c -[__CoreSchedulingSetRunnable runForever] + 216
    6 Foundation 0x1dc22f6a4 NSThread__start + 984
    7 libsystem_pthread.dylib 0x1db3c82c0 _pthread_body + 128
    8 libsystem_pthread.dylib 0x1db3c8220 _pthread_start + 44
    9 libsystem_pthread.dylib 0x1db3cbcdc thread_start + 4

  6. Thread
    0 libsystem_pthread.dylib 0x1db3cbcd0 start_wqthread + 190

  7. Thread
    0 libsystem_pthread.dylib 0x1db3cbcd0 start_wqthread + 190

  8. hardwareJPEGQueue/workers/worker0
    0 libsystem_kernel.dylib 0x1db345ee4 __psynch_cvwait + 8
    1 libsystem_pthread.dylib 0x1db3c54a4 _pthread_cond_wait$VARIANT$armv81 + 628
    2 VectorKit 0x1ebbf425c karo::Worker::threadMain() + 572
    3 VectorKit 0x1ebc7f018 karo::Thread::callback(void*) + 72
    4 libsystem_pthread.dylib 0x1db3c82c0 _pthread_body + 128
    5 libsystem_pthread.dylib 0x1db3c8220 _pthread_start + 44
    6 libsystem_pthread.dylib 0x1db3cbcdc thread_start + 4

  9. hardwareJPEGQueue/workers/worker1
    0 libsystem_kernel.dylib 0x1db345ee4 __psynch_cvwait + 8
    1 libsystem_pthread.dylib 0x1db3c54a4 _pthread_cond_wait$VARIANT$armv81 + 628
    2 VectorKit 0x1ebbf425c karo::Worker::threadMain() + 572
    3 VectorKit 0x1ebc7f018 karo::Thread::callback(void*) + 72
    4 libsystem_pthread.dylib 0x1db3c82c0 _pthread_body + 128
    5 libsystem_pthread.dylib 0x1db3c8220 _pthread_start + 44
    6 libsystem_pthread.dylib 0x1db3cbcdc thread_start + 4

  10. diskQueue/workers/worker0
    0 libsystem_kernel.dylib 0x1db345ee4 __psynch_cvwait + 8
    1 libsystem_pthread.dylib 0x1db3c54a4 _pthread_cond_wait$VARIANT$armv81 + 628
    2 VectorKit 0x1ebbf425c karo::Worker::threadMain() + 572
    3 VectorKit 0x1ebc7f018 karo::Thread::callback(void*) + 72
    4 libsystem_pthread.dylib 0x1db3c82c0 _pthread_body + 128
    5 libsystem_pthread.dylib 0x1db3c8220 _pthread_start + 44
    6 libsystem_pthread.dylib 0x1db3cbcdc thread_start + 4

  11. processingQueue/workers/worker0
    0 libsystem_kernel.dylib 0x1db345ee4 __psynch_cvwait + 8
    1 libsystem_pthread.dylib 0x1db3c54a4 _pthread_cond_wait$VARIANT$armv81 + 628
    2 VectorKit 0x1ebbf425c karo::Worker::threadMain() + 572
    3 VectorKit 0x1ebc7f018 karo::Thread::callback(void*) + 72
    4 libsystem_pthread.dylib 0x1db3c82c0 _pthread_body + 128
    5 libsystem_pthread.dylib 0x1db3c8220 _pthread_start + 44
    6 libsystem_pthread.dylib 0x1db3cbcdc thread_start + 4

  12. processingQueue/workers/worker1
    0 libsystem_kernel.dylib 0x1db345ee4 __psynch_cvwait + 8
    1 libsystem_pthread.dylib 0x1db3c54a4 _pthread_cond_wait$VARIANT$armv81 + 628
    2 VectorKit 0x1ebbf425c karo::Worker::threadMain() + 572
    3 VectorKit 0x1ebc7f018 karo::Thread::callback(void*) + 72
    4 libsystem_pthread.dylib 0x1db3c82c0 _pthread_body + 128
    5 libsystem_pthread.dylib 0x1db3c8220 _pthread_start + 44
    6 libsystem_pthread.dylib 0x1db3cbcdc thread_start + 4

  13. processingQueue/workers/worker2
    0 libsystem_kernel.dylib 0x1db345ee4 __psynch_cvwait + 8
    1 libsystem_pthread.dylib 0x1db3c54a4 _pthread_cond_wait$VARIANT$armv81 + 628
    2 VectorKit 0x1ebbf425c karo::Worker::threadMain() + 572
    3 VectorKit 0x1ebc7f018 karo::Thread::callback(void*) + 72
    4 libsystem_pthread.dylib 0x1db3c82c0 _pthread_body + 128
    5 libsystem_pthread.dylib 0x1db3c8220 _pthread_start + 44
    6 libsystem_pthread.dylib 0x1db3cbcdc thread_start + 4

  14. processingQueue/workers/worker3
    0 libsystem_kernel.dylib 0x1db345ee4 __psynch_cvwait + 8
    1 libsystem_pthread.dylib 0x1db3c54a4 _pthread_cond_wait$VARIANT$armv81 + 628
    2 VectorKit 0x1ebbf425c karo::Worker::threadMain() + 572
    3 VectorKit 0x1ebc7f018 karo::Thread::callback(void*) + 72
    4 libsystem_pthread.dylib 0x1db3c82c0 _pthread_body + 128
    5 libsystem_pthread.dylib 0x1db3c8220 _pthread_start + 44
    6 libsystem_pthread.dylib 0x1db3cbcdc thread_start + 4

  15. processingQueue/workers/worker4
    0 libsystem_kernel.dylib 0x1db345ee4 __psynch_cvwait + 8
    1 libsystem_pthread.dylib 0x1db3c54a4 _pthread_cond_wait$VARIANT$armv81 + 628
    2 VectorKit 0x1ebbf425c karo::Worker::threadMain() + 572
    3 VectorKit 0x1ebc7f018 karo::Thread::callback(void*) + 72
    4 libsystem_pthread.dylib 0x1db3c82c0 _pthread_body + 128
    5 libsystem_pthread.dylib 0x1db3c8220 _pthread_start + 44
    6 libsystem_pthread.dylib 0x1db3cbcdc thread_start + 4

  16. com.apple.vectorkit.dispatch.layoutqueue
    0 libsystem_kernel.dylib 0x1db33b148 semaphore_timedwait_trap + 8
    1 libdispatch.dylib 0x1db1b8a4c _dispatch_sema4_timedwait$VARIANT$armv81 + 64
    2 libdispatch.dylib 0x1db1b93a8 _dispatch_semaphore_wait_slow + 72
    3 libdispatch.dylib 0x1db1cc7c8 _dispatch_worker_thread + 344
    4 libsystem_pthread.dylib 0x1db3c82c0 _pthread_body + 128
    5 libsystem_pthread.dylib 0x1db3c8220 _pthread_start + 44
    6 libsystem_pthread.dylib 0x1db3cbcdc thread_start + 4

  17. com.apple.vectorkit.dispatch.renderqueue
    0 libsystem_kernel.dylib 0x1db33b148 semaphore_timedwait_trap + 8
    1 libdispatch.dylib 0x1db1b8a4c _dispatch_sema4_timedwait$VARIANT$armv81 + 64
    2 libdispatch.dylib 0x1db1b93a8 _dispatch_semaphore_wait_slow + 72
    3 libdispatch.dylib 0x1db1cc7c8 _dispatch_worker_thread + 344
    4 libsystem_pthread.dylib 0x1db3c82c0 _pthread_body + 128
    5 libsystem_pthread.dylib 0x1db3c8220 _pthread_start + 44
    6 libsystem_pthread.dylib 0x1db3cbcdc thread_start + 4

  18. Thread
    0 libsystem_pthread.dylib 0x1db3cbcd0 start_wqthread + 190

  19. Thread
    0 libsystem_pthread.dylib 0x1db3cbcd0 start_wqthread + 190

  20. Crashed: com.twitter.crashlytics.ios.exception
    0 myapp 0x1028785ec CLSProcessRecordAllThreads + 4330178028
    1 myapp 0x1028789d4 CLSProcessRecordAllThreads + 4330179028
    2 myapp 0x102868250 CLSHandler + 4330111568
    3 myapp 0x102876be4 __CLSExceptionRecord_block_invoke + 4330171364
    4 libdispatch.dylib 0x1db1e97d4 _dispatch_client_callout + 16
    5 libdispatch.dylib 0x1db1ca5fc _dispatch_lane_barrier_sync_invoke_and_complete + 56
    6 myapp 0x102876650 CLSExceptionRecord + 4330169936
    7 myapp 0x10287647c CLSExceptionRecordNSException + 4330169468
    8 myapp 0x102876070 CLSTerminateHandler() + 4330168432
    9 libc++abi.dylib 0x1da978838 std::__terminate(void (*)()) + 16
    10 libc++abi.dylib 0x1da9788c4 std::terminate() + 84
    11 libobjc.A.dylib 0x1da983d5c _destroyAltHandlerList + 10
    12 libdispatch.dylib 0x1db1e97e8 _dispatch_client_callout + 36
    13 libdispatch.dylib 0x1db1c0c34 _dispatch_continuation_pop$VARIANT$armv81 + 404
    14 libdispatch.dylib 0x1db1c0314 _dispatch_async_redirect_invoke + 592
    15 libdispatch.dylib 0x1db1cc9d4 _dispatch_root_queue_drain + 340
    16 libdispatch.dylib 0x1db1cd248 _dispatch_worker_thread2 + 116
    17 libsystem_pthread.dylib 0x1db3c91b4 _pthread_wqthread + 464
    18 libsystem_pthread.dylib 0x1db3cbcd4 start_wqthread + 4

  21. AVAudioSession Notify Thread
    0 libsystem_kernel.dylib 0x1db33b0f4 mach_msg_trap + 8
    1 libsystem_kernel.dylib 0x1db33a5a0 mach_msg + 72
    2 CoreFoundation 0x1db73aa10 __CFRunLoopServiceMachPort + 236
    3 CoreFoundation 0x1db735920 __CFRunLoopRun + 1360
    4 CoreFoundation 0x1db7350b0 CFRunLoopRunSpecific + 436
    5 AVFAudio 0x1e161d334 GenericRunLoopThread::Entry(void*) + 156
    6 AVFAudio 0x1e1647c60 CAPThread::Entry(CAPThread*) + 88
    7 libsystem_pthread.dylib 0x1db3c82c0 _pthread_body + 128
    8 libsystem_pthread.dylib 0x1db3c8220 _pthread_start + 44
    9 libsystem_pthread.dylib 0x1db3cbcdc thread_start + 4

Crashlytics not be logged on iOS platform

Same issue as reported in #50 which had been closed. Re-opening as this still doesn't work on iOS with the latest version v4.4.0. See my comment #50 (comment)

This has been tested with an AdHoc build of the application running on an iPhone 11 device forcing a crash to occur whilst the app is running. No crash logs have yet been recieved on the Firebase Crashlytics dasboard.

Titanium setup:

Ti SDK:               10.1.1.GA
Alloy:                2.0.1
iOS:                  15.5 - iPhone 11 device
Xcode:                13.4.1
Firebasecore:         7.2.0 
FirebaseAnalytics:    6.2.0
FirebaseCrashlytics:  4.4.0

Cannot build for production

  1. I added Modules to my project
  2. Build for production ...same errors....attached is a picture of the error..and my project.
  3. Triple verified that the API KEY and secret are correct.

Please advise
Screen Shot 2019-04-17 at 9 28 11 PM
Screen Shot 2019-04-17 at 9 28 05 PM

concurrent.TimeoutException issue on sdk 8.0.1+ and crash reporting issue on sdk 9.0.1+

I've faced two types of issues on the 2 different configurations.
for :
titanium sdk 8.0.1+
crashlytics : 1.1.2
firebase core: 5.0.1
TimeoutException happens on android app launching time .

[ERROR] : CrashlyticsCore: Failed to execute task. [ERROR] : CrashlyticsCore: java.util.concurrent.TimeoutException [ERROR] : CrashlyticsCore: at java.util.concurrent.FutureTask.get(FutureTask.java:206) [ERROR] : CrashlyticsCore: at com.crashlytics.android.core.CrashlyticsBackgroundWorker.submitAndWait(CrashlyticsBackgroundWorker.java:41) [ERROR] : CrashlyticsCore: at com.crashlytics.android.core.CrashlyticsController.handleUncaughtException(CrashlyticsController.java:320) [ERROR] : CrashlyticsCore: at com.crashlytics.android.core.CrashlyticsController$6.onUncaughtException(CrashlyticsController.java:300) [ERROR] : CrashlyticsCore: at com.crashlytics.android.core.CrashlyticsUncaughtExceptionHandler.uncaughtException(CrashlyticsUncaughtExceptionHandler.java:42) [ERROR] : CrashlyticsCore: at java.lang.ThreadGroup.uncaughtException(ThreadGroup.java:1068) [ERROR] : CrashlyticsCore: at java.lang.ThreadGroup.uncaughtException(ThreadGroup.java:1063) [ERROR] : CrashlyticsCore: at java.lang.Thread.dispatchUncaughtException(Thread.java:1953)

I changed the configuration to :
titanium SDK: 9.0.1+
crashlytics : 1.1.2
firebase core: 5.0.1

the previous error does not happen anymore. all needed connections with firebase are done properly But just non-fatal errors are reporting to firebase dashboard, Not any crash reporting.

is this library compatible with Ti SDK 8.01+ ? does anybody have an idea, how can I fix this issue?

Not reporting

I've tried everything I could. Also followed the steps as it is mentioned in read me. But it is not reporting to crashlytics. The dashboard on firebase is still showing initial setup page, like it is not configured yet.
I am trying this on iOS.

Screen Shot 2019-08-08 at 2 01 39 PM

For crashing the app, I've written this code on click of a button,
Crashlytics.crash();
This doesn't crash the app immediately and it disconnects the app from Appcelerator studio and logging stops. But after few seconds, app is closed in the simulator. I am not sure if it crashed or something else happened.

Also there are lots of confusion in setting it up like,

  1. What do we set in script-titanium-crashlytics.sh file if we are using firebase. Read me has only specified for fabric.
  2. Will there be any difference in the content of script-titanium-crashlytics.sh file if we place our module in /Library/Application Support/Titanium/modules/iphone?
  3. I am confused if the content in script-titanium-crashlytics.sh file would really start with ../../ or just ../
  4. Read me says that define api key and secret key. But firebase gives us only api key and there is no secret key.

So basically I've tried every combination of settings but none of them worked and I am not sure how to proceed. Could you please help in this matter?

IOS version does not build with sdk 8.0.0.GA

App build fails dumping the following to the build_iphone.log:

[TRACE]    "_gzclose", referenced from:
[TRACE]        -[CLSPackageReportOperation compressData:toPath:] in Crashlytics(CLSPackageReportOperation.o)
[TRACE]        -[ANSCompressLogOperation main] in Crashlytics(ANSCompressLogOperation.o)
[TRACE]    "_gzerror", referenced from:
[TRACE]        ___56-[CLSPackageReportOperation writeBytes:length:toGZFile:]_block_invoke in Crashlytics(CLSPackageReportOperation.o)
[TRACE]    "_inflateEnd", referenced from:
[TRACE]        pushwoosh::unzCloseCurrentFile(void*) in libcom.pushwoosh.module.a(libPushwoosh.a-x86_64-master.o)
[TRACE]    "_gzopen", referenced from:
[TRACE]        -[CLSPackageReportOperation compressData:toPath:] in Crashlytics(CLSPackageReportOperation.o)
[TRACE]        -[ANSCompressLogOperation main] in Crashlytics(ANSCompressLogOperation.o)
[TRACE]    "_gzwrite", referenced from:
[TRACE]        ___56-[CLSPackageReportOperation writeBytes:length:toGZFile:]_block_invoke in Crashlytics(CLSPackageReportOperation.o)
[TRACE]        -[ANSCompressLogOperation main] in Crashlytics(ANSCompressLogOperation.o)
[TRACE]  ld: symbol(s) not found for architecture x86_64

Advertising error 'com.google.android.gms.permission.AD_ID permission' when uploading to playstore.

When you answer this question, make sure to verify if any third-party SDK code in your app uses advertising ID. If so, you must declare that your app uses it. Some SDKs, such as the Google Mobile Ads SDK (Play Services-ads) may already declare the com.google.android.gms.permission.AD_ID permission in the SDKs library manifest. If your app uses these SDKs as dependencies, the com.google.android.gms.permission.AD_ID permission from the SDK's library manifest will be merged with your app's main manifest by default, even if you don't explicitly declare the permission in your app's main manifest.

Getting this after adding ti.crashlytics module. How do I get rid of this message ?

Crashlytics website cant find app

Hi,

I've followed your instructions, but having some issues -- when I run the app, Crashlytics can't find it, and won't add it to the dashboard. This just keeps spinning.

Build and Run APPNAME
"We are looking for your app to confirm that it's activated"
That's not the right app (link)

  • spinning wheel -

Just to make sure I understand the full native process, I've built a native iOS test app, and added Crashlytics via a Pod, and everything works, the test app gets added to my Crashlytics dashboard.

For the installation in my app, per your instructions, I've done the following:

  • built the ios module, v1.1.1, installed in in my app project
  • created the script folder in my project root, added script-titanium-crashlytics.sh
  • in script-titanium-crashlytics.sh, Ive added my ApiKey and Secret, updated with my version number 1.1.1
  • added the Fabric section with the ApiKey to my tiapp.xml

Then in my alloy.js I added the require("ti.crashlytics") (is is necessary to uses es6 import?)

when I build and launch, the spinner on the activation confirmation just keeps spinning.

if I run any of the api methods, ie crash() or throwException(), that works in the app.

I've built a simple test app as well, same output.

any thoughts on what i might be doing wrong?

Appcelerator Package Build Fails

[ERROR] : ** ARCHIVE FAILED **
[ERROR] : The following build commands failed:
[ERROR] : PhaseScriptExecution [Ti]\ Crashlytics /Users/peterladis/Documents/products.nosync/devices.nosync/IOS/build/iphone/build/Intermediates/LilyPad.build/Release-iphoneos/LilyPad.build/Script-000000000000000000000026.sh
[ERROR] : (1 failure)

Any ideas how to fix?

Crashlytics.crash() Method not working

Hi ,
I have using latest version 1.1.1 of crashlytics

when we hit Crashlytics.crash() then we get below error
[ERROR] : TiExceptionHandler: (main) [3363,3363] Crashlytics.crash();
[ERROR] : TiExceptionHandler: ^
[ERROR] : TiExceptionHandler: Error: length=2; index=10
[ERROR] : TiExceptionHandler: at Label.eval (eval at Module._compile (/app.js:728:13), :33:15)
[ERROR] : TiExceptionHandler: at Label.value (ti:/events.js:49:21)
[ERROR] : TiExceptionHandler: at Label.value (ti:/events.js:101:19)
[ERROR] : TiExceptionHandler:
[ERROR] : TiExceptionHandler: com.crashlytics.android.core.CrashTest.indexOutOfBounds(CrashTest.java:30)
[ERROR] : TiExceptionHandler: com.crashlytics.android.core.CrashlyticsCore.crash(CrashlyticsCore.java:622)
[ERROR] : TiExceptionHandler: com.crashlytics.android.Crashlytics.crash(Crashlytics.java:323)
[ERROR] : TiExceptionHandler: ti.crashlytics.TitaniumCrashlyticsModule.crash(TitaniumCrashlyticsModule.java:47)
[ERROR] : TiExceptionHandler: org.appcelerator.kroll.runtime.v8.V8Object.nativeFireEvent(Native Method)
[ERROR] : TiExceptionHandler: org.appcelerator.kroll.runtime.v8.V8Object.fireEvent(V8Object.java:63)
[ERROR] : TiExceptionHandler: org.appcelerator.kroll.KrollProxy.doFireEvent(KrollProxy.java:979)
[ERROR] : TiExceptionHandler: org.appcelerator.kroll.KrollProxy.handleMessage(KrollProxy.java:1208)
[ERROR] : TiExceptionHandler: org.appcelerator.titanium.proxy.TiViewProxy.handleMessage(TiViewProxy.java:401)
[ERROR]: TiExceptionHandler: android.os.Handler.dispatchMessage (Trades.java:98)
[INFO] : DecorView: setWindowBackground mBackgroundPadding = Rect(0, 0 - 0, 0), mFramePadding = Rect(0, 0 - 0, 0), pkg = com.test.test
[ERROR] : V8Exception: Exception occurred at undefined:33: Uncaught Error: length=2; index=10

I don't know why this error is coming or I am doing something wrong Please help me on this.

Android: Crash in new integration

The changes from @petenathan42 were great! But unfortunately, we now see some crashes with the following stack trace. It seems like Intercom also influences this.

java.lang.NullPointerException: 
  at java.util.Objects.requireNonNull (Objects.java:245)
  at java.lang.StackTraceElement.<init> (StackTraceElement.java:71)
  at ti.crashlytics.TitaniumCrashlyticsModule.generateStackTrace (TitaniumCrashlyticsModule.java:69)
  at ti.crashlytics.TitaniumCrashlyticsModule$1.handleException (TitaniumCrashlyticsModule.java:117)
  at org.appcelerator.kroll.KrollRuntime.dispatchException (KrollRuntime.java:541)
  at org.appcelerator.titanium.TiApplication$1.uncaughtException (TiApplication.java:333)
  at io.intercom.android.sdk.errorreporting.IntercomExceptionHandler.uncaughtException (IntercomExceptionHandler.java:37)
  at org.appcelerator.kroll.KrollProxy.handleMessage (KrollProxy.java:1256)
  at android.os.Handler.dispatchMessage (Handler.java:102)
  at android.os.Looper.loop (Looper.java:254)
  at android.app.ActivityThread.main (ActivityThread.java:8199)
  at java.lang.reflect.Method.invoke (Native Method)
  at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:612)
  at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1006)

Resource and asset merger: Duplicate resources

SDK: 12.2.1.GA
module version: 2.5.1. / 2.5.5
project type: Classic Titanium

Any thoughts ?

[INFO] [GRADLE] > Task :app:mergeDebugResources FAILED
[ERROR] [GRADLE] ERROR:[string/com.crashlytics.android.build_id] /Users/me/projects/app2/build/android/app/src/main/res/values/com_crashlytics_build_id.xml [string/com.crashlytics.android.build_id] /Users/me/projects/app2/build/android/app/build/generated/crashlytics/res/debug/values/com_crashlytics_build_id.xml: Resource and asset merger: Duplicate resources
[ERROR] [GRADLE]
[ERROR] [GRADLE] FAILURE: Build failed with an exception.
[ERROR] [GRADLE]
[ERROR] [GRADLE] * What went wrong:
[ERROR] [GRADLE] Execution failed for task ':app:mergeDebugResources'.
[ERROR] [GRADLE] > [string/com.crashlytics.android.build_id] /Users/me/projects/app2/build/android/app/src/main/res/values/com_crashlytics_build_id.xml [string/com.crashlytics.android.build_id] /Users/me/projects/app2/build/android/app/build/generated/crashlytics/res/debug/values/com_crashlytics_build_id.xml: Error: Duplicate resources
[ERROR] [GRADLE]

[GRADLE] Execution failed for task ':app:mergeDebugResources'. by Crashlytics 2.0.0

system info is :
Node.js
Node.js Version = 12.13.0
npm Version = 6.12.0
Titanium CLI
CLI Version = 5.2.2
Titanium SDK
SDK Version = 9.0.3.GA
SDK Path = C:\ProgramData\Titanium\mobilesdk\win32\9.0.3.GA
Target Platform = android

I used crashlytics 2.0.0 but get this error, could you please help to fix that.

ERROR] :  [GRADLE] 
[ERROR] :  [GRADLE] FAILURE: Build failed with an exception.
[ERROR] :  [GRADLE] 
[ERROR] :  [GRADLE] * What went wrong:
[ERROR] :  [GRADLE] Execution failed for task ':app:mergeDebugResources'.
[ERROR] :  [GRADLE] > [string/com.crashlytics.android.build_id] C:\Users\Monir\Documents\Appcelerator_Studio_Workspace\newcrashlytics\build\android\app\src\main\res\values\strings.xml	[string/com.crashlytics.android.build_id] C:\Users\Monir\Documents\Appcelerator_Studio_Workspace\newcrashlytics\build\android\app\build\generated\crashlytics\res\debug\values\com_crashlytics_build_id.xml: Error: Duplicate resources
[ERROR] :  [GRADLE] 
[ERROR] :  [GRADLE] * Try:
[ERROR] :  [GRADLE] Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
[ERROR] :  [GRADLE] 
[ERROR] :  [GRADLE] * Get more help at https://help.gradle.org
[ERROR] :  [GRADLE] 
[ERROR] :  [GRADLE] BUILD FAILED in 4s
[ERROR] :  "gradlew" tool returned exit code: 1

Android sdk 8.0.1.GA not calling onStart

Testing the new SDK the onStart override never gets called. With 8.0.0.GA I can see this log: CrashlyticsCore: Initializing Crashlytics 2.6.3.25

but with 8.0.1.GA It doesn't appears causing the following error:

Error: Must Initialize Fabric before using singleton()

Crashlytics not sending any report.

I followed everything in the readme section. I was able to build and register the app in the crashlytics.

ISSUE:

  • I don't get any log or any report in the crashlytics dashboard for normal crash or crashlytics.crash(), it's just empty with the correct number of devices that has the app installed in it.

I do not get any error during the build, Am I missing something or some issue with the titanium-crashlytics package?

I cannot build my app for production

This is my script

Do not run this file manually! It is referenced from your native Xcode project

"../../modules/iphone/ti.crashlytics/1.2.2/platform/Fabric.framework/uploadDSYM" myapi secret

Is this path correct....my modules are store in the application support folder

iOS installation help

When you say the following:

Create a new folder scripts/ in your project root
Inside scripts/, create a script-titanium-crashlytics.sh with the following contents (replace the version with your version):

With an Alloy project should the scripts folder be inside the app folder? or at the same level as the apps folder?

Cannot build app iOS to production 1.2.2 sdk >= 8.0.0

I'm getting this, anyway to fix it?

[ERROR] ** ARCHIVE FAILED **
[ERROR] The following build commands failed:
[ERROR] PhaseScriptExecution [Ti]\ Crashlytics /Script-000000000000000000000035.sh
[ERROR] (1 failure)

SECRET_KEY

Do not run this file manually! It is referenced from your native Xcode project

"../../modules/iphone/ti.crashlytics/1.2.1/platform/Fabric.framework/uploadDSYM" <YOUR_API_KEY> <YOUR_SECRET_KEY>

I'm using Firebase. Where can I find 'secret_key'?

Cannot get iOS module to work

I've followed the installation instructions but Fabric just shows the spinning icon waiting for my app. I noticed in the logs it says:

[TRACE] : Integrating static framework Fabric into Xcode project.
Not in production, skipping Crashlytics DSYM upload …

Which could be related. Any ideas?

Correct setup for iOS under v2.0.0

Hi there, thanks for your work on this module.
I'm upgrading to version 2.0.0 on iOS, but I'm slightly confused by the Readme, as it says you need to create the script-titanium-crashlytics.sh file. However, this file references platform/Fabric.framework/uploadDSYM which no longer exists in 2.0.0. Is this shell file still needed, or is this only for version <= 2.0.0?
Is there a replacement file that is needed for 2.0.0?
Thanks!

Ti SDK 9.3.2.GA + ti.crashlytics 2.1.0 Android = NullPointerException on start up

Thank you all so much for these modules!

I am working on getting ti.crashlytics 2.1.0 into my Android app. I used the basic require('ti.crashlytics'); in the code and I do see it going to Crashlytics in Firebase, but oddly enough, it immediately fires off a crash of:

Non-fatal Exception: java.lang.Exception

Non-fatal Exception: java.lang.Exception
       at ti.crashlytics.TitaniumCrashlyticsModule.onAppCreate(TitaniumCrashlyticsModule.java:50)

This seems pretty odd since it got to Firebase okay, but then it seems to complain that something in this line is not playing well:

FirebaseCrashlytics.getInstance().recordException(new Exception());

Thanks so much!

How to create a new Fabric app?

I'm new to Crashlytics, but I want to add it to an existing Alloy app, however it does not work. I've followed the directions in the README, using the my organization's keys, but every time I run the app I see this error:

ERROR] CrashlyticsCore: .
[ERROR] CrashlyticsCore: .     |  |
[ERROR] CrashlyticsCore: .     |  |
[ERROR] CrashlyticsCore: .     |  |
[ERROR] CrashlyticsCore: .   \ |  | /
[ERROR] CrashlyticsCore: .    \    /
[ERROR] CrashlyticsCore: .     \  /
[ERROR] CrashlyticsCore: .      \/
[ERROR] CrashlyticsCore: .
[ERROR] CrashlyticsCore: This app relies on Crashlytics. Please sign up for access at https://fabric.io/sign_up,
[ERROR] CrashlyticsCore: install an Android build tool and ask a team member to invite you to this app's organization.
[ERROR] CrashlyticsCore: .
[ERROR] CrashlyticsCore: .      /\
[ERROR] CrashlyticsCore: .     /  \
[ERROR] CrashlyticsCore: .    /    \
[ERROR] CrashlyticsCore: .   / |  | \
[ERROR] CrashlyticsCore: .     |  |
[ERROR] CrashlyticsCore: .     |  |
[ERROR] CrashlyticsCore: .     |  |

The app doesn't crash, however the the app also never shows up in the Fabric dashboard. I've looked at the directions to create a Fabric app and it mentions modifying the Android/iOS projects directly, but this is Titanium where you don't directly create an Android/iOS app, so how am I supposed to create the Fabric app?

[GRADLE] Execution failed for task ':app:mergeDebugResources'. by Crashlytics 2.0.1

Node.js Version = 12.16.2
npm Version = 7.14.0
Titanium CLI
CLI Version = 5.2.2
Titanium SDK
SDK Version = 9.3.2.GA
Target Platform = android

It's still happening in 2.0.1 :/ Any help??

ERROR] [GRADLE] [string/com.crashlytics.android.build_id] /Users/Migue/Documents/NubecitaSVN/supernova-mobile-client/build/android/app/src/main/res/values/crashlytics.xml [string/com.crashlytics.android.build_id] /Users/Migue/Documents/NubecitaSVN/supernova-mobile-client/build/android/app/build/generated/crashlytics/res/debug/values/com_crashlytics_build_id.xml: Resource and asset merger: Duplicate resources [ERROR] [GRADLE] [ERROR] [GRADLE] FAILURE: Build failed with an exception. [ERROR] [GRADLE] [ERROR] [GRADLE] * What went wrong: [ERROR] [GRADLE] Execution failed for task ':app:mergeDebugResources'. [ERROR] [GRADLE] > [string/com.crashlytics.android.build_id] /Users/Migue/Documents/NubecitaSVN/supernova-mobile-client/build/android/app/src/main/res/values/crashlytics.xml [string/com.crashlytics.android.build_id] /Users/Migue/Documents/NubecitaSVN/supernova-mobile-client/build/android/app/build/generated/crashlytics/res/debug/values/com_crashlytics_build_id.xml: Error: Duplicate resources [ERROR] [GRADLE] [ERROR] [GRADLE] * Try: [ERROR] [GRADLE] Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights. [ERROR] [GRADLE] [ERROR] [GRADLE] * Get more help at https://help.gradle.org [ERROR] [GRADLE] [ERROR] [GRADLE] BUILD FAILED in 4s [INFO] [GRADLE] 24 actionable tasks: 24 executed [ERROR] "gradlew" tool returned exit code: 1 Process exited with 1 The terminal process terminated with exit code: 1.

Android: Crash in Crashlytics stack track generation covers real error

We see an error that cannot be tracked because Crashlytics crashes before reporting it, during stack trace generation. A possible "fix" would be a null-check, although it's not clear why it's null here.

AndroidRuntime: FATAL EXCEPTION: main
    Process: com.example.app, PID: 4423
    java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.app/org.appcelerator.titanium.TiActivity}: java.lang.NullPointerException: Declaring class is null
        at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3676)
        at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3813)
        at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:101)
        at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
        at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2308)
        at android.os.Handler.dispatchMessage(Handler.java:106)
        at android.os.Looper.loopOnce(Looper.java:201)
        at android.os.Looper.loop(Looper.java:288)
        at android.app.ActivityThread.main(ActivityThread.java:7898)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:936)
     Caused by: java.lang.NullPointerException: Declaring class is null
        at java.util.Objects.requireNonNull(Objects.java:245)
        at java.lang.StackTraceElement.<init>(StackTraceElement.java:71)
-->  at ti.crashlytics.TitaniumCrashlyticsModule.generateStackTrace(TitaniumCrashlyticsModule.java:98) <--
        at ti.crashlytics.TitaniumCrashlyticsModule$1.handleException(TitaniumCrashlyticsModule.java:158)
        at org.appcelerator.kroll.KrollRuntime.dispatchException(KrollRuntime.java:541)
        at org.appcelerator.titanium.TiApplication$1.uncaughtException(TiApplication.java:366)
        at io.intercom.android.sdk.errorreporting.IntercomExceptionHandler.uncaughtException(IntercomExceptionHandler.java:37)
        at org.appcelerator.titanium.TiBaseActivity.onCreate(TiBaseActivity.java:769)
        at org.appcelerator.titanium.TiActivity.onCreate(TiActivity.java:47)
        at android.app.Activity.performCreate(Activity.java:8290)
        at android.app.Activity.performCreate(Activity.java:8269)
        at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1384)
        at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3657)
        at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3813) 
        at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:101) 
        at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135) 
        at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95) 
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2308) 
        at android.os.Handler.dispatchMessage(Handler.java:106) 
        at android.os.Looper.loopOnce(Looper.java:201) 
        at android.os.Looper.loop(Looper.java:288) 
        at android.app.ActivityThread.main(ActivityThread.java:7898) 
        at java.lang.reflect.Method.invoke(Native Method) 
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548) 
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:936)

Unable to install module for iOS

I'm getting following error on iOS

[ERROR] warning: conditional compilation flags do not have values in Swift; they are either present or absent (rather than 'DEPLOYTYPE=test') [ERROR] warning: conditional compilation flags do not have values in Swift; they are either present or absent (rather than 'TI_LOG_SERVER_PORT=52672') [ERROR] warning: conditional compilation flags do not have values in Swift; they are either present or absent (rather than 'TI_VERSION=12.2.1') [E

using latest release module

Unescaped path in sh script leads to build error

Cannot build iOS app with ti.crashlytics 5.0.0

[TRACE] PhaseScriptExecution Copy\ Resources\ to\ Archive /Users/Sviluppo/Dev\ Workspace/App\ Projects/Emoby/build/iphone/build/Intermediates/emoby.cloud.build/Release-iphoneos/emoby.cloud.build/Script-000000000000000000000001.sh (in target 'emoby.cloud' from project 'emoby.cloud')
[TRACE]     cd /Users/Sviluppo/Dev\ Workspace/App\ Projects/Emoby/build/iphone
[TRACE]     /bin/sh -c /Users/Sviluppo/Dev\\\ Workspace/App\\\ Projects/Emoby/build/iphone/build/Intermediates/emoby.cloud.build/Release-iphoneos/emoby.cloud.build/Script-000000000000000000000001.sh
[TRACE] mkdir: /Users/Sviluppo/Dev: File exists
[TRACE] mkdir: Workspace: No such file or directory
[TRACE] mkdir: Projects/Emoby/build/iphone/DerivedData/Build/Intermediates.noindex/ArchiveIntermediates/emoby.cloud: No such file or directory
[TRACE] Command PhaseScriptExecution failed with a nonzero exit code

Note that Script-000000000000000000000001.sh has a strange content:

  • The first string seems off (look at the closing double quote "$PROJECT_DIR/ArchiveStaging"/)
  • The third string isn't wrapped with double quotes

/bin/cp -rf "$PROJECT_DIR/ArchiveStaging"/ "$TARGET_BUILD_DIR/$PRODUCT_NAME.app/" && /bin/mkdir /Users/Sviluppo/Dev Workspace/App Projects/Emoby/build/iphone/DerivedData/Build/Intermediates.noindex/ArchiveIntermediates/emoby.cloud/BuildProductsPath

 
 
This is the output of ti info
ps. the problem occurs with both xcode 14.2 and 14.3, i'm very confused since a couple days ago i built for ios without problems

Operating System
  Name                        = macOS
  Version                     = 13.2.1
  Architecture                = 64bit
  # CPUs                      = 10
  Memory                      = 16.0GB

Node.js
  Node.js Version             = 16.19.1
  npm Version                 = 8.19.3

Titanium CLI
  CLI Version                 = 6.1.1
  node-appc Version           = 1.1.6

Titanium SDKs
  12.2.0.v20230403081237
    Version                   = 12.2.0
    Install Location          = /Users/Sviluppo/Library/Application Support/Titanium/mobilesdk/osx/12.2.0.v20230403081237
    Platforms                 = iphone, android
    git Hash                  = f06ecdbd32
    git Timestamp             = 4/3/2023 08:14
    node-appc Version         = 1.1.6
  12.2.0.v20230402205250
    Version                   = 12.2.0
    Install Location          = /Users/Sviluppo/Library/Application Support/Titanium/mobilesdk/osx/12.2.0.v20230402205250
    Platforms                 = iphone, android
    git Hash                  = c10e16c7d4
    git Timestamp             = 4/2/2023 20:55
    node-appc Version         = 1.1.6
  12.2.0.v20230331152225
    Version                   = 12.2.0
    Install Location          = /Users/Sviluppo/Library/Application Support/Titanium/mobilesdk/osx/12.2.0.v20230331152225
    Platforms                 = iphone, android
    git Hash                  = 522c7a860d
    git Timestamp             = 3/31/2023 15:23
    node-appc Version         = 1.1.6
  12.0.0.GA
    Version                   = 12.0.0
    Install Location          = /Users/Sviluppo/Library/Application Support/Titanium/mobilesdk/osx/12.0.0.GA
    Platforms                 = iphone, android
    git Hash                  = ed213766f9
    git Timestamp             = 12/30/2022 16:55
    node-appc Version         = 1.1.5
 
Mac OS X
  Command Line Tools          = installed

Intel® Hardware Accelerated Execution Manager (HAXM)
  Not compatible; Intel® CPU required

Java Development Kit
  Version                     = 16.0.2_7-67
  Java Home                   = /Library/Java/JavaVirtualMachines/jdk-16.0.2.jdk/Contents/Home

Xcode
  14.3 (build 14E222a) - Xcode default
    Install Location          = /Applications/Xcode 14.3.app/Contents/Developer
    iOS SDKs                  = 16.4
    iOS Simulators            = 16.2, 16.4
    Watch SDKs                = 9.4
    Watch Simulators          = none
    Supported by TiSDK 12.2.0.v20230402205250 = yes
    EULA Accepted             = yes
    Teams                     = none
  14.2 (build 14C18)
    Install Location          = /Applications/Xcode 14.2.app/Contents/Developer
    iOS SDKs                  = 16.2
    iOS Simulators            = 16.2, 16.4
    Watch SDKs                = 9.1
    Watch Simulators          = none
    Supported by TiSDK 12.2.0.v20230402205250 = yes
    EULA Accepted             = yes
    Teams                     = none

PhaseScriptExecution using titanium crashlytics

Hi,

I am using Using Appcelerator for implementation of Crashlytics.
Current Module version using is 1.2.1

Modules all function working properly. not showing any error in logs.

But unable connect to crashlytic(unable to enable crashlytics)
refer screenshots
Screenshot 2019-03-11 at 3 56 32 PM

I have done all integration as per doc

  1. add script folder - refer attachment
    Screenshot 2019-03-11 at 3 59 13 PM

also I am not able to found secret key in Firebase console anywhere? where it is exactly ?
refer screeshot
Screenshot 2019-03-11 at 4 00 46 PM

  1. added API in ti.xml as per doc

But still unable to eanble crashlytics

Please help me on this. What I am doing wrong?

Android error

I've added the meta tag

I've signed up to Fabric, although Fabric dashboard just keeps redirecting me to the installation instructions.

But I'm getting the following error.

[ERROR] : TiExceptionHandler: (main) [3425,3425] ----- Titanium Javascript Runtime Error -----
[ERROR] : TiExceptionHandler: (main) [0,3425] - In /app.js:91,13
[ERROR] : TiExceptionHandler: (main) [0,3425] - Message: Uncaught Must Initialize Fabric before using singleton()
[ERROR] : TiExceptionHandler: (main) [0,3425] - Source: Crashlytics.crash();
[ERROR] : V8Exception: Exception occurred at /app.js:91: Uncaught Must Initialize Fabric before using singleton()
[ERROR] : V8Exception: Must Initialize Fabric before using singleton()
[ERROR] : CrashlyticsCore: .
[ERROR] : CrashlyticsCore: . | |
[ERROR] : CrashlyticsCore: . | |
[ERROR] : CrashlyticsCore: . | |
[ERROR] : CrashlyticsCore: . \ | | /
[ERROR] : CrashlyticsCore: . \ /
[ERROR] : CrashlyticsCore: . \ /
[ERROR] : CrashlyticsCore: . /
[ERROR] : CrashlyticsCore: .
[ERROR] : CrashlyticsCore: This app relies on Crashlytics. Please sign up for access at https://fabric.io/sign_up,
[ERROR] : CrashlyticsCore: install an Android build tool and ask a team member to invite you to this app's organization.
[ERROR] : CrashlyticsCore: .
[ERROR] : CrashlyticsCore: . /
[ERROR] : CrashlyticsCore: . /
[ERROR] : CrashlyticsCore: . /
[ERROR] : CrashlyticsCore: . / | |
[ERROR] : CrashlyticsCore: . | |
[ERROR] : CrashlyticsCore: . | |
[ERROR] : CrashlyticsCore: .
[ERROR] : TiBaseActivity: (main) [30,3455] Error dispatching lifecycle event: This app relies on Crashlytics. Please sign up for access at https://fabric.io/sign_up,
[ERROR] : TiBaseActivity: install an Android build tool and ask a team member to invite you to this app's organization.
[ERROR] : TiBaseActivity: io.fabric.sdk.android.services.concurrency.UnmetDependencyException: This app relies on Crashlytics. Please sign up for access at https://fabric.io/sign_up,
[ERROR] : TiBaseActivity: install an Android build tool and ask a team member to invite you to this app's organization.
[ERROR] : TiBaseActivity: at com.crashlytics.android.core.CrashlyticsCore.onPreExecute(CrashlyticsCore.java:235)
[ERROR] : TiBaseActivity: at com.crashlytics.android.core.CrashlyticsCore.onPreExecute(CrashlyticsCore.java:209)
[ERROR] : TiBaseActivity: at io.fabric.sdk.android.InitializationTask.onPreExecute(InitializationTask.java:44)
[ERROR] : TiBaseActivity: at io.fabric.sdk.android.services.concurrency.AsyncTask.executeOnExecutor(AsyncTask.java:611)
[ERROR] : TiBaseActivity: at io.fabric.sdk.android.services.concurrency.PriorityAsyncTask.executeOnExecutor(PriorityAsyncTask.java:43)
[ERROR] : TiBaseActivity: at io.fabric.sdk.android.Kit.initialize(Kit.java:69)
[ERROR] : TiBaseActivity: at io.fabric.sdk.android.Fabric.initializeKits(Fabric.java:440)
[ERROR] : TiBaseActivity: at io.fabric.sdk.android.Fabric.init(Fabric.java:384)
[ERROR] : TiBaseActivity: at io.fabric.sdk.android.Fabric.setFabric(Fabric.java:342)
[ERROR] : TiBaseActivity: at io.fabric.sdk.android.Fabric.with(Fabric.java:313)
[ERROR] : TiBaseActivity: at ti.crashlytics.TitaniumCrashlyticsModule.onStart(TitaniumCrashlyticsModule.java:39)
[ERROR] : TiBaseActivity: at org.appcelerator.titanium.TiLifecycle.fireLifecycleEvent(TiLifecycle.java:150)
[ERROR] : TiBaseActivity: at org.appcelerator.titanium.TiBaseActivity.onStart(TiBaseActivity.java:1378)
[ERROR] : TiBaseActivity: at org.appcelerator.titanium.TiLaunchActivity.onStart(TiLaunchActivity.java:411)
[ERROR] : TiBaseActivity: at android.app.Instrumentation.callActivityOnStart(Instrumentation.java:1340)
[ERROR] : TiBaseActivity: at android.app.Activity.performStart(Activity.java:7191)
[ERROR] : TiBaseActivity: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2918)
[ERROR] : TiBaseActivity: at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3030)
[ERROR] : TiBaseActivity: at android.app.ActivityThread.-wrap11(Unknown Source:0)
[ERROR] : TiBaseActivity: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1696)
[ERROR] : TiBaseActivity: at android.os.Handler.dispatchMessage(Handler.java:105)
[ERROR] : TiBaseActivity: at android.os.Looper.loop(Looper.java:164)
[ERROR] : TiBaseActivity: at android.app.ActivityThread.main(ActivityThread.java:6938)
[ERROR] : TiBaseActivity: at java.lang.reflect.Method.invoke(Native Method)
[ERROR] : TiBaseActivity: at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:327)
[ERROR] : TiBaseActivity: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1374)

Android Release 2.0.0 Module not found

I have added, in the tiapp.xml
ti.crashlytics
and
inside

It wont build my app anymore with this error message,
[ERROR] Could not find all required Titanium Modules:
[ERROR] id: ti.crashlytics version: 2.0.0 platform: android deploy-type: test

if I add deploy-type: "development/production", it will build the app but
var crashlytics = require("ti.crashlytics") , it error me module not found again.

Am I missing anything in the setup,

Environment:
Operating System
Name = Mac OS X
Version = 10.15.7
Architecture = 64bit

CPUs = 4

Memory = 17179869184

Node.js
Node.js Version = 10.15.3
npm Version = 6.4.1

Titanium CLI
CLI Version = 5.2.2

Titanium SDK
SDK Version = 8.3.1.GA
Target Platform = android

Fabric shutdown

With the message "Fabric is deprecated and shutting down May 4, 2020" isn't this module obsolete? or do I take it wrong?

iOS build failed with crashlytic module

Hi,

I am using crashlytics Module of version 1.2.1 .
it Build & run in simulator properly
But on firebase Console is showing upload 1 Missing DySM
refer screenshots
Screenshot 2019-03-12 at 3 36 04 PM

When I tried to created adhoc build . during build process it throw below error
[ERROR] : ** ARCHIVE FAILED **
[ERROR] : The following build commands failed:
[ERROR] : PhaseScriptExecution [Ti]\ Crashlytics /Users/admin/Documents/Appcelerator_Studio_Workspace/test/build/iphone/build/Intermediates/test.build/Release-iphoneos/test.build/Script-000000000000000000000032.sh
[ERROR] : (1 failure)

Fabric: Failed to retrieve settings from https://settings.crashlytics.com/spi/v2/platforms/android/apps

Hi,

I have using user module in my appcelerator project. as per documentation I have added io.fabric.ApiKey in metadata . (it is my firebase app's api key).
after running project. I have got below error

[INFO] : FA: Tag Manager is not found and thus will not be used
[INFO] : CrashlyticsCore: Initializing Crashlytics 2.6.3.25
[INFO] : TiRootActivity: (main) [0,0] checkpoint, on root activity resume. activity = com.test.test.TestActivity@7756f13
[INFO] : DpmTcmClient: RegisterTcmMonitor from: com.android.okhttp.TcmIdleTimerMonitor
[INFO] : DecorView: setWindowBackground mBackgroundPadding = Rect(0, 0 - 0, 0), mFramePadding = Rect(0, 0 - 0, 0), pkg = com.test.test
[INFO] : Adreno: QUALCOMM build : 934dff6, Ie4790512f3
[INFO] : Adreno: Build Date : 04/16/18
[INFO] : Adreno: OpenGL ES Shader Compiler Version: XE031.09.00.04
[INFO] : Adreno: Local Branch :
[INFO] : Adreno: Remote Branch : refs/tags/AU_LINUX_ANDROID_LA.UM.5.5.R1.07.01.02.269.051
[INFO] : Adreno: Remote Branch : NONE
[INFO] : Adreno: Reconstruct Branch : NOTHING
[INFO] : OpenGLRenderer: Initialized EGL, version 1.4
[ERROR] : Fabric: Failed to retrieve settings from https://settings.crashlytics.com/spi/v2/platforms/android/apps/com.test.test/settings
[ERROR] : Answers: Failed to retrieve settings

I have tried two option

  1. https://stackoverflow.com/questions/49192218/failed-to-retrieve-settings-from-https-settings-crashlytics-com-spi-v2-platfor

but unble to find " Firebase Console > Project Settings > Account Linking > Fabric " this path in firebase console

2)https://fabric.io/kits/ios/crashlytics

here we unable to add app, as we are using appcelerator, it provide solution to native android/ios

How can we fix above issue, Please help me

Doesn't work on iOS platform

I followed the instructions and only worked on Android but not iOS. It didn't show up in Crashlytics Firebase console. Analytics is showing up.

Below are details of my setup:

Ti SDK:               10.2.0.v20211006024318
Alloy:                1.11.0
iOS:                  15.0 Simulator
Xcode:                13.0
Firebasecore:         7.2.0 
FirebaseAnalytics:    6.2.0
FirebaseCrashlytics:  4.3.0

File locations:

  • rootApp\app\assets\iphone\GoogleService-Info.plist
  • rootApp\scripts\run
  • rootApp\scripts\upload-symbols

alloy.js

var FirebaseCore = require('firebase.core');
var FirebaseAnalytics = require ('firebase.analytics');
 
FirebaseCore.configure();

var Alloy.Globals.Crashlytics = require('ti.crashlytics');

Tab.js

$.tab.addEventListener('open', function() {
         var a = undefined;
         var t = a[1];
 });

Readme file is wrong

It should display:

iOS only: setUserIdentifier(string)
Android only: setUserId(string)

and setUserName and setUserEmail methods don't exist on any platform.

Ti SDK 9.3.2GA + iOS 14 not working

It seems the library is not working (no crashes were reported in FB console) with the below methods.
var Crashlytics = require('ti.crashlytics');
Crashlytics.crash() OR Crashlytics.log('some error')

"script" folder and its contents are already copied (https://github.com/hansemannn/titanium-crashlytics/tree/master/ios/helper )

I have done the steps mentioned in the doc and copied the files into 'script' folder. Is there anything else I should do in this regard ?

Update:
I was tying to take the archive build (iOS 14++) and the build precess in getting terminated due to script fail,
Here is the error message I am getting,

[ERROR] :  ** ARCHIVE FAILED **
[ERROR] :  The following build commands failed:
[ERROR] :  	PhaseScriptExecution [Ti]\ Crashlytics /Users/arunrajsaraswathy/Documents/Appcelerator_Studio_Workspace/<<app name here>>/build/iphone/build/Intermediates/<<app name here>>.build/Release-iphoneos/<<app name here>>.build/Script-000000000000000000000047.sh
[ERROR] :  (1 failure)

Environment:
Ti SDK 9.3.2GA
iOS 14+

Screenshot 2021-05-25 at 12 49 47 PM

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.