firebase / firebase-ios-sdk

Firebase SDK for Apple App Development
https://firebase.google.com
Apache License 2.0
5.69k stars 1.48k forks source link

Error Domain=com.google.fcm Code=505 "No APNS token specified before fetching FCM Token" UserInfo={NSLocalizedFailureReason=No APNS token specified before fetching FCM Token #14195

Open jiangzhl opened 1 day ago

jiangzhl commented 1 day ago

Description

We used to run everything normally in ios17.2.1, but this problem will occur when the application is run on a real device with ios18.1.1

Reproducing the issue

This problem will occur when the app is run on a real device running iOS 18.1.1

Firebase SDK Version

11.4

Xcode Version

16.1

Installation Method

Swift Package Manager

Firebase Product(s)

Messaging

Targeted Platforms

iOS

Relevant Log Output

Error Domain=com.google.fcm Code=505 "No APNS token specified before fetching FCM Token" UserInfo={NSLocalizedFailureReason=No APNS token specified before fetching FCM Token}

If using Swift Package Manager, the project's Package.resolved

Expand Package.resolved snippet
```json Replace this line with the contents of your Package.resolved. ```

If using CocoaPods, the project's Podfile.lock

Expand Podfile.lock snippet
```yml Replace this line with the contents of your Podfile.lock! ```
google-oss-bot commented 1 day ago

I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight.

rizafran commented 8 hours ago

Thanks for reporting, @jiangzhl. I wasn't able to reproduce the issue (though I'm using a simulator v18.1). I just want to confirm if the issue is only reproducible specifically on iOS 18.1.1? Is the issue also occur in your simulator?

Additionally, this error seems relevant to https://github.com/firebase/firebase-ios-sdk/issues/10679#issuecomment-1402776795 in which there was a change implemented on v10.4.0 onwards.

jiangzhl commented 7 hours ago

Thanks for reporting, @jiangzhl. I wasn't able to reproduce the issue (though I'm using a simulator v18.1). I just want to confirm if the issue is only reproducible specifically on iOS 18.1.1? Is the issue also occur in your simulator?

Additionally, this error seems relevant to #10679 (comment) in which there was a change implemented on v10.4.0 onwards.

Please do this under the following conditions 1 Xcode 16.1 2 real mobile phone 18.1.1 system, not emulator