Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
bigsmity opened this issue Jun 22, 2022 · 0 comments

Comments

@bigsmity
Copy link

bigsmity commented Jun 22, 2022

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,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant