Closed stevenolen closed 9 years ago
This error is the result of dropping in the updated version of Concordia.js. The existing default observer stream_schemas in the database following an older schema syntax which is not compatible with the concordia parser now in use in later commits of 2.16. The fix is a bit awkward, but simple enough. If you are running only the default observers: LogProbe
and Mobility
you need only execute the sql statements below in order to fix. If you have added additional concordia streams or versioned the default streams while adhering to older Concordia schema rules, you will need to revise those stream_schemas as well in order to resolve this issue completely. Please refer to the Concordia definition documentation regarding the small changes made. Please note the where
clause in these statements and adjust accordingly if you've added streams that may have namespace collisions or versioned the default streams.
Here are the sql statements needed in order to fix existing default observer streams in your db:
update observer_stream set stream_schema = '{"type":"object","doc":"Only requires the user\'s mode, which must be "error".","fields":[{"name":"mode","type":"string","doc":"The user\'s mode."}]}' where stream_id like 'error' and version = 2012061300;
update observer_stream set stream_schema = '{"type":"object","doc":"Only requires the user\'s mode.","fields":[{"name":"mode","type":"string","doc":"The user\'s mode."}]}' where stream_id like 'regular' and version = 2012050700;
update observer_stream set stream_schema = '{"type":"object","doc":"Contains the user\'s mode as well as the sensor data.","fields":[{"name":"mode","type":"string","doc":"The user\'s mode."},{"name":"speed","type":"number","doc":"The user\'s speed in the last minute.","optional":true},{"name":"accel_data","type":"array","constType":{"type":"object","doc":"A single accelerometer reading.","fields":[{"name":"x","type":"number","doc":"The x-component of the accelerometer reading."},{"name":"y","type":"number","doc":"The y-component of the accelerometer reading."},{"name":"z","type":"number","doc":"The z-component of the accelerometer reading."}]},"doc":"An array of the accelerometer readings over the last minute."},{"name":"wifi_data","type":"object","doc":"A WiFi reading from the last minute.","fields":[{"name":"time","type":"number","doc":"The time this data was recorded."},{"name":"timezone","type":"string","doc":"The time zone of the device when this data was recorded."},{"name":"scan","type":"array","constType":{"type":"object","doc":"A single access point\'s information.","fields":[{"name":"ssid","type":"string","doc":"The access point\'s SSID."},{"name":"strength","type":"number","doc":"The strength of the signal from the access point."}]},"doc":"The scan of WiFi information."}]}]}' where stream_id like 'extended' and version = 2012050700;
update observer_stream set stream_schema = '{"type":"object","doc":"Service interaction.","fields":[{"name":"service","doc":"The class name of the service.","type":"string"},{"name":"status","doc":"Status information about the service. Either ON or OFF.","type":"string"}]}' where stream_id like 'service' and version = 1;
update observer_stream set stream_schema = '{"type":"object","doc":"Widget interaction.","fields":[{"name":"id","doc":"The id of the view which produced this event.","type":"number"},{"name":"name","doc":"The human readable name of the view which produced this event. Will read the getContentDescription() of the view.","type":"string"},{"name":"extra","doc":"Extra information supplied for this interaction.","optional":true,"type":"string"}]}' where stream_id like 'widget' and version = 1;
update observer_stream set stream_schema = '{"type":"object","doc":"log message.","fields":[{"name":"level","doc":"Log level. One of error, warning, info, debug, or verbose.","type":"string"},{"name":"tag","doc":"Used to identify the source of a log message. It usually identifies the class or activity where the log call occurs.","type":"string"},{"name":"message","doc":"The message you would like logged.","type":"string"}]}' where stream_id like 'log' and version = 1;
update observer_stream set stream_schema = '{"type":"object","doc":"Network information.","fields":[{"name":"context","doc":"Class name of the context which started the call to the network.","type":"string"},{"name":"resource","doc":"Name of the resource requested","type":"string"},{"name":"network_state","doc":"upload or download","type":"string"},{"name":"length","doc":"Number of bytes transmitted","type":"number"}]}' where stream_id like 'network' and version = 1;
update observer_stream set stream_schema = '{"type":"object","doc":"Activity interaction.","fields":[{"name":"activity","doc":"The class name of the activity.","type":"string"},{"name":"status","doc":"Status information about the activity. Either ON or OFF.","type":"string"}]}' where stream_id like 'activity' and version = 1;
update observer_stream set stream_schema = '{"type":"object","doc":"Prompt interaction.","fields":[{"name":"id","doc":"The promptId.","type":"string"},{"name":"type","doc":"The prompt type.","type":"string"},{"name":"status","doc":"Status information about the activity. Either ON or OFF.","type":"string"}]}' where stream_id like 'prompt' and version = 1;
update observer_stream set stream_schema = '{"type":"object","doc":"Trigger interaction.","fields":[{"name":"action","doc":"The action that was currently applied to the trigger. One of delete, add, trigger, update, or ignore.","type":"string"},{"name":"type","doc":"Trigger type.","type":"string"},{"name":"count","doc":"Current number of triggers for this campaign and trigger type set up in the system.","type":"number"},{"name":"campaign","doc":"The campaign urn to which this trigger belongs.","type":"string"}]}' where stream_id like 'trigger' and version = 1;
When updating my existing 2.16 server to the latest 2.16 commit (or any commit after ac38d0d) I am greeted with this server error upon attempted probe upload.