StephenBlackWasAlreadyTaken / xDrip-Experimental

Experimental Branches for Collaboration on DexDrip
GNU General Public License v3.0
25 stars 62 forks source link

Need to update mongo drivers to 3.2 #367

Open tzachi-dar opened 8 years ago

tzachi-dar commented 8 years ago

Starting September 27 at 10:00 am PDT / 5:00 pm UTC, we'll be upgrading all free Sandbox plan databases running MongoDB 3.0 to MongoDB 3.2.

As last year, there are no official drivers for android.

mat_fur_92_pub@yahoo.it has promised to create such drivers soon.

More info on http://stackoverflow.com/questions/32529484/mongodb-3-x-driver-android-compatibility

tzachi-dar commented 8 years ago

Based on a version from mat_fur_92_pub@yahoo.it I have crearted a branch that works on the 3.4 snapshot drivers. Started running with it.

Any other brave people are welcomed to start testing.

Real testing however will start once we have a db with 3.2 version. Currently, this is not the case.

Tzachi

JohanDegraeve commented 8 years ago

This would on be for people who use the direct MongoDB upload ? I'm using the Nightscout REST API

tzachi-dar commented 8 years ago

Anyone using the NS API will not be influenced by this. But I guess that one will have to update the NS site itself.

tzachi-dar commented 8 years ago

Tough luck, does not seem to work on android 6.

Just found a strange thing: When running this on a 6.0.1 android device it crashes on start with the following message on logcat:

08-03 14:07:22.269 484 2676 D audio_hw_primary: disable_audio_route: reset and update mixer path: spkr-vi-record 08-03 14:07:22.271 484 2676 I soundtrigger: audio_extn_sound_trigger_update_device_status: device 0x2 of type 0 for Event 0 08-03 14:07:22.436 14308 14308 I art : Rejecting re-init on previously-failed class java.lang.Class<com.mongodb.connection.AsynchronousSocketChannelStream$BaseCompletionHandler> 08-03 14:07:22.436 14308 14308 I art : Rejecting re-init on previously-failed class java.lang.Class<com.mongodb.connection.AsynchronousSocketChannelStream$BaseCompletionHandler> 08-03 14:07:22.437 14308 14308 I art : Rejecting re-init on previously-failed class java.lang.Class<com.mongodb.connection.AsynchronousSocketChannelStream$AsyncWritableByteChannelAdapter$WriteCompletionHandler> 08-03 14:07:22.437 14308 14308 I art : Rejecting re-init on previously-failed class java.lang.Class<com.mongodb.connection.AsynchronousSocketChannelStream$AsyncWritableByteChannelAdapter$WriteCompletionHandler> 08-03 14:07:22.438 14308 14308 I art : Rejecting re-init on previously-failed class java.lang.Class<com.mongodb.connection.AsynchronousSocketChannelStream$BaseCompletionHandler> 08-03 14:07:22.438 14308 14308 D AndroidRuntime: Shutting down VM --------- beginning of crash 08-03 14:07:22.444 14308 14308 E AndroidRuntime: FATAL EXCEPTION: main 08-03 14:07:22.444 14308 14308 E AndroidRuntime: Process: com.eveningoutpost.dexdrip.viewer, PID: 14308 08-03 14:07:22.444 14308 14308 E AndroidRuntime: java.lang.NoClassDefFoundError: com.mongodb.connection.AsynchronousSocketChannelStream$BaseCompletionHandler 08-03 14:07:22.444 14308 14308 E AndroidRuntime: at java.lang.Class.classForName(Native Method) 08-03 14:07:22.444 14308 14308 E AndroidRuntime: at java.lang.Class.forName(Class.java:324) 08-03 14:07:22.444 14308 14308 E AndroidRuntime: at com.activeandroid.ModelInfo.scanForModelClasses(Unknown Source) 08-03 14:07:22.444 14308 14308 E AndroidRuntime: at com.activeandroid.ModelInfo.scanForModel(Unknown Source) 08-03 14:07:22.444 14308 14308 E AndroidRuntime: at com.activeandroid.ModelInfo.(Unknown Source) 08-03 14:07:22.444 14308 14308 E AndroidRuntime: at com.activeandroid.Cache.initialize(Unknown Source) 08-03 14:07:22.444 14308 14308 E AndroidRuntime: at com.activeandroid.ActiveAndroid.initialize(Unknown Source) 08-03 14:07:22.444 14308 14308 E AndroidRuntime: at com.activeandroid.ActiveAndroid.initialize(Unknown Source) 08-03 14:07:22.444 14308 14308 E AndroidRuntime: at com.activeandroid.content.ContentProvider.onCreate(Unknown Source) 08-03 14:07:22.444 14308 14308 E AndroidRuntime: at android.content.ContentProvider.attachInfo(ContentProvider.java:1748) 08-03 14:07:22.444 14308 14308 E AndroidRuntime: at android.content.ContentProvider.attachInfo(ContentProvider.java:1723) 08-03 14:07:22.444 14308 14308 E AndroidRuntime: at android.app.ActivityThread.installProvider(ActivityThread.java:5158) 08-03 14:07:22.444 14308 14308 E AndroidRuntime: at android.app.ActivityThread.installContentProviders(ActivityThread.java:4753) 08-03 14:07:22.444 14308 14308 E AndroidRuntime: at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4693) 08-03 14:07:22.444 14308 14308 E AndroidRuntime: at android.app.ActivityThread.-wrap1(ActivityThread.java) 08-03 14:07:22.444 14308 14308 E AndroidRuntime: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1405) 08-03 14:07:22.444 14308 14308 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:102) 08-03 14:07:22.444 14308 14308 E AndroidRuntime: at android.os.Looper.loop(Looper.java:148) 08-03 14:07:22.444 14308 14308 E AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:5422) 08-03 14:07:22.444 14308 14308 E AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method) 08-03 14:07:22.444 14308 14308 E AndroidRuntime: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726) 08-03 14:07:22.444 14308 14308 E AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616) 08-03 14:07:22.452 874 2842 W ActivityManager: Force finishing activity com.eveningoutpost.dexdrip.viewer/com.eveningoutpost.dexdrip.Home 08-03 14:07:22.506 874 11804 I OpenGLRenderer: Initialized EGL, version 1.4 08-03 14:07:22.955 874 887 W ActivityManager: Activity pause timeout for ActivityRecord{1831caf u0 com.eveningoutpost.dexdrip.viewer/com.eveningoutpost.dexdrip.Home t33 f} 08-03 14:07:22.983 5383 5418 W LocationOracle: No location history returned by ContextManager 08-03 14:07:27.595 14308 14308 I Process : Sending signal. PID: 14308 SIG: 9

Since things are working on 4.4 I believe that I'm not doing directly an AsynchronousSocketChannelStream call.

tzachi-dar commented 8 years ago

Looking at the logs, the problem is on active android, which makes the change even more frightening.

Compiled that from source and also created a fix for the issue. This seems to be working with xdrip, although more testing will be needed.

kimberlieskandis-gpsw commented 7 years ago

@tzachi-dar , have you found a workaround for this problem on Android 6? I am seeing it on Sony SmartWatch 3 running Android 6.0.1 with Wear. I'm using the mongodb 3.4.0 driver from xDrip+.

09-26 10:20:46.012 29473-29473/com.eveningoutpost.dexdrip E/AndroidRuntime: FATAL EXCEPTION: main Process: com.eveningoutpost.dexdrip, PID: 29473 java.lang.NoClassDefFoundError: com.mongodb.connection.AsynchronousSocketChannelStream$BaseCompletionHandler at java.lang.Class.classForName(Native Method) at java.lang.Class.forName(Class.java:324) at com.activeandroid.ModelInfo.scanForModelClasses(Unknown Source) at com.activeandroid.ModelInfo.scanForModel(Unknown Source) at com.activeandroid.ModelInfo.(Unknown Source) at com.activeandroid.Cache.initialize(Unknown Source) at com.activeandroid.ActiveAndroid.initialize(Unknown Source) at com.activeandroid.ActiveAndroid.initialize(Unknown Source) at com.eveningoutpost.dexdrip.Models.Sensor.InitDb(Sensor.java:150) at com.eveningoutpost.dexdrip.ListenerService$DataRequester.(ListenerService.java:92) at com.eveningoutpost.dexdrip.ListenerService.sendData(ListenerService.java:310) at com.eveningoutpost.dexdrip.ListenerService.requestData(ListenerService.java:305) at com.eveningoutpost.dexdrip.ListenerService.onStartCommand(ListenerService.java:354)

tzachi-dar commented 7 years ago

Did you also update the active android jar?

On Mon, Sep 26, 2016 at 5:30 PM, kimberlieskandis-gpsw < notifications@github.com> wrote:

@tzachi-dar https://github.com/tzachi-dar , have you found a workaround for this problem on Android 6? I am seeing it on Sony SmartWatch 3 running Android 6.0.1 with Wear. I'm using the mongodb 3.4.0 driver from xDrip+.

09-26 10:20:46.012 29473-29473/com.eveningoutpost.dexdrip E/AndroidRuntime: FATAL EXCEPTION: main Process: com.eveningoutpost.dexdrip, PID: 29473 java.lang.NoClassDefFoundError: com.mongodb.connection. AsynchronousSocketChannelStream$BaseCompletionHandler at java.lang.Class.classForName(Native Method) at java.lang.Class.forName(Class.java:324) at com.activeandroid.ModelInfo.scanForModelClasses(Unknown Source) at com.activeandroid.ModelInfo.scanForModel(Unknown Source) at com.activeandroid.ModelInfo.(Unknown Source) at com.activeandroid.Cache.initialize(Unknown Source) at com.activeandroid.ActiveAndroid.initialize(Unknown Source) at com.activeandroid.ActiveAndroid.initialize(Unknown Source) at com.eveningoutpost.dexdrip.Models.Sensor.InitDb(Sensor.java:150) at com.eveningoutpost.dexdrip.ListenerService$DataRequester. (ListenerService.java:92) at com.eveningoutpost.dexdrip.ListenerService.sendData( ListenerService.java:310) at com.eveningoutpost.dexdrip.ListenerService.requestData( ListenerService.java:305) at com.eveningoutpost.dexdrip.ListenerService.onStartCommand( ListenerService.java:354)

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/StephenBlackWasAlreadyTaken/xDrip-Experimental/issues/367#issuecomment-249586540, or mute the thread https://github.com/notifications/unsubscribe-auth/AHkw5OUQ5C2V63gtIUWtByQi-a3_3S4Bks5qt9cdgaJpZM4JWQTX .

kimberlieskandis-gpsw commented 7 years ago

Sorry, I only just saw your response:( Yes, that was the problem, I needed to update the ActiveAndroid.jar! Thank you!