Giter Club home page Giter Club logo

purple-robot's People

Contributors

audaciouscode avatar cbitstech avatar ericcf avatar eschlange avatar estory1 avatar gwensmu avatar sosata avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

purple-robot's Issues

Fix RuntimeException in probes.builtin.ContinuousAccelerometerProbe.formattedBundle, line 75

Version: 10000 | edu.northwestern.cbits.purple_robot_manager

Stacktrace

probes.builtin.ContinuousAccelerometerProbe;formattedBundle;ContinuousAccelerometerProbe.java;75
ProbeViewerActivity;onCreate;ProbeViewerActivity.java;37

Reason

java.lang.RuntimeException: Unable to start activity ComponentInfo{edu.northwestern.cbits.purple_robot_manager/edu.northwestern.cbits.purple_robot_manager.ProbeViewerActivity}: java.lang.NullPointerException

Link to HockeyApp

Fix RuntimeException in probes.funf.WifiProbe.bundleForScanResultArray, line 54

Version: 10000 | edu.northwestern.cbits.purple_robot_manager

Stacktrace

probes.funf.WifiProbe;bundleForScanResultArray;WifiProbe.java;54
probes.funf.WifiProbe;formattedBundle;WifiProbe.java;72
ProbeViewerActivity;onCreate;ProbeViewerActivity.java;37

Reason

java.lang.RuntimeException: Unable to start activity ComponentInfo{edu.northwestern.cbits.purple_robot_manager/edu.northwestern.cbits.purple_robot_manager.ProbeViewerActivity}: java.lang.NullPointerException

Link to HockeyApp

Shared Preferences do not persist ...

Test Setup: Enable all sensors using the preference activity in Purple Robot. Allow the activity to run for some time. Take another look at the preference activity. Some sensors which were enabled prior (particularly Funf based sensors) are no longer enabled.

Expected Results: Chances are Android kills the preference activity after a period of inactivity, to reclaim memory. SharedPreferences should persist between outside of the normal activity lifecycle!

Possibly an issue with the Holo Everwhere framework. Holo Everywhere handles these preferences.

Fix EvaluatorException in probes.features.JavascriptFeature.processData, line 116

Version: 1.0.2 (10002) | edu.northwestern.cbits.purple_robot_manager

Stacktrace

probes.features.JavascriptFeature;processData;JavascriptFeature.java;116
plugins.JavascriptFeaturePlugin;processIntent;JavascriptFeaturePlugin.java;36
plugins.OutputPlugin;process;OutputPlugin.java;154
plugins.OutputPluginManager;onReceive;OutputPluginManager.java;36

Reason

org.mozilla.javascript.EvaluatorException: invalid return (#)

Link to HockeyApp

Additional Network Usage Probe

Useful for debug purposes, a simple addition to the ListView which would show:

  1. The amount of data already transmitted
  2. The amount of data waiting to be transmitted

If we got REAL fancy, we might even work out the hourly transfer rate, and issue an alert if it clearly can't keep up!

Fix RuntimeException in ProbeViewerActivity.screenForBundle, line 364

Version: 10000 | edu.northwestern.cbits.purple_robot_manager

Stacktrace

ProbeViewerActivity;screenForBundle;ProbeViewerActivity.java;364
ProbeViewerActivity;onCreate;ProbeViewerActivity.java;41

Reason

java.lang.RuntimeException: Unable to start activity ComponentInfo{edu.northwestern.cbits.purple_robot_manager/edu.northwestern.cbits.purple_robot_manager.ProbeViewerActivity}: java.lang.NullPointerException

Link to HockeyApp

Unable to start service intent

Test Setup: Enable any of the continuous probes. Go to configuration, then go back to the main screen.

Description: Logs show an occassional "Unable to Start Service Intent" error for the continuous pressure/gyro/acceleration/magnetic field and visible satellite probes.

Extracted Logs:

11-19 14:38:00.804: W/ActivityManager(310): Unable to start service Intent { act=edu.mit.media.funf.probe.Probe.REQUEST cmp=edu.northwestern.cbits.purple_robot_manager/.probes.builtin.ContinuousPressureProbe (has extras) }: not found
11-19 14:38:00.827: W/ActivityManager(310): Unable to start service Intent { act=edu.mit.media.funf.probe.Probe.REQUEST cmp=edu.northwestern.cbits.purple_robot_manager/.probes.builtin.ContinuousGyroscopeProbe (has extras) }: not found
11-19 14:38:00.905: W/ActivityManager(310): Unable to start service Intent { act=edu.mit.media.funf.probe.Probe.REQUEST cmp=edu.northwestern.cbits.purple_robot_manager/.probes.builtin.ContinuousAccelerometerProbe (has extras) }: not found
11-19 14:38:00.976: W/ActivityManager(310): Unable to start service Intent { act=edu.mit.media.funf.probe.Probe.REQUEST cmp=edu.northwestern.cbits.purple_robot_manager/.probes.builtin.VisibleSatelliteProbe (has extras) }: not found
11-19 14:38:00.983: W/ActivityManager(310): Unable to start service Intent { act=edu.mit.media.funf.probe.Probe.REQUEST cmp=edu.northwestern.cbits.purple_robot_manager/.probes.builtin.ContinuousMagneticFieldProbe (has extras) }: not found

Expected Results:
This should never happen! A service should always be found in AndroidManifest.xml!

Sensor teardown not functional

Test Setup: Ensure a number of probes are initially enabled. Currently, on this device these are: Gyro (30Hz), Magnetic Field (1Hz), Visible Satellites (Every 1 minute), Accelerometer (200Hz), and Pressure (5Hz). Uncheck all but 1 of the sensor(s) and return to the main activity. All sensors originally enabled remain enabled, with new data values being displayed in real time.

Expected Results: All but one of the probes should be disabled. They should not appear in ListView, and more importantly should have been unregistered with the Android OS!! The service listening to the sensor events should arguably have been torn down, but clearly this hasn't happened!

Proposed Workaround: Understandably, exiting and relaunching the activity has no effect. Disabled sensors will remain in the ListView and continue to update. Forcing the entire application to close (via Settings => Apps => Running) and relaunching is the only known workaround!

Fix RuntimeException in probes.builtin.ContinuousMagneticFieldProbe.formattedBundle, line 207

Version: 10000 | edu.northwestern.cbits.purple_robot_manager

Stacktrace

probes.builtin.ContinuousMagneticFieldProbe;formattedBundle;ContinuousMagneticFieldProbe.java;207
ProbeViewerActivity;onCreate;ProbeViewerActivity.java;37

Reason

java.lang.RuntimeException: Unable to start activity ComponentInfo{edu.northwestern.cbits.purple_robot_manager/edu.northwestern.cbits.purple_robot_manager.ProbeViewerActivity}: java.lang.NullPointerException

Link to HockeyApp

Fix RuntimeException in probes.builtin.BluetoothDevicesProbe.bundleForDevicesArray, line 385

Version: 10000 | edu.northwestern.cbits.purple_robot_manager

Stacktrace

probes.builtin.BluetoothDevicesProbe;bundleForDevicesArray;BluetoothDevicesProbe.java;385
probes.builtin.BluetoothDevicesProbe;formattedBundle;BluetoothDevicesProbe.java;402
ProbeViewerActivity;onCreate;ProbeViewerActivity.java;37

Reason

java.lang.RuntimeException: Unable to start activity ComponentInfo{edu.northwestern.cbits.purple_robot_manager/edu.northwestern.cbits.purple_robot_manager.ProbeViewerActivity}: java.util.MissingFormatArgumentException: Format specifier: s

Link to HockeyApp

Fix RuntimeException in probes.builtin.WifiAccessPointsProbe$1.onReceive, line 84

Version: 1.0.2 (10002) | edu.northwestern.cbits.purple_robot_manager

Stacktrace

probes.builtin.WifiAccessPointsProbe$1;onReceive;WifiAccessPointsProbe.java;84

Reason

java.lang.RuntimeException: Error receiving broadcast Intent { act=android.net.wifi.SCAN_RESULTS } in edu.northwestern.cbits.purple_robot_manager.probes.builtin.WifiAccessPointsProbe$

Link to HockeyApp

Persistence Period

Purple Robot seems to be saving data to phone storage & uploading every 30s & 5 mins respectively. Consequently, typical file size can be anything from 1kB - 500kB. Would it be better if PR instead done this when a predefined amount of data has been collected? It would make it easier to test!

Funf turns Bluetooth Probe on even when in airplane mode.

Test Setup: Ensure the Bluetooth Probe is enabled in Probe Configuration. Disable Bluetooth from the Android Settings Activity. Relaunch Purple Robot (see "Disable Probes not working" issue) Bluetooth magically turns on without user's consent.

Expected Results: Bluetooth should not have automatically enabled without users consent. This should be quite straightforward to do (I've code somewhere, if you'd like)

Fix RuntimeException in probes.builtin.ContinuousMagneticFieldProbe.formattedBundle, line 201

Version: 10000 | edu.northwestern.cbits.purple_robot_manager

Stacktrace

probes.builtin.ContinuousMagneticFieldProbe;formattedBundle;ContinuousMagneticFieldProbe.java;201
ProbeViewerActivity;onCreate;ProbeViewerActivity.java;37

Reason

java.lang.RuntimeException: Unable to start activity ComponentInfo{edu.northwestern.cbits.purple_robot_manager/edu.northwestern.cbits.purple_robot_manager.ProbeViewerActivity}: java.lang.NullPointerException

Link to HockeyApp

Fix crash in probes.builtin.HardwareInformationProbe.isEnabled, line 89

Version: 10001 | edu.northwestern.cbits.purple_robot_manager

Stacktrace

probes.builtin.HardwareInformationProbe;isEnabled;HardwareInformationProbe.java;89
probes.Probe;nudge;Probe.java;36
probes.ProbeManager;nudgeProbes;ProbeManager.java;75
SettingsActivity;onPreferenceClick;SettingsActivity.java;97

Reason

java.lang.NoSuchFieldError: android.os.Build.SERIAL

Link to HockeyApp

Fix RuntimeException in probes.builtin.ContinuousMagneticFieldProbe.formattedBundle, line 227

Version: 10000 | edu.northwestern.cbits.purple_robot_manager

Stacktrace

probes.builtin.ContinuousMagneticFieldProbe;formattedBundle;ContinuousMagneticFieldProbe.java;227
ProbeViewerActivity;onCreate;ProbeViewerActivity.java;37

Reason

java.lang.RuntimeException: Unable to start activity ComponentInfo{edu.northwestern.cbits.purple_robot_manager/edu.northwestern.cbits.purple_robot_manager.ProbeViewerActivity}: java.lang.NullPointerException

Link to HockeyApp

Disable Probes not working

Test Setup: Uncheck "Enable Probes" checkbox in Probe Configuration, press back button twice to return to main activity. The activity still displays all probes, and seems to continue updating.

Expected Result: The probes should be stopped. An Image should be displayed on the Activity.

Further info: No exception thrown via Logcat. The message 11-19 12:09:06.931: D/HockeyApp(12159): Current handler class = net.hockeyapp.android.internal.ExceptionHandler appears in the logs. Try looking at Hockey App logs!

Fix RuntimeException in probes.builtin.SoftwareInformationProbe.isEnabled, line 111

Version: 10000 | edu.northwestern.cbits.purple_robot_manager

Stacktrace

probes.builtin.SoftwareInformationProbe;isEnabled;SoftwareInformationProbe.java;111
probes.ProbeManager;getDataRequests;ProbeManager.java;87
FunfService;sendProbeRequests;FunfService.java;125
FunfService;ensureServicesAreRunning;FunfService.java;115
FunfService;onCreate;FunfService.java;50

Reason

java.lang.RuntimeException: Unable to create service edu.northwestern.cbits.purple_robot_manager.FunfService: java.lang.NullPointerException

Link to HockeyApp

Fix RuntimeException in probes.builtin.ContinuousAccelerometerProbe.formattedBundle, line 54

Version: 10000 | edu.northwestern.cbits.purple_robot_manager

Stacktrace

probes.builtin.ContinuousAccelerometerProbe;formattedBundle;ContinuousAccelerometerProbe.java;54
ProbeViewerActivity;onCreate;ProbeViewerActivity.java;37

Reason

java.lang.RuntimeException: Unable to start activity ComponentInfo{edu.northwestern.cbits.purple_robot_manager/edu.northwestern.cbits.purple_robot_manager.ProbeViewerActivity}: java.lang.NullPointerException

Link to HockeyApp

Fix RuntimeException in probes.funf.LightProbe.formattedBundle, line 54

Version: 10000 | edu.northwestern.cbits.purple_robot_manager

Stacktrace

probes.funf.LightProbe;formattedBundle;LightProbe.java;54
ProbeViewerActivity;onCreate;ProbeViewerActivity.java;37

Reason

java.lang.RuntimeException: Unable to start activity ComponentInfo{edu.northwestern.cbits.purple_robot_manager/edu.northwestern.cbits.purple_robot_manager.ProbeViewerActivity}: java.lang.NullPointerException

Link to HockeyApp

Purple Robot not launching Funf Probes

Test Setup: Enable all probes in the configuration activity. Force a stop on the Activity (As a precaution for issue #13 -- Disable Probes not working). Relaunch Purple Robot. Only the custom Purple Robot probes launch (there's 5 total). Many of the services do not appear in the Apps => Running activity, with the exception of (FunfService, BatteryProbe, AudioFilesProbe, AndroidInfoProbe). On at least one occasion PR was allowed to run for >12 hours, but did not display any of the other probes in this time. Could be related to issue #16 (Unable to start Service Intent)

Expected Results: The probes should launch automatically, assuming they've been enabled in the config!

Purple Robot Persistence

When the phone is offline, thousands of files can build up. The existing Windows Explorer interface to the device often fails to display the full extent of this problem.

Existing workaround: Using the adb shell, we can login to the Linux filesystem and clear out or move log files in the directory.

Proposed Workaround: Adding a custom probe to Purple Robot, which displays disk usage in the pre-defined PR directory will help testers monitor the folder. When the PR directory folder exceeds a predefined size threshold, old log files could be placed in a separate, permanent directory, or just removed entirely.

Purple Robot Architecture

Out of Memory Exceptions frequently occur caused by the upload class preparing the JSON data, attempting to upload this, and log results. To date, some code modifications have been undertaken to optimize existing code, reduce the memory burden of logging etc.

The heap threshold is about 40MB on Nexus devices. While not preparing or uploading data, PR typically has a baseline 12-13MB heap size.

Proposed Workarounds include:

  1. Removing reliance third party graphical libraries, which permit a common look and feel across numerous versions of Android.
  2. Run the upload service as a standalone process, thereby potentially reducing the baseline heap size substantially.

Visible Satellites JSON Object not parsed correctly in FunfImporter

What we want: We would like to occasionally monitor the number of visible GPS satellites, SNR for these satellites and a timestamp.

What we get: Three separate tables have been setup in Postgres -- VisibleSatelliteProbe, VisibleSatelliteProbe.ArrayValues, VisibleSatelliteProbe.SATELLITES.

Problems:

  1. This is overkill on table creation!
  2. Also, the VisibleSatelliteProbe.SATELLITES table contains a SATELLITES column which itself contains a JSON object. These should instead be parsed down into further columns.

Fix IllegalArgumentException in probes.builtin.WifiAccessPointsProbe.isEnabled, line 155

Version: 10001 | edu.northwestern.cbits.purple_robot_manager

Stacktrace

probes.builtin.WifiAccessPointsProbe;isEnabled;WifiAccessPointsProbe.java;155
probes.Probe;nudge;Probe.java;36
probes.ProbeManager;nudgeProbes;ProbeManager.java;73
ManagerService;onHandleIntent;ManagerService.java;221

Reason

java.lang.IllegalArgumentException: Receiver not registered: edu.northwestern.cbits.purple_robot_manager.probes.builtin.WifiAccessPointsProbe$

Link to HockeyApp

Add Phone in use probe

At the moment, we monitor screen (in)active events. It would also be good to add call in progress events, to provide a more accurate account of when the phone is in use. A use case would be when labeling data, we may want to disqualify data collected while the phone is in use (or vice versa, as the case may be)

Fix IllegalArgumentException in probes.builtin.WifiAccessPointsProbe.isEnabled, line 152

Version: 10001 | edu.northwestern.cbits.purple_robot_manager

Stacktrace

probes.builtin.WifiAccessPointsProbe;isEnabled;WifiAccessPointsProbe.java;152
probes.Probe;nudge;Probe.java;36
probes.ProbeManager;nudgeProbes;ProbeManager.java;73
SettingsActivity;onPreferenceClick;SettingsActivity.java;97

Reason

java.lang.IllegalArgumentException: Receiver not registered: edu.northwestern.cbits.purple_robot_manager.probes.builtin.WifiAccessPointsProbe$

Link to HockeyApp

Fix RuntimeException in probes.builtin.BluetoothDevicesProbe$1.onReceive, line 295

Version: 10001 | edu.northwestern.cbits.purple_robot_manager

Stacktrace

probes.builtin.BluetoothDevicesProbe$1;onReceive;BluetoothDevicesProbe.java;295

Reason

java.lang.RuntimeException: Error receiving broadcast Intent { act=android.bluetooth.adapter.action.DISCOVERY_FINISHED } in edu.northwestern.cbits.purple_robot_manager.probes.builtin.BluetoothDevicesProbe$

Link to HockeyApp

Why are these tables here:

The following tables are blank after ~11 days of logging, so I'm have to ask if they should legitimately exist! Note: this is likely related to issue # 24 (Visible Satellites JSON Object not parsed correctly in FunfImporter)

.ArrayValues
AudioFilesProbe.ArrayValues
BluetoothProbe.ArrayValues
BrowserBookmarksProbe.ArrayValues
BrowserSearchesProbe.ArrayValues
CallLogProbe.ArrayValues
ContactProbe.ArrayValues
HardwareInfoProbe
ImagesProbe.ArrayValues
SMSProbe.ArrayValues
VideosProbe.ArrayValues
VisibleSatelliteProbe.ArrayValues
WifiProbe.ArrayValues

Reset Functionality

Is there a better way to reset Purple Robot to an initial test state, whereby the directory is empty of all log files etc? At the moment, if I want to delete a log file, I have to use DDMS, and delete each one individually, which takes about 2-3s per file, using that protocol. Given that it creates a log file every 30s, it might be a feature worth adding.

Hitting the 'Clear Data' button in Settings-Apps also deletes the config files.

J

Fix crash in JavaScriptEngine.runScript, line 81

Version: 1.0.2 (10002) | edu.northwestern.cbits.purple_robot_manager

Stacktrace

JavaScriptEngine;runScript;JavaScriptEngine.java;81
JavaScriptEngine;runScript;JavaScriptEngine.java;56
triggers.Trigger;execute;Trigger.java;54
triggers.DateTrigger;execute;DateTrigger.java;197
ManagerService;onHandleIntent;ManagerService.java;242

Reason

org.mozilla.javascript.EcmaError: TypeError: Cannot find function loadLibrary in object edu.northwestern.cbits.purple_robot_manager.JavaScriptEngine. (#)

Link to HockeyApp

Disabling Encryption causes JSON exception

Test Setup: Use Purple Robot to log some sensor data, preferably in airplane mode. Encrypted data will be stored on the phone, awaiting upload to the server. Disable data encryption, enable wireless. Causes the following exception:

11-19 13:25:26.843: W/System.err(3450): org.json.JSONException: Value ?D?n%??i?*��?Nr of type java.lang.String cannot be converted to JSONArray
11-19 13:25:26.843: W/System.err(3450): at org.json.JSON.typeMismatch(JSON.java:111)
11-19 13:25:26.843: W/System.err(3450): at org.json.JSONArray.(JSONArray.java:91)
11-19 13:25:26.843: W/System.err(3450): at org.json.JSONArray.(JSONArray.java:103)
11-19 13:25:26.843: W/System.err(3450): at edu.northwestern.cbits.purple_robot_manager.plugins.HttpUploadPlugin$3.run(HttpUploadPlugin.java:467)
11-19 13:25:26.843: W/System.err(3450): at java.lang.Thread.run(Thread.java:856)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.