[go: nahoru, domu]

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Push is not coming on Release builds after update from 5.15 to 5.16 #2365

Closed
emartinson opened this issue Feb 8, 2019 · 15 comments
Closed

Comments

@emartinson
Copy link
emartinson commented Feb 8, 2019

Environment

  • Xcode version: 10.1
  • Firebase SDK version: 5.16
  • Firebase Component: Core, Messaging
  • Component version: Core 5.16.0, Messaging 3.3.0

Problem

Recently I've updated pods using specs:

  pod 'Firebase/Core', '~> 5.0', :inhibit_warnings => true
  pod 'Firebase/Messaging', '~> 5.0', :inhibit_warnings => true
  pod 'Firebase/DynamicLinks', '~> 5.0', :inhibit_warnings => true
  pod 'Firebase/RemoteConfig', '~> 5.0', :inhibit_warnings => true

which made an upgrade from:

   Firebase/Core (5.15.0) -> 5.16.0
     FirebaseAnalytics (= 5.5.0) -> 5.4.0

   Firebase/Messaging (5.15.0): -> 5.16.0
     FirebaseMessaging (= 3.2.2) -> 3.3.0

   Firebase/DynamicLinks (5.15.0): -> 5.16.0
     FirebaseDynamicLinks (= 3.3.0) -> 3.4.0

   Firebase/CoreOnly (5.15.0): -> 5.16.0
     FirebaseCore (= 5.1.10) -> 5.2.0

 FirebaseInstanceID 3.3.0 -> 3.4.0

The issues is - in DEBUG configuration - I'm receiving Push Notifications. But when exported for Production (AdHoc and AppStore) builds - no Push Notifications.

Steps to reproduce:

  1. Install
pod 'Firebase/Core', '~> 5.16.0', :inhibit_warnings => true
pod 'Firebase/Messaging', '~> 5.16.0', :inhibit_warnings => true
  1. Run App in DEBUG configuration

  2. Send Push notification - Push is delivered to device

  3. Change XCode Scheme settings. For Run :
    4.1 select build configuration = Release (or some which is used for AdHoc distribution)
    4.2 uncheck 'Debug executable' - this is necessary to run release build on device

Alternatively you may distribute AdHoc or AppStore build via any system you use (TestFlight, HockeyApp, AppCenter, Crashlytics).

  1. Send Push notification

Expected - Push is delivered

Actual - Push is not delivered

In console log I see:
5.16.0 - [Firebase/InstanceID][I-IID003009] Failed to fetch default token Error Domain=com.firebase.iid Code=1005 "(null)"

and strange line:
5.16.0 - [Firebase/Core][I-COR000003] The default Firebase app has not yet been configured. Add [FIRApp configure]; (FirebaseApp.configure() in Swift) to your application initialization. Read more: https://goo.gl/ctyzm8.

despite the fact it is configured in:

func application(_ application: UIApplication,
                     didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
    FirebaseApp.configure()
}

Rolling back to 5.15.0 has solved the issue.

@teodorhtec
Copy link
teodorhtec commented Feb 8, 2019

Same. Thanks @emartinson

@kutsin
Copy link
kutsin commented Feb 8, 2019

I faced the same issue I think. Firebase messaging 3.3.0. First install - push is working on iPhone 5s, second launch of the app, push is not working.

@kutsin
Copy link
kutsin commented Feb 8, 2019

This how I was sent by firebase support:

Thanks for reaching out.
I'd first suggest updating to the latest version of the SDKs. Try also sending directly to the device and testing with the quickstart, to see if it's a problem with local to the device. If that doesn't help, check out this blogpost on debugging FCM for iOS, which contains lots of useful information - particularly step #4, sending directly through APNs, as lots of delivery problems on iOS are related to APNs problems.

@ryanwilson
Copy link
Member

Thanks for the report and sorry about the issues. It sounds like another Firebase SDK is attempting to get InstanceID before Core is configured. We'll try to track this down to figure out what happened and get back ASAP. If things are broken in production, it may make sense for you to roll back to 5.15.0 for now until we get this resolved.

@charlotteliang
Copy link
Contributor
charlotteliang commented Feb 8, 2019

@emartinson Thanks for the detailed info. Do you happen to call any Firebase API before [FIRApp configure] call?

@ryanwilson
Copy link
Member

@emartinson just wanted to check - is the version of Firebase Analytics correct from your pasted output?

FirebaseAnalytics (= 5.5.0) -> 5.4.0

The version of Analytics set with Firebase 5.16.0 still 5.5.0

@tipoc123
Copy link

Please fix the issue as soon as possible. I also have troubles with receiving push messages after updating Firebase to the latest version.

@emartinson
Copy link
Author

@emartinson Thanks for the detailed info. Do you happen to call any Firebase API before [FIRApp configure] call?

I suppose not. We found this issue during regress and checked almost all changes since latest release - no calls before [FIRApp configure]

@emartinson
Copy link
Author

@emartinson just wanted to check - is the version of Firebase Analytics correct from your pasted output?

FirebaseAnalytics (= 5.5.0) -> 5.4.0

The version of Analytics set with Firebase 5.16.0 still 5.5.0

Yes. that's correct. That might happen because we used ~> 5.0 for all Firebase pods:

pod 'Firebase/Core', '~> 5.0', :inhibit_warnings => true
pod 'Firebase/Messaging', '~> 5.0', :inhibit_warnings => true
pod 'Firebase/DynamicLinks', '~> 5.0', :inhibit_warnings => true
pod 'Firebase/RemoteConfig', '~> 5.0', :inhibit_warnings => true

I also saw this line during updating cocoapods:

Installing FirebaseInstanceID 3.4.0 (was 3.3.0 ...

@charlotteliang
Copy link
Contributor

@tipoc123 Can you also share the log when you run "pod update"?

@tipoc123
Copy link

Sorry, I've already updated my pods:

host4-100:loyalty_ios pavelsmirnov$ pod update
Update all pods
Updating local specs repositories
  $ /usr/local/bin/git -C /Users/pavelsmirnov/.cocoapods/repos/master fetch origin --progress
  remote: Enumerating objects: 922, done.        
  remote: Counting objects: 100% (922/922), done.        
  remote: Compressing objects: 100% (24/24), done.        
  remote: Total 1986 (delta 900), reused 909 (delta 897), pack-reused 1064        
  Получение объектов: 100% (1986/1986), 217.96 KiB | 1.25 MiB/s, готово.
  Определение изменений: 100% (1342/1342), завершено с 466 локальными объектами.
  Из https://github.com/CocoaPods/Specs
     6676702ebb9..bfc9eb06efb  master     -> origin/master
  $ /usr/local/bin/git -C /Users/pavelsmirnov/.cocoapods/repos/master rev-parse --abbrev-ref HEAD
  master
  $ /usr/local/bin/git -C /Users/pavelsmirnov/.cocoapods/repos/master reset --hard origin/master
  HEAD сейчас на bfc9eb06efb [Add] ChocolatePlatform-SDK-Unity 2.1.2
Analyzing dependencies
Pre-downloading: `PopupDialog` from `https://github.com/Orderella/PopupDialog.git`, tag `0.8.1`
Downloading dependencies
Using BoringSSL-GRPC (0.0.2)
Using Crashlytics (3.10.9)
Using DynamicBlurView (2.0.2)
Using Fabric (1.7.13)
Using Firebase (5.16.0)
Using FirebaseABTesting (2.0.0)
Using FirebaseAnalytics (5.5.0)
Using FirebaseAnalyticsInterop (1.1.0)
Using FirebaseAuth (5.3.0)
Using FirebaseAuthInterop (1.0.0)
Using FirebaseCore (5.2.0)
Using FirebaseFirestore (1.0.0)
Using FirebaseInstanceID (3.4.0)
Using FirebaseMessaging (3.3.0)
Using FirebaseRemoteConfig (3.1.0)
Using FirebaseUI (6.1.0)
Using GTMSessionFetcher (1.2.1)
Using GoogleAppMeasurement (5.5.0)
Using GoogleMaps (3.0.2)
Using GoogleUtilities (5.3.7)
Using InteractiveSideMenu (2.3)
Installing Kingfisher 5.1.1 (was 5.1.0)
Using M13Checkbox (3.3.2)
Using MDFInternationalization (2.0.0)
Using MDFTextAccessibility (2.0.0)
Using MaterialComponents (76.1.2)
Installing PhoneNumberKit 2.6.0 (was 2.5.1)
Installing PopupDialog 0.8.1
Using Protobuf (3.6.1)
Using Realm (3.13.1)
Using RealmSwift (3.13.1)
Using SwiftSVG (2.2.0)
Using gRPC-C++ (0.0.6)
Using gRPC-Core (1.17.0)
Using leveldb-library (1.20)
Using nanopb (0.3.901)
Generating Pods project
Integrating client project
Sending stats
Pod installation complete! There are 21 dependencies from the Podfile and 36 total pods installed.

[!] Automatically assigning platform `ios` with version `11.3` on target `loyalty_ios` because no platform was specified. Please specify a platform for this target in your Podfile. See `https://guides.cocoapods.org/syntax/podfile.html#platform`.

@tipoc123
Copy link

Possibly, my push messages are not working because of other reason. For example, my apple developer account is in process of migration from an individual to an organization. I'm waiting for the end of migration and will check push messages again.

@charlotteliang
Copy link
Contributor

@tipoc123 Yeah if your apple developer account is updated, your APNS token will change and old FCM token will not work. The client will update with the new FCM token that can be used to send notification.

@paulb777 paulb777 added this to the M43 milestone Feb 20, 2019
@ryanwilson
Copy link
Member

This should be addressed in 5.17.0 which was released today. Please re-open if you still have issues.

@gobetti
Copy link
gobetti commented Apr 2, 2019

Hi @ryanwilson , we still have issues even in 5.20.1 and it all started after updating from 5.15 (we did the update in January and that's when we started receiving push notifications not working reports). It seems people have been reporting since 5.16 in another closed issue: #2372. Should we reopen either?
edit: #2438 seems to be the new place 👍

@firebase firebase locked and limited conversation to collaborators Oct 22, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

9 participants