Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-7959] Android: No such column error when getting events in Ti.Android.Calendar

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2013-06-03T19:47:42.000+0000
Affected Version/sRelease 2.0.0, Release 3.1.1
Fix Version/sRelease 2.0.0, Sprint 2012-06
ComponentsAndroid
Labelsmodule_android, qe-3.1.1, qe-testadded
ReporterEduardo Gomez
AssigneeOpie Cyrus
Created2012-03-12T08:32:39.000+0000
Updated2017-03-16T20:54:47.000+0000

Description

Issue

Error when trying to get the events from a calendar on Galaxy Tab 7+ - android 3.2 on it.

To reproduce

1. Run code below 2. Monitor console output i.e. eGomez-MacBook-Pro:platform-tools egomez$ ./adb -d logcat

Repro sequence

Titanium.UI.setBackgroundColor('#000');

var win = Titanium.UI.createWindow({  
    title:'Calendar',
    backgroundColor:'#fff'
});
win.open();

function showCalendars(calendars) {
    for (var i = 0; i < calendars.length; i++) {
        Ti.API.info(calendars[i].name);
        Ti.API.info(JSON.stringify(calendars[i]));
    }
}

Ti.API.info('ALL CALENDARS:');
showCalendars(Ti.Android.Calendar.allCalendars);
Ti.API.info('SELECTABLE CALENDARS:');
showCalendars(Ti.Android.Calendar.selectableCalendars);

// SHOW ALL EVENTS FOR 2010 FOR ONE CALENDAR
var YEAR = 2012;
var TEST_WITH_THIS_CAL_ID = 1;
var calendar = Ti.Android.Calendar.getCalendarById(TEST_WITH_THIS_CAL_ID);

var events = calendar.getEventsInYear(YEAR);
if (events && events.length) {
    Ti.API.info(events.length + ' event(s) in ' + YEAR);

    for (var i = 0; i < events.length; i++) {
        Ti.API.info(JSON.stringify(events[i]));

    }
} else {
    Ti.API.info('No events');
}



var CALENDAR_TO_USE = 1;
var calendar = Ti.Android.Calendar.getCalendarById(CALENDAR_TO_USE);

// Create the event
var eventBegins = new Date(2012, 03, 26, 12, 0, 0);
var eventEnds = new Date(2012, 03, 26, 14, 0, 0);
var details = {
    title: 'Do some stuff',
    description: "I'm going to do some stuff at this time.",
    begin: eventBegins,
    end: eventEnds
};

var event = calendar.createEvent(details);

// Now add a reminder via e-mail for 10 minutes before the event.
var reminderDetails = {
    minutes: 10,
    method: Ti.Android.Calendar.METHOD_EMAIL
};
event.createReminder(reminderDetails);
    <android xmlns:android="http://schemas.android.com/apk/res/android">
    	   <manifest>
    			<uses-permission android:name="android.permission.READ_CALENDAR"/>
    			<uses-permission android:name="android.permission.WRITE_CALENDAR"/>    			
    		</manifest>
    </android>

LG Ally Android 2.2 device

I/ActivityManager( 1345): Starting activity: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=com.appcelerator.com/.T15422Activity }
I/ActivityManager( 1345): Start proc com.appcelerator.com for activity com.appcelerator.com/.T15422Activity: pid=3555 uid=10071 gids={1015, 3003}
I/TiApplication( 3555): (main) [0,0] checkpoint, app created.
I/TiApplication( 3555): (main) [220,220] Titanium 2.0.0 (2012/02/16 18:01 f0ea3e8)
I/TiApplication( 3555): (main) [549,769] Titanium Javascript runtime: v8
I/TiRootActivity( 3555): (main) [0,0] checkpoint, on root activity create, savedInstanceState: null
E/TiApplication( 3555): (KrollRuntimeThread) [1680,1680] APP PROXY: ti.modules.titanium.app.AppModule@44a607d0
I/TiAPI   ( 3555): ALL CALENDARS:
I/TiAPI   ( 3555): eduardo.www@gmail.com
I/TiAPI   ( 3555): {"hidden":false,"id":"1","selected":true,"name":"eduardo.www@gmail.com"}
I/TiAPI   ( 3555): SELECTABLE CALENDARS:
I/TiAPI   ( 3555): eduardo.www@gmail.com
I/TiAPI   ( 3555): {"hidden":false,"id":"1","selected":true,"name":"eduardo.www@gmail.com"}
I/TiAPI   ( 3555): 2 event(s) in 2012
I/TiAPI   ( 3555): {"hasExtendedProperties":true,"alerts":[],"reminders":[{"id":"1","method":2,"minutes":10}],"allDay":false,"recurrenceRule":null,"description":"I'm going to do some stuff at this time.","id":"1","visibility":0,"recurrenceExceptionRule":null,"lastDate":null,"end":"2012-04-26T20:00:00.000Z","status":0,"title":"Do some stuff","begin":"2012-04-26T18:00:00.000Z","hasAlarm":true,"location":null,"recurrenceDate":null,"recurrenceExceptionDate":null,"extendedProperties":{}}
I/TiAPI   ( 3555): {"hasExtendedProperties":true,"alerts":[],"reminders":[{"id":"2","method":2,"minutes":10}],"allDay":false,"recurrenceRule":null,"description":"I'm going to do some stuff at this time.","id":"2","visibility":0,"recurrenceExceptionRule":null,"lastDate":null,"end":"2012-04-26T20:00:00.000Z","status":0,"title":"Do some stuff","begin":"2012-04-26T18:00:00.000Z","hasAlarm":true,"location":null,"recurrenceDate":null,"recurrenceExceptionDate":null,"extendedProperties":{}}
D/TiEvents( 3555): (KrollRuntimeThread) [624,2304] created event with uri: content://com.android.calendar/events/3
D/TiEvents( 3555): (KrollRuntimeThread) [33,2337] created reminder with uri: content://com.android.calendar/reminders/3, minutes: 10, method: 2, event_id: 3
I/TiRootActivity( 3555): (main) [0,0] checkpoint, on root activity resume. activity = com.appcelerator.com.T15422Activity@449cdf08
I/ActivityManager( 1345): Displayed activity com.appcelerator.com/.T15422Activity: 4798 ms (total 4798 ms)
W/TiAnalyticsSvc( 3555): (Thread-12) [27735,27735] Analytics Service Started
I/TiAnalyticsSvc( 3555): (Thread-12) [45,27780] Network unavailable, can't send analytics
W/TiAnalyticsSvc( 3555): (Thread-12) [0,27780] Stopping Analytics Service

Galaxy Tab 7+ with android 3.2 - from customer

03-09 17:01:42.739: I/SqliteDatabaseCpp(4233): sqlite returned: error code = 1, msg = no such column: Calendars._id, db=/data/data/com.android.providers.calendar/databases/calendar.db
03-09 17:01:42.739: E/DatabaseUtils(4233): Writing exception to parcel
03-09 17:01:42.739: E/DatabaseUtils(4233): android.database.sqlite.SQLiteException: no such column: Calendars._id: , while compiling: SELECT Instances.event_id AS event_id, title, description, eventLocation, begin, end, allDay, hasAlarm, eventStatus, visibility FROM Instances INNER JOIN view_events AS Events ON (Instances.event_id=Events._id) WHERE (begin<=? AND end>=?) AND (Calendars._id=1) ORDER BY startDay ASC, startMinute ASC
03-09 17:01:42.739: E/DatabaseUtils(4233):  at android.database.sqlite.SQLiteCompiledSql.native_compile(Native Method)
03-09 17:01:42.739: E/DatabaseUtils(4233):  at android.database.sqlite.SQLiteCompiledSql.<init>(SQLiteCompiledSql.java:64)
03-09 17:01:42.739: E/DatabaseUtils(4233):  at android.database.sqlite.SQLiteProgram.compileSql(SQLiteProgram.java:146)
03-09 17:01:42.739: E/DatabaseUtils(4233):  at android.database.sqlite.SQLiteProgram.compileAndbindAllArgs(SQLiteProgram.java:367)
03-09 17:01:42.739: E/DatabaseUtils(4233):  at android.database.sqlite.SQLiteProgram.<init>(SQLiteProgram.java:130)
03-09 17:01:42.739: E/DatabaseUtils(4233):  at android.database.sqlite.SQLiteProgram.<init>(SQLiteProgram.java:94)
03-09 17:01:42.739: E/DatabaseUtils(4233):  at android.database.sqlite.SQLiteQuery.<init>(SQLiteQuery.java:46)
03-09 17:01:42.739: E/DatabaseUtils(4233):  at android.database.sqlite.SQLiteDirectCursorDriver.query(SQLiteDirectCursorDriver.java:47)
03-09 17:01:42.739: E/DatabaseUtils(4233):  at android.database.sqlite.SQLiteDatabase.rawQueryWithFactory(SQLiteDatabase.java:1539)
03-09 17:01:42.739: E/DatabaseUtils(4233):  at android.database.sqlite.SQLiteQueryBuilder.query(SQLiteQueryBuilder.java:330)
03-09 17:01:42.739: E/DatabaseUtils(4233):  at android.database.sqlite.SQLiteQueryBuilder.query(SQLiteQueryBuilder.java:280)
03-09 17:01:42.739: E/DatabaseUtils(4233):  at com.android.providers.calendar.CalendarProvider2.handleInstanceQuery(CalendarProvider2.java:1237)
03-09 17:01:42.739: E/DatabaseUtils(4233):  at com.android.providers.calendar.CalendarProvider2.query(CalendarProvider2.java:982)
03-09 17:01:42.739: E/DatabaseUtils(4233):  at android.content.ContentProvider$Transport.bulkQuery(ContentProvider.java:179)
03-09 17:01:42.739: E/DatabaseUtils(4233):  at android.content.ContentProviderNative.onTransact(ContentProviderNative.java:111)
03-09 17:01:42.739: E/DatabaseUtils(4233):  at android.os.Binder.execTransact(Binder.java:339)
03-09 17:01:42.739: E/DatabaseUtils(4233):  at dalvik.system.NativeStart.run(Native Method)
03-09 17:01:42.809: E/TiJSError(8945): (main) [187,477] ----- Titanium Javascript Runtime Error -----
03-09 17:01:42.809: E/TiJSError(8945): (main) [0,477] - In app.js:53,23
03-09 17:01:42.809: E/TiJSError(8945): (main) [0,477] - Message: Uncaught Error: no such column: Calendars._id: , while compiling: SELECT Instances.event_id AS event_id, title, description, eventLocation, begin, end, allDay, hasAlarm, eventStatus, visibility FROM Instances INNER JOIN view_events AS Events ON (Instances.event_id=Events._id) WHERE (begin<=? AND end>=?) AND (Calendars._id=1) ORDER BY startDay ASC, startMinute ASC
03-09 17:01:42.809: E/TiJSError(8945): (main) [1,478] - Source: var events = calendar.getEventsInYear(YEAR);

Attachments

FileDateSize
Timob_7959_exception.txt2013-06-03T11:00:48.000+00006611

Comments

  1. Dan Tamas 2012-03-12

    I can help with my galaxy tab 7+ for testing if needed. Thank you.
  2. Eduardo Gomez 2012-03-12

    Tested on

    2.0.0.v20120312104735
       03-12 11:18:43.680: D/dalvikvm(20266): Added shared lib /data/data/com.appcelerator.tabletTest/lib/libkroll-v8.so 0x40696648
       03-12 11:18:43.690: I/TiRootActivity(20266): (main) [0,0] checkpoint, on root activity create, savedInstanceState: null
       03-12 11:18:43.720: D/dalvikvm(20266): GC_CONCURRENT freed 291K, 7% free 6355K/6791K, paused 3ms+3ms
       03-12 11:18:43.780: I/SurfaceFlinger(237): id=770 Removed com.android.launcher/com.android.launcher2.Launcher idx=2 Map Size=3
       03-12 11:18:43.790: I/SurfaceFlinger(237): id=770 Removed com.android.launcher/com.android.launcher2.Launcher idx=-2 Map Size=3
       03-12 11:18:44.030: E/TiApplication(20266): (KrollRuntimeThread) [338,338] APP PROXY: ti.modules.titanium.app.AppModule@406f7970
       03-12 11:18:44.140: I/TiAPI(20266): ALL CALENDARS:
       03-12 11:18:44.150: I/TiAPI(20266): My calendar
       03-12 11:18:44.160: I/TiAPI(20266): {"hidden":false,"id":"1","selected":true,"name":"My calendar"}
       03-12 11:18:44.160: I/TiAPI(20266): appceleratorps@gmail.com
       03-12 11:18:44.160: I/TiAPI(20266): {"hidden":false,"id":"2","selected":true,"name":"appceleratorps@gmail.com"}
       03-12 11:18:44.160: I/TiAPI(20266): SELECTABLE CALENDARS:
       03-12 11:18:44.160: I/TiAPI(20266): My calendar
       03-12 11:18:44.160: I/TiAPI(20266): {"hidden":false,"id":"1","selected":true,"name":"My calendar"}
       03-12 11:18:44.160: I/TiAPI(20266): appceleratorps@gmail.com
       03-12 11:18:44.170: I/TiAPI(20266): {"hidden":false,"id":"2","selected":true,"name":"appceleratorps@gmail.com"}
       03-12 11:18:44.170: I/SqliteDatabaseCpp(1768): sqlite returned: error code = 1, msg = no such column: Calendars._id, db=/data/data/com.android.providers.calendar/databases/calendar.db
       03-12 11:18:44.180: E/DatabaseUtils(1768): Writing exception to parcel
       03-12 11:18:44.180: E/DatabaseUtils(1768): android.database.sqlite.SQLiteException: no such column: Calendars._id: , while compiling: SELECT Instances.event_id AS event_id, title, description, eventLocation, begin, end, allDay, hasAlarm, eventStatus, visibility FROM Instances INNER JOIN view_events AS Events ON (Instances.event_id=Events._id) WHERE (begin<=? AND end>=?) AND (Calendars._id=1) ORDER BY startDay ASC, startMinute ASC
       03-12 11:18:44.180: E/DatabaseUtils(1768): 	at android.database.sqlite.SQLiteCompiledSql.native_compile(Native Method)
       03-12 11:18:44.180: E/DatabaseUtils(1768): 	at android.database.sqlite.SQLiteCompiledSql.<init>(SQLiteCompiledSql.java:64)
       03-12 11:18:44.180: E/DatabaseUtils(1768): 	at android.database.sqlite.SQLiteProgram.compileSql(SQLiteProgram.java:146)
       03-12 11:18:44.180: E/DatabaseUtils(1768): 	at android.database.sqlite.SQLiteProgram.compileAndbindAllArgs(SQLiteProgram.java:367)
       03-12 11:18:44.180: E/DatabaseUtils(1768): 	at android.database.sqlite.SQLiteProgram.<init>(SQLiteProgram.java:130)
       03-12 11:18:44.180: E/DatabaseUtils(1768): 	at android.database.sqlite.SQLiteProgram.<init>(SQLiteProgram.java:94)
       03-12 11:18:44.180: E/DatabaseUtils(1768): 	at android.database.sqlite.SQLiteQuery.<init>(SQLiteQuery.java:46)
       03-12 11:18:44.180: E/DatabaseUtils(1768): 	at android.database.sqlite.SQLiteDirectCursorDriver.query(SQLiteDirectCursorDriver.java:47)
       03-12 11:18:44.180: E/DatabaseUtils(1768): 	at android.database.sqlite.SQLiteDatabase.rawQueryWithFactory(SQLiteDatabase.java:1539)
       03-12 11:18:44.180: E/DatabaseUtils(1768): 	at android.database.sqlite.SQLiteQueryBuilder.query(SQLiteQueryBuilder.java:330)
       03-12 11:18:44.180: E/DatabaseUtils(1768): 	at android.database.sqlite.SQLiteQueryBuilder.query(SQLiteQueryBuilder.java:280)
       03-12 11:18:44.180: E/DatabaseUtils(1768): 	at com.android.providers.calendar.CalendarProvider2.handleInstanceQuery(CalendarProvider2.java:1235)
       03-12 11:18:44.180: E/DatabaseUtils(1768): 	at com.android.providers.calendar.CalendarProvider2.query(CalendarProvider2.java:980)
       03-12 11:18:44.180: E/DatabaseUtils(1768): 	at android.content.ContentProvider$Transport.bulkQuery(ContentProvider.java:179)
       03-12 11:18:44.180: E/DatabaseUtils(1768): 	at android.content.ContentProviderNative.onTransact(ContentProviderNative.java:111)
       03-12 11:18:44.180: E/DatabaseUtils(1768): 	at android.os.Binder.execTransact(Binder.java:339)
       03-12 11:18:44.180: E/DatabaseUtils(1768): 	at dalvik.system.NativeStart.run(Native Method)
       03-12 11:18:44.240: E/TiJSError(20266): (main) [213,551] ----- Titanium Javascript Runtime Error -----
       03-12 11:18:44.240: E/TiJSError(20266): (main) [0,551] - In app.js:35,23
       03-12 11:18:44.240: E/TiJSError(20266): (main) [0,551] - Message: Uncaught Error: no such column: Calendars._id: , while compiling: SELECT Instances.event_id AS event_id, title, description, eventLocation, begin, end, allDay, hasAlarm, eventStatus, visibility FROM Instances INNER JOIN view_events AS Events ON (Instances.event_id=Events._id) WHERE (begin<=? AND end>=?) AND (Calendars._id=1) ORDER BY startDay ASC, startMinute ASC
       03-12 11:18:44.240: E/TiJSError(20266): (main) [0,551] - Source: var events = calendar.getEventsInYear(YEAR);
       03-12 11:18:44.270: D/dalvikvm(20266): GC_FOR_ALLOC freed 149K, 6% free 6483K/6855K, paused 23ms
       03-12 11:18:44.270: I/dalvikvm-heap(20266): Grow heap (frag case) to 6.930MB for 513744-byte allocation
       03-12 11:18:44.310: D/dalvikvm(20266): GC_FOR_ALLOC freed <1K, 6% free 6984K/7367K, paused 21ms
       03-12 11:18:44.330: W/CursorWrapperInner(20266): Cursor finalized without prior close()
       03-12 11:18:44.330: D/WindowManager(305): addWindowToListInOrder() : current mSkipWidgetFocus='true'
       03-12 11:18:44.340: E/V8Exception(20266): Exception occurred at app.js:35: Uncaught Error: no such column: Calendars._id: , while compiling: SELECT Instances.event_id AS event_id, title, description, eventLocation, begin, end, allDay, hasAlarm, eventStatus, visibility FROM Instances INNER JOIN view_events AS Events ON (Instances.event_id=Events._id) WHERE (begin<=? AND end>=?) AND (Calendars._id=1) ORDER BY startDay ASC, startMinute ASC
       03-12 11:18:44.350: W/CursorWrapperInner(20266): Cursor finalized without prior close()
       03-12 11:18:44.350: D/dalvikvm(20266): GC_CONCURRENT freed 3K, 6% free 7081K/7495K, paused 2ms+3ms
       03-12 11:18:44.350: W/CursorWrapperInner(20266): Cursor finalized without prior close()
       03-12 11:18:44.380: D/dalvikvm(20266): GC_FOR_ALLOC freed 14K, 6% free 7094K/7495K, paused 21ms
       03-12 11:18:44.380: I/dalvikvm-heap(20266): Grow heap (frag case) to 7.623MB for 614416-byte allocation
       03-12 11:18:44.420: D/dalvikvm(20266): GC_CONCURRENT freed 0K, 6% free 7694K/8135K, paused 1ms+2ms
       03-12 11:18:44.420: I/TiRootActivity(20266): (main) [0,0] checkpoint, on root activity resume. activity = com.appcelerator.tabletTest.TablettestActivity@40701bf0
       03-12 11:18:44.430: D/WindowManager(305): addWindowToListInOrder() : current mSkipWidgetFocus='true'
       03-12 11:18:44.440: I/SurfaceFlinger(237): id=772(1) createSurface 0x140c6c for pid 20266 (1x1),1 flag=0, com.appcelerator.tabletTest/com.appcelerator.tabletTest.TablettestActivity
       03-12 11:18:44.460: I/SurfaceFlinger(237): id=773(2) createSurface 0x13ff24 for pid 20266 (1280x752),2 flag=0, com.appcelerator.tabletTest/com.appcelerator.tabletTest.TablettestActivity
       03-12 11:18:44.520: I/ActivityManager(305): Displayed com.appcelerator.tabletTest/.TablettestActivity: +1s81ms
       03-12 11:18:44.520: D/TabletStatusBar(353): lights on
       03-12 11:18:44.610: D/dalvikvm(377): GC_CONCURRENT freed 2097K, 28% free 22801K/31431K, paused 2ms+5ms
       03-12 11:18:44.950: I/SurfaceFlinger(237): id=771 Removed Starting com.appcelerator.tabletTest idx=4 Map Size=4
       03-12 11:18:44.960: I/SurfaceFlinger(237): id=771 Removed Starting com.appcelerator.tabletTest idx=-2 Map Size=4
       
  3. Opie Cyrus 2012-03-16

    Test case passed on 2.3, 3.1 and 3.2 devices, but failed on 4.0 device. The crash log on 4.0 device is the following for V8:
       I/TiAPI   ( 1969): ALL CALENDARS:
       I/TiAPI   ( 1969): appcel123@gmail.com
       I/TiAPI   ( 1969): {"hidden":false,"id":"1","selected":true,"name":"appcel123@gmail.com"}
       I/TiAPI   ( 1969): SELECTABLE CALENDARS:
       I/TiAPI   ( 1969): appcel123@gmail.com
       I/TiAPI   ( 1969): {"hidden":false,"id":"1","selected":true,"name":"appcel123@gmail.com"}
       D/dalvikvm( 1603): GC_CONCURRENT freed 257K, 3% free 14216K/14599K, paused 5ms+2ms
       E/DatabaseUtils( 1603): Writing exception to parcel
       E/DatabaseUtils( 1603): java.lang.IllegalArgumentException: Invalid column visibility
       E/DatabaseUtils( 1603):   at android.database.sqlite.SQLiteQueryBuilder.computeProjection(SQLiteQueryBuilder.java:588)
       E/DatabaseUtils( 1603):   at android.database.sqlite.SQLiteQueryBuilder.buildQuery(SQLiteQueryBuilder.java:403)
       E/DatabaseUtils( 1603):   at android.database.sqlite.SQLiteQueryBuilder.query(SQLiteQueryBuilder.java:347)
       E/DatabaseUtils( 1603):   at android.database.sqlite.SQLiteQueryBuilder.query(SQLiteQueryBuilder.java:291)
       E/DatabaseUtils( 1603):   at com.android.providers.calendar.CalendarProvider2.handleInstanceQuery(CalendarProvider2.java:1015)
       E/DatabaseUtils( 1603):   at com.android.providers.calendar.CalendarProvider2.query(CalendarProvider2.java:840)
       E/DatabaseUtils( 1603):   at android.content.ContentProvider$Transport.query(ContentProvider.java:178)
       E/DatabaseUtils( 1603):   at android.content.ContentProviderNative.onTransact(ContentProviderNative.java:112)
       E/DatabaseUtils( 1603):   at android.os.Binder.execTransact(Binder.java:338)
       E/DatabaseUtils( 1603):   at dalvik.system.NativeStart.run(Native Method)
       W/System.err( 1969): java.lang.IllegalArgumentException: Invalid column visibility
       I/LocalVolumesProvidelet( 1687): Updating SelectionBuilder[table=volumes, selection=(account_name=?) AND (volume_id=?), selectionArgs=[appcel123@gmail.com, Y7sOAAAAIAAJ]] with values cover_content_status=3
       W/System.err( 1969):   at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:165)
       W/System.err( 1969):   at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:135)
       W/System.err( 1969):   at android.content.ContentProviderProxy.query(ContentProviderNative.java:358)
       W/System.err( 1969):   at android.content.ContentResolver.query(ContentResolver.java:310)
       W/System.err( 1969):   at ti.modules.titanium.android.calendar.EventProxy.queryEventsBetweenDates(EventProxy.java:82)
       W/System.err( 1969):   at ti.modules.titanium.android.calendar.EventProxy.queryEventsBetweenDates(EventProxy.java:210)
       W/System.err( 1969):   at ti.modules.titanium.android.calendar.CalendarProxy.getEventsInYear(CalendarProxy.java:102)
       W/System.err( 1969):   at org.appcelerator.kroll.runtime.v8.V8Runtime.nativeRunModule(Native Method)
       W/System.err( 1969):   at org.appcelerator.kroll.runtime.v8.V8Runtime.doRunModule(V8Runtime.java:137)
       W/System.err( 1969):   at org.appcelerator.kroll.KrollRuntime.handleMessage(KrollRuntime.java:259)
       W/System.err( 1969):   at org.appcelerator.kroll.runtime.v8.V8Runtime.handleMessage(V8Runtime.java:163)
       W/System.err( 1969):   at android.os.Handler.dispatchMessage(Handler.java:95)
       W/System.err( 1969):   at android.os.Looper.loop(Looper.java:137)
       W/System.err( 1969):   at org.appcelerator.kroll.KrollRuntime$KrollRuntimeThread.run(KrollRuntime.java:104)
       E/TiJSError( 1969): (main) [496,775] ----- Titanium Javascript Runtime Error -----
       E/TiJSError( 1969): (main) [0,775] - In app.js:26,23
       E/TiJSError( 1969): (main) [0,775] - Message: Uncaught Error: Invalid column visibility
       E/TiJSError( 1969): (main) [0,775] - Source: var events = calendar.getEventsInYear(YEAR);
       
    And for Rhino:
       I/TiAPI   ( 1561): ALL CALENDARS:
       D/dalvikvm( 1561): GC_CONCURRENT freed 259K, 3% free 14756K/15111K, paused 3ms+3ms
       I/ActivityManager(  185): Start proc com.android.providers.calendar for content provider com.android.providers.calendar/.CalendarProvider2: pid=1579 uid=10008 gids={3003, 1015}
       I/ActivityThread( 1579): Pub com.android.calendar: com.android.providers.calendar.CalendarProvider2
       I/TiAPI   ( 1561): appcel123@gmail.com
       I/TiAPI   ( 1561): {"hidden":false,"id":"1","name":"appcel123@gmail.com","selected":true}
       I/TiAPI   ( 1561): SELECTABLE CALENDARS:
       I/TiAPI   ( 1561): appcel123@gmail.com
       I/TiAPI   ( 1561): {"hidden":false,"id":"1","name":"appcel123@gmail.com","selected":true}
       E/DatabaseUtils( 1579): Writing exception to parcel
       E/DatabaseUtils( 1579): java.lang.IllegalArgumentException: Invalid column visibility
       E/DatabaseUtils( 1579):   at android.database.sqlite.SQLiteQueryBuilder.computeProjection(SQLiteQueryBuilder.java:588)
       E/DatabaseUtils( 1579):   at android.database.sqlite.SQLiteQueryBuilder.buildQuery(SQLiteQueryBuilder.java:403)
       E/DatabaseUtils( 1579):   at android.database.sqlite.SQLiteQueryBuilder.query(SQLiteQueryBuilder.java:347)
       E/DatabaseUtils( 1579):   at android.database.sqlite.SQLiteQueryBuilder.query(SQLiteQueryBuilder.java:291)
       E/DatabaseUtils( 1579):   at com.android.providers.calendar.CalendarProvider2.handleInstanceQuery(CalendarProvider2.java:1015)
       E/DatabaseUtils( 1579):   at com.android.providers.calendar.CalendarProvider2.query(CalendarProvider2.java:840)
       E/DatabaseUtils( 1579):   at android.content.ContentProvider$Transport.query(ContentProvider.java:178)
       E/DatabaseUtils( 1579):   at android.content.ContentProviderNative.onTransact(ContentProviderNative.java:112)
       E/DatabaseUtils( 1579):   at android.os.Binder.execTransact(Binder.java:338)
       E/DatabaseUtils( 1579):   at dalvik.system.NativeStart.run(Native Method)
       E/ScriptsModule( 1561): Error while executing app.js: Wrapped java.lang.IllegalArgumentException: Invalid column visibility (app.js#26)
       E/ScriptsModule( 1561): org.mozilla.javascript.WrappedException: Wrapped java.lang.IllegalArgumentException: Invalid column visibility (app.js#26)
       E/ScriptsModule( 1561):   at org.mozilla.javascript.Context.throwAsScriptRuntimeEx(Context.java:1786)
       E/ScriptsModule( 1561):   at ti.modules.titanium.android.calendar.CalendarProxyPrototype.getEventsInYear(CalendarProxyPrototype.java:112)
       E/ScriptsModule( 1561):   at ti.modules.titanium.android.calendar.CalendarProxyPrototype.execIdCall(CalendarProxyPrototype.java:532)
       E/ScriptsModule( 1561):   at org.mozilla.javascript.IdFunctionObject.call(IdFunctionObject.java:129)
       E/ScriptsModule( 1561):   at org.mozilla.javascript.Interpreter.interpretLoop(Interpreter.java:1701)
       E/ScriptsModule( 1561):   at script(app.js:26)
       E/ScriptsModule( 1561):   at org.mozilla.javascript.Interpreter.interpret(Interpreter.java:854)
       E/ScriptsModule( 1561):   at org.mozilla.javascript.InterpretedFunction.exec(InterpretedFunction.java:178)
       E/ScriptsModule( 1561):   at org.mozilla.javascript.Context.evaluateString(Context.java:1111)
       E/ScriptsModule( 1561):   at org.appcelerator.kroll.runtime.rhino.modules.ScriptsModule.runSource(ScriptsModule.java:77)
       E/ScriptsModule( 1561):   at org.appcelerator.kroll.runtime.rhino.modules.ScriptsModule.access$300(ScriptsModule.java:28)
       E/ScriptsModule( 1561):   at org.appcelerator.kroll.runtime.rhino.modules.ScriptsModule$RunInThisContext.call(ScriptsModule.java:142)
       E/ScriptsModule( 1561):   at org.mozilla.javascript.optimizer.OptRuntime.callName(OptRuntime.java:97)
       E/ScriptsModule( 1561):   at org.appcelerator.kroll.runtime.rhino.js.module._c_anonymous_12(/var/folders/vt/m7g5015s2kq16fb8sm99nsqh0000gq/T/module.js:247)
       E/ScriptsModule( 1561):   at org.appcelerator.kroll.runtime.rhino.js.module.call(/var/folders/vt/m7g5015s2kq16fb8sm99nsqh0000gq/T/module.js)
       E/ScriptsModule( 1561):   at org.mozilla.javascript.optimizer.OptRuntime.call2(OptRuntime.java:76)
       E/ScriptsModule( 1561):   at org.appcelerator.kroll.runtime.rhino.js.module._c_anonymous_4(/var/folders/vt/m7g5015s2kq16fb8sm99nsqh0000gq/T/module.js:89)
       E/ScriptsModule( 1561):   at org.appcelerator.kroll.runtime.rhino.js.module.call(/var/folders/vt/m7g5015s2kq16fb8sm99nsqh0000gq/T/module.js)
       E/ScriptsModule( 1561):   at org.mozilla.javascript.optimizer.OptRuntime.call2(OptRuntime.java:76)
       E/ScriptsModule( 1561):   at org.appcelerator.kroll.runtime.rhino.js.module._c_anonymous_3(/var/folders/vt/m7g5015s2kq16fb8sm99nsqh0000gq/T/module.js:65)
       E/ScriptsModule( 1561):   at org.appcelerator.kroll.runtime.rhino.js.module.call(/var/folders/vt/m7g5015s2kq16fb8sm99nsqh0000gq/T/module.js)
       E/ScriptsModule( 1561):   at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:426)
       E/ScriptsModule( 1561):   at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3177)
       E/ScriptsModule( 1561):   at org.appcelerator.kroll.runtime.rhino.js.module.call(/var/folders/vt/m7g5015s2kq16fb8sm99nsqh0000gq/T/module.js)
       E/ScriptsModule( 1561):   at org.appcelerator.kroll.runtime.rhino.RhinoRuntime.doRunModule(RhinoRuntime.java:80)
       E/ScriptsModule( 1561):   at org.appcelerator.kroll.KrollRuntime.handleMessage(KrollRuntime.java:259)
       E/ScriptsModule( 1561):   at android.os.Handler.dispatchMessage(Handler.java:95)
       E/ScriptsModule( 1561):   at android.os.Looper.loop(Looper.java:137)
       E/ScriptsModule( 1561):   at org.appcelerator.kroll.KrollRuntime$KrollRuntimeThread.run(KrollRuntime.java:104)
       E/ScriptsModule( 1561): Caused by: java.lang.IllegalArgumentException: Invalid column visibility
       E/ScriptsModule( 1561):   at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:165)
       E/ScriptsModule( 1561):   at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:135)
       E/ScriptsModule( 1561):   at android.content.ContentProviderProxy.query(ContentProviderNative.java:358)
       E/ScriptsModule( 1561):   at android.content.ContentResolver.query(ContentResolver.java:310)
       E/ScriptsModule( 1561):   at ti.modules.titanium.android.calendar.EventProxy.queryEventsBetweenDates(EventProxy.java:82)
       E/ScriptsModule( 1561):   at ti.modules.titanium.android.calendar.EventProxy.queryEventsBetweenDates(EventProxy.java:210)
       E/ScriptsModule( 1561):   at ti.modules.titanium.android.calendar.CalendarProxy.getEventsInYear(CalendarProxy.java:102)
       E/ScriptsModule( 1561):   at ti.modules.titanium.android.calendar.CalendarProxyPrototype.getEventsInYear(CalendarProxyPrototype.java:105)
       E/ScriptsModule( 1561):   ... 26 more
       E/TiJSError( 1561): (main) [1212,1436] ----- Titanium Javascript Runtime Error -----
       E/TiJSError( 1561): (main) [1,1437] - In app.js:26,0
       E/TiJSError( 1561): (main) [0,1437] - Message: Wrapped java.lang.IllegalArgumentException: Invalid column visibility (app.js#26)
       E/TiJSError( 1561): (main) [0,1437] - Source: null
       
    New ticket 8053 has been opened to address adding Calendar support for ICS.
  4. Michael Pettiford 2012-03-19

    Closing issue Tested with Ti Studio build 2.0.0.201203182248 Ti Mob SDK 2.0.0.v20120319003254 hash r60b6da4c OSX Lion 10.7.3 Galaxy Tab 10.1 OS 3.2, Galaxy Tab 2.3.4 On both devices the expected console output is shown
  5. Dan Tamas 2012-03-19

    The calendar_id bug is fixed, but it triggers another error as I specified in the ticket. http://support.appcelerator.com/tickets/APP-744758/tickets
  6. Opie Cyrus 2012-03-19

    Refer to linked timob-8085 to track newly reported issue
  7. Paras Mishra 2013-06-03

    Exception occurred on the console while executing the app. Timob_7959_exception.txt is attached. Tested on: Device : Google Nexus 7, Android Version: 4.1 SDK: 3.1.1.v20130531163723 CLI version : 3.1.0 OS : MAC OSX 10.7.5 Appcelerator Studio, build: 3.1.1.201306012403 XCode : 4.5.1
  8. Ping Wang 2013-06-03

    I ran the test case on Nexus 7 (4.1) with the latest 3.1.1 and it works fine. From the attached log, it is not a calendar issue but something related network. Resolve the ticket as Fixed.
  9. jithinpv 2013-11-11

    Anvil test case added. https://github.com/appcelerator/titanium_mobile/pull/4944
  10. Lee Morris 2017-03-16

    Closing ticket as fixed.

JSON Source