BimmerGestalt / AAIdrive

Implementations of some Android Auto features as unofficial IDrive apps
MIT License
541 stars 90 forks source link

App crashes when Maps are activated #479

Closed Nasserish closed 2 years ago

Nasserish commented 2 years ago

Hello,

Thank you for your work on this awesome app! this is the best accessory \ addon I could have in my car. However, I can't seem to enable the Maps options. I have made sure that all the required API services are enabled and the key is placed in the right place, but whenever I connect my phone to the car with the map option enabled the app crashes immediately. I have tried building the app on another phone but the problem still persists. I have also tried building different versions of the app with no luck.

Any help or guidance on how to solve this issue will be much appreciated.

hufman commented 2 years ago

You should check for the crash log in adb logcat. It may be the case that the RHMI resources don't match. AAIdrive requires the resources a specific older version of the Samsung SmartThings app, and perhaps the version you are trying is too new. The log will show the reason for the crash at least.

Nasserish commented 2 years ago

Thank you for your reply. I've tried re-downloading the resources using the links you kindly provided with the same issue.

These are the logs:

2021-12-26 23:48:58.515 5218-5218/? E/USNET: USNET: appName: me.hufman.androidautoidrive 2021-12-26 23:49:03.344 5218-5345/me.hufman.androidautoidrive E/MediaBrowser: Failed binding to service ComponentInfo{com.samsung.android.bixby.agent/com.samsung.android.bixby.agent.mediaagent.streaming.StreamingService} 2021-12-26 23:49:12.652 5218-5599/me.hufman.androidautoidrive E/AndroidRuntime: FATAL EXCEPTION: MapAppService Process: me.hufman.androidautoidrive, PID: 5218 de.bmw.idrive.BMWRemoting$ServiceException: errorId=2; errorMsg=TriggerEvent was not successful. at org.apache.etch.bindings.java.transport.DefaultDeliveryService.endcall(DefaultDeliveryService.java:211) at org.apache.etch.bindings.java.support.RemoteBase._endcall(RemoteBase.java:115) at de.bmw.idrive.RemoteBMWRemotingServer$_Async._end_rhmi_triggerEvent(RemoteBMWRemotingServer.java:2934) at de.bmw.idrive.RemoteBMWRemotingServer.rhmi_triggerEvent(RemoteBMWRemotingServer.java:657) at io.bimmergestalt.idriveconnectkit.rhmi.RHMIApplicationEtch.triggerHMIEvent(RHMIApplication.kt:145) at io.bimmergestalt.idriveconnectkit.rhmi.RHMIApplicationIdempotent.triggerHMIEvent(RHMIApplicationWrappers.kt:40) at io.bimmergestalt.idriveconnectkit.rhmi.RHMIApplicationSynchronized$triggerHMIEvent$1.invoke(RHMIApplicationWrappers.kt:75) at io.bimmergestalt.idriveconnectkit.rhmi.RHMIApplicationSynchronized$triggerHMIEvent$1.invoke(RHMIApplicationWrappers.kt:52) at io.bimmergestalt.idriveconnectkit.rhmi.RHMIApplicationSynchronized.runSynchronized(RHMIApplicationWrappers.kt:62) at io.bimmergestalt.idriveconnectkit.rhmi.RHMIApplicationSynchronized.triggerHMIEvent(RHMIApplicationWrappers.kt:74) at io.bimmergestalt.idriveconnectkit.rhmi.RHMIEvent.triggerEvent(RHMIEvent.kt:42) at me.hufman.androidautoidrive.carapp.FullImageView.initWidgets(FullImageView.kt:67) at me.hufman.androidautoidrive.carapp.maps.MapApp.<init>(MapApp.kt:97) at me.hufman.androidautoidrive.carapp.maps.MapAppService.onCarStart(MapAppService.kt:41) at me.hufman.androidautoidrive.carapp.CarAppService$startThread$1.invoke(CarAppService.kt:99) at me.hufman.androidautoidrive.carapp.CarAppService$startThread$1.invoke(CarAppService.kt:98) at me.hufman.androidautoidrive.CarThread.run(CarThread.kt:26)

hufman commented 2 years ago

Oh very interesting! That is definitely a different error than I expected. Try commenting out this line to get past this crash, which should at least allow the app to start up. This same triggerEvent is used when zooming in and out of the map, but perhaps there's a different behavior for when the app is in the background versus visible on the screen? I'd be interested to hear if the app crashes when you zoom the map with the idrive controller. Do you have ID4? I haven't seen this on my ID5 system.

Nasserish commented 2 years ago

Brilliant! It works now without any issues. I'm able to zoom in and out any problems. I'm using ID6. Thanks

hufman commented 2 years ago

Thank you for reporting this bug and your patience in testing!