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

Crashes when geolocation invoked in release #738

Closed
ArmorDarks opened this issue Aug 15, 2018 · 2 comments
Closed

Crashes when geolocation invoked in release #738

ArmorDarks opened this issue Aug 15, 2018 · 2 comments

Comments

@ArmorDarks
Copy link

ArmorDarks commented Aug 15, 2018

Capacitor version

1.0.0-beta.4

Platform

Android

Issue

When building an application as release and signing it with a certificate, attempts to invoke HTML5 geolocation services results in an application crash.

Note, that I mean exactly HTML5 method, when you do it through navigator.geolocation

Logcat output:

08-15 23:30:55.879 13984-13984/? D/Capacitor: onGeolocationPermissionsShowPrompt: DOING IT HERE FOR ORIGIN: https://localhost:8381/
08-15 23:30:55.881 13984-13984/? W/System.err: java.lang.NullPointerException: Attempt to invoke virtual method 'com.getcapacitor.ak com.getcapacitor.am.c()' on a null object reference
        at com.getcapacitor.h.onGeolocationPermissionsShowPrompt(Unknown Source:39)
        at xf.a(SourceFile:371)
        at org.chromium.android_webview.AwContents.onGeolocationPermissionsShowPrompt(SourceFile:691)
        at org.chromium.base.SystemMessageHandler.nativeDoRunLoopOnce(Native Method)
        at org.chromium.base.SystemMessageHandler.handleMessage(SourceFile:9)
        at android.os.Handler.dispatchMessage(Handler.java:105)
        at android.os.Looper.loop(Looper.java:164)
        at android.app.ActivityThread.main(ActivityThread.java:6944)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:327)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1374)

Issue persists only when built as release, but not when built as debug

@ArmorDarks
Copy link
Author

Same as #739, appears only when minifyEnabled in Gradle set to true

@jcesarmobile
Copy link
Member

jcesarmobile commented Aug 21, 2018

Going to close this one and keep #739 as the problem is minifyEnabled in both cases.
It's probably related to minifyEnabled enabling proguard, which obfuscates the code and that can make the plugin execution code not work.

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

2 participants