Repository navigation
Closed
Description
When location permission enabled and you've included a process in your activity inside the manifest, the application will crash with the following error:
03-20 18:04:14.191 5568-5568/? D/sysproxy: [D:5111] Look up api.mapbox.com.
03-20 18:04:14.191 5568-5568/? D/sysproxy: [D:1cd2] Look up events.mapbox.com.
03-20 18:04:14.247 7383-7383/com.mapbox.mapboxandroiddemo:test D/AndroidRuntime: Shutting down VM
03-20 18:04:14.257 7383-7383/com.mapbox.mapboxandroiddemo:test E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.mapbox.mapboxandroiddemo:test, PID: 7383
java.lang.ClassCastException: android.os.BinderProxy cannot be cast to com.mapzen.android.lost.internal.FusedLocationProviderService$FusedLocationProviderBinder
at com.mapzen.android.lost.internal.FusedLocationProviderApiImpl.onServiceConnected(FusedLocationProviderApiImpl.java:45)
at com.mapzen.android.lost.internal.FusedLocationServiceConnectionManager.onServiceConnected(FusedLocationServiceConnectionManager.java:79)
at com.mapzen.android.lost.internal.FusedLocationProviderApiImpl.onServiceConnected(FusedLocationProviderApiImpl.java:65)
at android.app.LoadedApk$ServiceDispatcher.doConnected(LoadedApk.java:1453)
at android.app.LoadedApk$ServiceDispatcher$RunConnection.run(LoadedApk.java:1481)
at android.os.Handler.handleCallback(Handler.java:751)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6119)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:886)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:776)
03-20 18:04:14.270 1443-1608/system_process W/ActivityManager: Force finishing activity com.mapbox.mapboxandroiddemo/com.mapbox.mapboxandroidweardemo.examples.SimpleMapViewActivity
03-20 18:04:14.276 1443-1608/system_process W/ActivityManager: Force finishing activity com.mapbox.mapboxandroiddemo/com.mapbox.mapboxandroidweardemo.MainActivity
Activity
zugaldia commentedon Mar 22, 2017
Reported upstream: lostzen/lost#173.
Emeritus-DarranKelinske commentedon Mar 27, 2017
this is gnar - any idea on an eta for this?
Emeritus-DarranKelinske commentedon Mar 27, 2017
In an attempt to workaround. How do I disable the location permission?
zugaldia commentedon Mar 28, 2017
@Emeritus-DarranKelinske Looks like this exception cannot be worked around by removing location permissions. The issue happens during manifest merge when the
FusedLocationProviderServicefrom LOST is merged into the app. You might want to look intotools:node="remove"instead.Emeritus-DarranKelinske commentedon Mar 28, 2017
Thank you for the suggestion. I will look into using that. In the meantime I removed all location permissions and that seems to fix it, but it means we are unable to use key features of our application which depend on location. Thank you!
msmollin commentedon Mar 29, 2017
Copying in the question from upstream: is this reproducible on the latest release of LOST- 2.2.0?
zugaldia commentedon Mar 29, 2017
@msmollin Please see lostzen/lost#173 (comment) for details. Bottom line is that we still see the issue after upgrading to LOST 2.2.0.
msmollin commentedon Mar 29, 2017
Neat. Will continue discussion there as we triage.
dazza5000 commentedon Apr 7, 2017
Thank you to everyone who makes these projects possible <3
Emeritus-DarranKelinske commentedon Apr 9, 2017
Can we please revert the implementation of lost to the previous version until this issue is resolved. It is a showstopper for people that need multi-process.
Emeritus-DarranKelinske commentedon Apr 20, 2017
This has been committed to master upstream. lostzen/lost#182
Emeritus-DarranKelinske commentedon Apr 20, 2017
If we can get this into an alpha, I can get it on a device and test it. <3
msmollin commentedon Apr 20, 2017
The work isn't complete in the upstream ticket yet. lostzen/lost#173 (comment)
We're getting there though :)
zugaldia commentedon May 2, 2017
This has now been fixed upstream, I'm adding this ticket to the next milestone as a release blocker hoping that we can include the fix (we're depending on LOST releasing 2.3 on time).
Emeritus-DarranKelinske commentedon May 2, 2017
I'm ready to test this whenever we get an alpha.
Emeritus-DarranKelinske commentedon May 10, 2017
I just updated to the latest snapshot and am still having this issue. Is anyone else? Thank you!
zugaldia commentedon May 10, 2017
@Emeritus-DarranKelinske How're you testing this, using the Test App in this repo? Could you share your full list of dependencies?
Emeritus-DarranKelinske commentedon May 10, 2017
Im testing this in an app that uses one process for a BLE connection and the other process for UI interaction.
DEPENDENCIES:
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'no.nordicsemi.android:dfu:1.2.0'
compile "com.android.support:support-v4:${android_support_library_version}"
compile "com.android.support:support-annotations:${android_support_library_version}"
compile "com.google.android.gms:play-services-location:${google_play_services_client_library_version}"
compile 'com.google.code.gson:gson'
compile 'commons-io:commons-io'
compile 'joda-time:joda-time'
compile 'org.joda:joda-convert:1.8'
compile 'com.sothree.slidinguppanel:library'
compile 'com.parse.bolts:bolts-tasks:1.4.0'
compile 'no.nordicsemi.android.support.v18:scanner:1.0.0'
compile 'com.google.code.gson:gson:2.8.0'
compile 'commons-io:commons-io:2.5'
compile 'joda-time:joda-time:2.9.4'
compile 'com.sothree.slidinguppanel:library:3.3.1'
// Guava upgrade requires SDK >= 24
compile "com.google.guava:guava:20.0"
compile 'com.jakewharton.timber:timber:4.5.1'
// Color picker for collar
compile 'com.thebluealliance:spectrum:0.7.1'
compile 'com.wada811:android-material-design-colors:3.0.0'
compile 'net.grandcentrix.tray:tray:0.11.1'
// androidTestCompile 'com.squareup.assertj:assertj-android:1.1.1'
androidTestCompile 'org.hamcrest:hamcrest-library:1.3'
androidTestCompile 'com.android.support.test.uiautomator:uiautomator-v18:2.1.2'
androidTestCompile "com.android.support:support-annotations:${android_support_library_version}"
androidTestCompile 'org.hamcrest:hamcrest-library'
}
zugaldia commentedon May 10, 2017
@Emeritus-DarranKelinske I see what the issue is. This project's SNAPSHOT (
mapbox-java) has been updated to the latest LOST, but not our Map SDK (yet). We need to merge mapbox/mapbox-gl-native#8872 first.Emeritus-DarranKelinske commentedon May 10, 2017
I got confused. Thank you.
sarahcodes100 commentedon May 11, 2017
Just a heads up- we are targeting a
2.3.0release in the next few days and would love feedback. Please report any issues you have had integrating the2.3.0-SNAPSHOT. Thanks for your patience and help, we're looking forward to getting a new stable version out!zugaldia commentedon May 12, 2017
@sarahlensing Love it, this is much appreciated. To help with testing, we're gonna release
beta.2of our next SDK release today to help everyone test the SNAPSHOT on their own apps mapbox/mapbox-gl-native#8975.zugaldia commentedon May 26, 2017
Fixed via #462.