question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

google.sent_time expected String but value was a java.lang.Long The default value <null> was returned

See original GitHub issue
10-07 00:58:27.587 13079-13157/com.appname W/Bundle: Key google.sent_time expected String but value was a java.lang.Long.  The default value <null> was returned.
10-07 00:58:27.587 13079-13157/com.appname W/Bundle: Attempt to cast generated internal exception:
   java.lang.ClassCastException: java.lang.Long cannot be cast to java.lang.String
      at android.os.BaseBundle.getString(BaseBundle.java:923)
      at com.google.android.gms.gcm.zza.zzad(Unknown Source)
      at com.google.android.gms.gcm.GcmListenerService.zzo(Unknown Source)
      at com.google.android.gms.gcm.GcmListenerService.zzn(Unknown Source)
      at com.google.android.gms.gcm.GcmListenerService.zzm(Unknown Source)
      at com.google.android.gms.gcm.GcmListenerService.zza(Unknown Source)
      at com.google.android.gms.gcm.GcmListenerService$1.run(Unknown Source)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
        at java.lang.Thread.run(Thread.java:818)

I’m currently experiencing this error when sending a message from FCM, and using this module with the latest version of react-native 0.34.1 and this module at 2.1.1

And in my build.gradle:

    compile project(':react-native-push-notification')
    compile ('com.google.android.gms:play-services-gcm:9.4.0') {
       force = true;
    }
    compile('com.google.firebase:firebase-core:9.4.0')
    compile('com.google.firebase:firebase-messaging:9.4.0')

I see this problem occurring as well in other libs: https://github.com/rpush/rpush/issues/292 such as in rpush as of 2 days ago

The error appears to basically be identical. this is just by using the FCM messaging tool in firebase console, sending some test messages.

I also noticed this also https://github.com/morinel/gcmpush/issues/45 , no sure if there is a relationship, but it appears to be the same type and property.

I also found a thread here, that states the property might be added by google play services https://bugs.chromium.org/p/chromium/issues/detail?id=639313

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:9 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
Gp2mv3commented, Jul 5, 2018

Be careful that there are two package with sensibly the same name…

This one is react-native-push-notification (without S). You are referring to react-native-push-notifications: https://www.npmjs.com/package/react-native-push-notifications I never used this one.

0reactions
Gp2mv3commented, Jul 5, 2018

Yes, react-native-push-notifications seems to be a fork of this repo from a long time ago.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Key google.sent_time expected String but value was a java ...
W/Bundle: Key google.sent_time expected String but value was a java.lang.Long. The default value <null> was returned.
Read more >
Room: Allow set default value for entity fields [64088772]
One idea for supporting DEFAULT is to add a new option to @ColumnInfo. @Entity data class Sample( @PrimaryKey val id: Long,
Read more >
Reactor Netty Reference Guide
Default worker thread count, fallback to available processor * (but with a minimum value of 4) */ public static final String IO_WORKER_COUNT ...
Read more >
java - Convert String to Integer with default value
here is a solution : int tryParseInt(String value) { try { return Integer.parseInt(value); } catch(NumberFormatException nfe) { // Log ...
Read more >
Most elegant way of using Gson + Kotlin with default values ...
What the challenge of using Kotlin and JSON boils down to is: We want to use Kotlin data classes for concise code, non-nullable...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found