2

My Urban Airship pushes are randomly failing on the device. In the case of failure, I can see the underlying GCM message correctly reaching the device over wifi, but that GCM message is being stymied without being forwarded up to the Urban Airship layer (as you can see in the following logs):

GCM           : GCM message com.example.app
GCM/DMM       : broadcast intent callback: result=CANCELLED forIntent { act=com.google.android.c2dm.intent.RECEIVE pkg=com.example.app (has extras) }
BroadcastQueue: Unable to launch app com.example.app/10055 for broadcast Intent { act=com.google.android.c2dm.intent.RECEIVE flg=0x10 pkg=com.example.app (has extras) }: process is bad

Bear in mind, most of my UA pushes (to the same app on the same device) work, so this probably not a typical configuration problem. When my pushes succeed, the log looks like this:

GCM    : GCM message com.example.app
UALib  : PushService startService
UALib  : Received GCM push
UALib  : Incrementing notification id count UALib  : Notification id: 1001
Example: Received intent: Intent { act=com.urbanairship.push.PUSH_RECEIVED flg=0x10 cmp=com.example.app/.ua.UaExtraReceiver (has extras) }
Example: ACTION_PUSH_RECEIVED. alert:i like potatoes, id:1001

Btw, I'm using UrbanAirship 3.2.0 jar on a Kitkat tablet.

Jo Jo
  • 7,245
  • 5
  • 34
  • 49
  • 1
    I don't know the answer, but the `act=` in the error is going to a different value than the `act=` in the good recipient. Is it possible there are 2 intent receivers with one sometimes processing first? That's more brainstorming than anything. –  Jun 20 '14 at 13:02
  • Regarding 'process is bad', see http://stackoverflow.com/questions/3253676/how-to-fix-process-is-bad-error-for-an-android-widget/9320089#9320089 – Jo Jo Jun 24 '14 at 09:20

1 Answers1

1

I had this similar error, and I had to keep my FCM Service exported. add:

android:exported="true"

or remove exported altogether.

My services now looks like this:

    <service
        android:name=".service.MyFirebaseMessagingService"
        android:exported="true"
        >
        <intent-filter>
            <action android:name="com.google.firebase.MESSAGING_EVENT" />
        </intent-filter>
    </service>
    <service
        android:name=".service.MyFirebaseInstanceIdService"
        android:exported="true"
        >
        <intent-filter>
            <action android:name="com.google.firebase.INSTANCE_ID_EVENT" />
        </intent-filter>
    </service>
ViliusK
  • 11,345
  • 4
  • 67
  • 71