Skip to content

Android startTrackerWithId call returns "" from nativeApiProvider.get().exec(bridgeSecret, service, action, callbackId, argsJson) #600

Description

@bigsmity

My app is using plugin version 1.9.1. When running on android device my callbacks from startTrackerWithId are not firing.

While debugging I have found that the following call is never sent.

cordova.js Line: 992

var msgs = nativeApiProvider.get().exec(bridgeSecret, service, action, callbackId, argsJson);
// If argsJson was received by Java as null, try again with the PROMPT bridge mode.
// This happens in rare circumstances, such as when certain Unicode characters are passed over the bridge on a Galaxy S2. See CB-2666.
if (jsToNativeBridgeMode === jsToNativeModes.JS_OBJECT && msgs === '@null arguments.') {
androidExec.setJsToNativeBridgeMode(jsToNativeModes.PROMPT);
androidExec(success, fail, service, action, args);
androidExec.setJsToNativeBridgeMode(jsToNativeModes.JS_OBJECT);
} else if (msgs) {
messagesFromNative.push(msgs);
// Always process async to avoid exceptions messing up stack.
nextTick(processMessages);
}

Values:

this: Object
action: "startTrackerWithId"
args: (2) ['UA-xxxxxxxxx-2', 30]
argsJson: "["UA-xxxxxxxxx-2",30]"
callbackId: "UniversalAnalytics1471147327"
fail: ƒ (e)
i: 2
msgs: ""
service: "UniversalAnalytics"
success: ƒ (n)

When making the initial call to startTrackerWithId, the variable msgs is assigned the value "" and not hitting the following conditional blocks of code.

As this initial call is not functioning, all subsequent calls fail. The subsequent calls do return error messages in the msgs variable when they fail.

Has anyone seen this before?

Thanks,

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions