quickstart-ios icon indicating copy to clipboard operation
quickstart-ios copied to clipboard

I ran into a problem with FCM Report 501

Open ZhengXueNing opened this issue 8 years ago • 19 comments

When I started the FCM, I did not encounter any problems. APNS also works. Below is the FCM Log:

4.9.0 - [Firebase/Crash][I-CRA000004] Successfully initialized

4.9.0 - [Firebase/Messaging][I-FCM001000] FIRMessaging Remote Notifi cations proxy enabled, will swizzle remote notification receiver handlers. If you'd prefer to manually integrate Firebase Messaging, add "FirebaseAppDelegateProxyEnabled" to your Info.plist, and set it to NO. Follow the instructions at: https://firebase.google.com/docs/cloud-messaging/ios/client#method_swizzling_in_firebase_messaging to ensure proper integration.

4.9.0 - [Firebase/Analytics][I-ACS023007] Firebase Analytics v.40009000 started

4.9.0 - [Firebase/Analytics][I-ACS023008] To enable debug logging set the following application argument: -FIRAnalyticsDebugEnabled (see http://goo.gl/RfcP7r)

But when I send a message: https://user-images.githubusercontent.com/13215544/36961999-b3bd93c2-2088-11e8-8769-956c6ad8d7ba.png

https://user-images.githubusercontent.com/13215544/36962049-e3d60710-2088-11e8-93e8-f4b70343eb11.png

https://user-images.githubusercontent.com/13215544/36962538-f7787c38-208a-11e8-99ac-0dd6af82e62c.png

Can you help me?

ZhengXueNing avatar Mar 05 '18 08:03 ZhengXueNing

36961999-b3bd93c2-2088-11e8-8769-956c6ad8d7ba 36962049-e3d60710-2088-11e8-93e8-f4b70343eb11 36962538-f7787c38-208a-11e8-99ac-0dd6af82e62c

ZhengXueNing avatar Mar 05 '18 08:03 ZhengXueNing

What are the parameters of the sendMessage method call?

morganchen12 avatar Mar 05 '18 18:03 morganchen12

13fa787c-7d4b-49bc-82b0-a36a24a37a40 These are the above

ZhengXueNing avatar Mar 06 '18 03:03 ZhengXueNing

messageID should be a unique string (you can just use [NSUUID UUID].uuidString). Does this fix the issue?

morganchen12 avatar Mar 06 '18 18:03 morganchen12

No, I've tried it.

ZhengXueNing avatar Mar 07 '18 00:03 ZhengXueNing

Can you add the -FIRDebugEnabled argument to your app on launch and post the logs again? There should be a more complete error message printed to console after the NSError is returned.

morganchen12 avatar Mar 07 '18 02:03 morganchen12

a0c3ed45-1717-4930-b303-93df6b862348 1a5c200f-0a6c-406b-ba20-29db4b71cbc6

ZhengXueNing avatar Mar 07 '18 04:03 ZhengXueNing

This is a different error than last time and is a generic network error that occurs when the Firebase Messaging endpoints are unreachable. Are you using a proxy?

morganchen12 avatar Mar 07 '18 16:03 morganchen12

Firebase SDK version used : 4.9.0

Problem Description:

  1. I started the application, FCM initialization no problem.
  2. In iOS I need to wait a long time to connect socket service. Android phones do not it. We're on the same WiFi.
  3. More than 95% of my FCM socket service will fail to connect.
  4. I use the APNS delivery message, I can always receive.
  5. Most of the messages I send using the sendmessage API get the error "Error =" Error Domain = com.google.fcm Code = 501 ".

ZhengXueNing avatar Mar 09 '18 02:03 ZhengXueNing

What network conditions are your device running on? Are you able to send data messages on Android?

The slow socket/connection failures seems like a bug.

morganchen12 avatar Mar 09 '18 19:03 morganchen12

Android has no problem sending messages, their FCM socket connection is very fast

ZhengXueNing avatar Mar 10 '18 00:03 ZhengXueNing

We are using a WiFi network, but we are in China, so our network access to Google requires a VPN service.

ZhengXueNing avatar Mar 12 '18 00:03 ZhengXueNing

This seems like a bug in Firebase then. I am not sure when the fix will be released.

What purpose are you using FCM data messages for?

morganchen12 avatar Mar 12 '18 17:03 morganchen12

It is used to pass some messages. When the user does not open the push, you can use this to pass the station letter.

ZhengXueNing avatar Mar 13 '18 07:03 ZhengXueNing

@ZhengXueNing Please file a bug at https://firebase.google.com/support/contact/bugs-features/?hl=zh-cn with the logs around the slow socket connection on iOS and any other debugging information.

morganchen12 avatar Mar 13 '18 18:03 morganchen12

I have sent an error report. I have sent details of my side and example projects, but the engineer did not give me the reasons for this problem.

ZhengXueNing avatar Mar 14 '18 00:03 ZhengXueNing

@ZhengXueNing what's the case ID for your support ticket?

morganchen12 avatar Mar 28 '18 20:03 morganchen12

I have the same problem, not working on iOS, just in Android, same Wi-fi and I'm not in China

MontsserratCisne avatar Apr 24 '18 20:04 MontsserratCisne

If your error is a 501 error, please file a support ticket. It's likely a backend bug. Nothing you do on the client should result in a 501 error.

morganchen12 avatar May 02 '18 17:05 morganchen12