Skip to content
This repository has been archived by the owner on Nov 8, 2023. It is now read-only.

_getLocationCallback() from plugin crashes the app #264

Open
deindesignpl opened this issue Jun 12, 2020 · 0 comments
Open

_getLocationCallback() from plugin crashes the app #264

deindesignpl opened this issue Jun 12, 2020 · 0 comments

Comments

@deindesignpl
Copy link

deindesignpl commented Jun 12, 2020

Hi, firstly thanks for great plugin. In works well, but what I noticed is that sometimes _getLocationCallback() crashes NativeScript App.

The error I get is:

NativeScriptException
Calling js method onLocationResult failed
TypeError: Cannot read property 'forEach' of undefined

Here is the stack trace that I managed to log:

com.tns.Runtime in callJSMethodNative
com.tns.Runtime in dispatchCallJSMethodNative at line 1209
com.tns.Runtime in callJSMethodImpl at line 1096
com.tns.Runtime in callJSMethod at line 1083
com.tns.Runtime in callJSMethod at line 1063
com.tns.Runtime in callJSMethod at line 1055
com.tns.gen.com.google.android.gms.location.LocationCallback_vendor_1_498322_ in onLocationResult at line 19
com.google.android.gms.internal.location.zzau in notifyListener at line 4
com.google.android.gms.common.api.internal.ListenerHolder in notifyListenerInternal at line 17
com.google.android.gms.common.api.internal.ListenerHolder$zaa in handleMessage at line 5
android.os.Handler in dispatchMessage at line 106
com.google.android.gms.internal.base.zap in dispatchMessage at line 8
android.os.Looper in loop at line 171
android.app.ActivityThread in main at line 6637
java.lang.reflect.Method in invoke
com.android.internal.os.RuntimeInit$MethodAndArgsCaller in run at line 518
com.android.internal.os.ZygoteInit in main at line 824

After debugging I found out that it might be something with onLocationResults and getLastLocation() call in:

onLocationResult: function (locationResult) {

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

No branches or pull requests

1 participant