EddyVerbruggen / nativescript-plugin-firebase

:fire: NativeScript plugin for Firebase
https://firebase.google.com
MIT License
1.01k stars 448 forks source link

Fabric Crashlytics SDK deprecated #1642

Closed felixkrautschuk closed 3 years ago

felixkrautschuk commented 4 years ago

We got an email some weeks ago informing us that the Fabric Crashlytics SDK is deprecated. Full email:

Bildschirmfoto 2020-07-21 um 11 47 11

Android upgrade instructions: https://firebase.google.com/docs/crashlytics/upgrade-sdk?platform=android

iOS upgrade instructions: https://firebase.google.com/docs/crashlytics/upgrade-sdk#objective-c_2

mreall commented 3 years ago

I'm seeing this message on the Firebase site, too. Are there plans to upgrade the plugin?

hrueger commented 3 years ago

I'm getting the following error:

The Android Gradle plugin supports only Crashlytics Gradle plugin version 1.28.0 and higher.
The following dependencies do not satisfy the required version:
root project 'SchoolSquirrel' -> io.fabric.tools:gradle:1.26.1

Could this be related somehow?

EDIT: Fixed by changing nativescript-plugin-firebase@10.5.2 to @nativescript/firebase@rc

lambourn commented 3 years ago

out of interest: where is the code base for @nativescript/firebase@rc? Does not seem to be in this repo, master is still on 10.5.2

jessorlisa commented 3 years ago

Concerning the original topic: Will the plugin be updated to use the new Firebase SDK?

Thanks in advance for a quick update.

vstanyshevskyy commented 3 years ago

Hi, I got the Fabric deprecation reminder today as well. Is there a plan to address this issue? Thanks

kanclalg commented 3 years ago

This affects us too. Maybe @EddyVerbruggen could share some insights/plans on this one?

EddyVerbruggen commented 3 years ago

Of course I also received this notification and numerous questions via mail, twitter, slack, etc. But I’m not done with higher priority stuff yet. Working like crazy to get to this one.

felixkrautschuk commented 3 years ago

@EddyVerbruggen thanks for your feedback. I am really appreciating what you are doing (and of course what you already did) for NativeScript. Your plugins play a very important role for this framework.

000panther commented 3 years ago

@EddyVerbruggen We are currently working on upgrading this on our own fork, android looks fine already - will pull request as soon as iOS is finished too. Currently it seems as if the change size is manageable, not sure if there will be any backwards compatibility issues. https://github.com/apolloai/nativescript-plugin-firebase/tree/feature/firebase-crashlytics-upgrade

felixkrautschuk commented 3 years ago

@000panther sounds great, will that e available for NS 6.x as well?

000panther commented 3 years ago

@000panther sounds great, will that e available for NS 6.x as well?

We are using Nativescript 6 in the Project that needs the crashlytics upgrade - so yes!

kl4n4 commented 3 years ago

We now also updated the iOS dependencies but unfortunately I am having issues getting this TNSCrashlyticsLoggerWrapper framework to build. If anyone has experience with this please let me know. It builds fine for "Generic IOS Devices" but fails for any simulator with the exception: "No such module 'FirebaseCrashlytics'" - just like in this stackoverflow ticket.

I tried cleaning the project, reinstalling the pod dependencies and playing around with the xcode search paths multiple times without any success. So if anyone has an idea or want's to give it a try themselves, take a look here and let us know, thanks.

kanclalg commented 3 years ago

Hi, @kl4n4, that TNSCrashlyticsLoggerWrapper was made by me because there was a problem that you couldn't access macro from nativescript. I believe it can finally be removed as you should be able to access log and logWithFormat functions. See this issue and PR https://github.com/EddyVerbruggen/nativescript-plugin-firebase/issues/1134

kl4n4 commented 3 years ago

That sounds promising - I will give it a try, remove this wrapper and let you know if I run into any issues. Thanks @kanclalg for letting me know.

kl4n4 commented 3 years ago

We created the PR #1699 for this - @felixkrautschuk or anyone interested please give it a try and let us know if you having problems, thanks.

felixkrautschuk commented 3 years ago

Thanks @kl4n4 , I will give it a try tomorrow and post my feedback here afterwards.

felixkrautschuk commented 3 years ago

@kl4n4 I just tried to tested your crashlytics update and it looks good to me.

Unfortunately, I am not able too see the crash logs in the firebase console for my test-app. The configuration seems to be correct as the firebase could establish the communication to the demo app on Android and iOS and I can see 3 devices/emulators in the analytics part of the console but when I simulate the crash on Android, the logs never appear in the firebase console. But I'm pretty sure that's not related to the new plugin code.

kl4n4 commented 3 years ago

thanks for the feedback @felixkrautschuk ! For us it worked but we will look into it and maybe give it a try with a different/new firebase project.

plackowski commented 3 years ago

Hello guys. Any fast workaround for this issue?

000panther commented 3 years ago

@EddyVerbruggen we already implemented a fix and will use it in production for our app. Could you maybe review the changes and publish a new version or publish a test version to npm so testing is easier for others?

1699 we kept it minimal intentionally to avoid any issues with bugs, deprecations etc.

@Arystosedes - if you could check out if this works for your application?

plackowski commented 3 years ago

@000panther Little help? How can I use it locally? (I haven't tested pull requests before ;). I tried with:

But with no success..

acocuzzo commented 3 years ago

@EddyVerbruggen would be great to get at least a test version of this published to npm. Thanks!

EddyVerbruggen commented 3 years ago

Please grab 10.6.0 from npm for NativeScript < 7 compatibility.

I'll soon be creating a new 11.x version for NativeScript 7 compat as well.

Thanks everyone!!

bsansone commented 3 years ago

I just upgraded my app from version 10.3.3 to 10.6 and am getting build errors for iOS, I'm on Nativescript version 6.5.2:

Use of undeclared identifier ‘FIRCrashlytics’
Use of ‘@import’ when modules are disabled

Where the errors are thrown:

//
// Any changes in this file will be removed after you update your platform!
//
#include “TNSExceptionHandler.h”
#include <Foundation/Foundation.h>
#include <JavaScriptCore/JavaScriptCore.h>
#include <NativeScript/NativeScript.h>
#if DEBUG
#include “TNSDebugging.h”
#include “TKLiveSync/include/TKLiveSync.h”
//Crashlytics 1 BEGIN
#else
@import FirebaseCrashlytics;
#endif
//Crashlytics 1 END
//Crashlytics 2 BEGIN
#if DEBUG
#else
static int redirect_cls(const char *prefix, const char *buffer, int size) {
  [[FIRCrashlytics crashlytics] logWithFormat:@“%s: %.*s”, prefix, size, buffer];
  return size;
}
abhayastudios commented 3 years ago

@kl4n4 @000panther @EddyVerbruggen having the same issue as above when building a release version (the debug version compiles successfully): tns build ios --bundle --env.aot --env.uglify --release --forDevice

=== BUILD TARGET nativescript OF PROJECT nativescript WITH CONFIGURATION Release ===
./platforms/ios/internal/main.m:15:1: error: use of '@import' when modules are disabled
@import FirebaseCrashlytics;
^
./platforms/ios/internal/main.m:22:5: error: use of undeclared identifier 'FIRCrashlytics'
  [[FIRCrashlytics crashlytics] logWithFormat:@"%s: %.*s", prefix, size, buffer];
    ^
2 errors generated.
** ARCHIVE FAILED **
abhayastudios commented 3 years ago

There's this post explaining how to enable the modules but also pointing out that doing so might have side effects and it would probably be better to:

enable modules for a specific file which is importing c++ file. Go to build phases -> Compile Sources -> Select the file -> Add compiler flag -fmodules

This seems to be working (is there any risk in doing so?): image

I have no experience with Objective C++ and little with Xcode, but would it be possible to do this as part of the plugin so that it would not be necessary to define this in Xcode?

asharghi commented 3 years ago

Having the same issue.

tns build ios --force --clean --release --env.production --env.uglify

Gives error:

/platforms/ios/internal/main.m:23:5: error: use of undeclared
      identifier 'FIRCrashlytics'
  [[FIRCrashlytics crashlytics] logWithFormat:@"%s: %.*s", prefix, size, buffer];

nativescript-plugin-firebase 10.6.0 and ns 6.5.3

lambourn commented 3 years ago

EDIT: sorry. Indeed, build fails for --release

@bsansone @abhayastudios @asharghi no issues here. I was able to build for iOS with {N} 6.5.3 and nativescript-plugin-firebase 10.6.0.

Just in case: have you updated your local CocoaPods repos?

pod repo update
EddyVerbruggen commented 3 years ago

Please see the first change in this PR: https://github.com/EddyVerbruggen/nativescript-plugin-firebase/pull/1714/files, I guess that's needed for the 10.6 as well.

lambourn commented 3 years ago

@EddyVerbruggen ok, I'll quickly check by patching the installed hook.

lambourn commented 3 years ago

@EddyVerbruggen indeed - adding the change to the hook fixes the iOS --release build issue with {N} 6.5.3 and nativescript-plugin-firebase 10.6.0.

lambourn commented 3 years ago

@EddyVerbruggen how can we now integrate this into the 10.6.x code line? The latest commits to master already set things up for 11.x and {N} 7.x

Could you open up an integration branch based on the 10.6 tag so we can have a final PR which just incorporates Nathan's fix for the installer?

EddyVerbruggen commented 3 years ago

@lambourn Good idea - I've added you as a collaborator to the repo so please go ahead if you have time. I'm currently concerned with Android-related issues in this repo.

lambourn commented 3 years ago

@EddyVerbruggen thx, I created a 10.6 maintence branch added the missing bit and bumped version to 10.6.1.

Could you build & publish the npm module so folks can give it a try?

EddyVerbruggen commented 3 years ago

That's awesome, @lambourn - let me do that later today. First need to sort some other things out.

EddyVerbruggen commented 3 years ago

@lambourn 10.6.1 has been released.

lambourn commented 3 years ago

@EddyVerbruggen Thanks. I can confirm that 10.6.1 works fine with --release

@kl4n4 @000panther Kudos for your work, much appreciated!

asharghi commented 3 years ago

Can confirm too 👍🏼

BJacob7 commented 3 years ago

still stock with the error from crashlytics in firebase site only.

Screen Shot 2020-12-29 at 13 52 12

im on "nativescript-plugin-firebase": "^10.6.3", and "tns-android": { "version": "6.5.3" }, "tns-ios": { "version": "6.5.3" } any advice on how to fix the error from crashlytics?