Jump to content


Photo

Secure Mail - user with apostrophe in name crashes app

Started by Jorden Kleier , 07 September 2017 - 09:04 PM
9 replies to this topic

Jorden Kleier Members

Jorden Kleier
  • 4 posts

Posted 07 September 2017 - 09:04 PM

fortunately, there are very few people with apostrophes in their names.  O'Brien, in this case.

 

had some problems, uninstalled, and reinstalled Secure Mail 10.6.20-18, on android 5.1, on a motorola XT1055.

 

got an error, "unfortunately, Secure Mail has stopped"

 

exported logs, found a crash.txt file, looked at it:

 

UncaughtException stack trace:
Timestamp: 09-07 09:29:22.697 -0500
name=AsyncTask #1; tid=636; priority=5; state=RUNNABLE; group=main
 
java.lang.RuntimeException: An error occured while executing doInBackground()
at android.os.AsyncTask$3.done(AsyncTask.java:304)
at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:355)
at java.util.concurrent.FutureTask.setException(FutureTask.java:222)
at java.util.concurrent.FutureTask.run(FutureTask.java:242)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
at java.lang.Thread.run(Thread.java:818)
Caused by: android.database.sqlite.SQLiteException: near "brien": syntax error (code 1): , while compiling: SELECT _id, displayName, emailAddress, syncKey, syncLookback, syncInterval, hostAuthKeyRecv, hostAuthKeySend, flags, isDefault, compatibilityUuid, senderName, ringtoneUri, protocolVersion, newMessageCount, securitySyncKey, signature, policyKey, notifiedMessageId, notifiedMessageCount, serverType, maxProtocolVersion, lastQueriedOptionsCommandTime, calendarRingtoneUri FROM Account WHERE emailAddress IN ('username@domain.mail.onmicrosoft.com','name.o'brien@domain.com','name.obrien@domain.com')
at android.database.sqlite.SQLiteConnection.nativePrepareStatement(Native Method)
at android.database.sqlite.SQLiteConnection.acquirePreparedStatement(SQLiteConnection.java:889)
at android.database.sqlite.SQLiteConnection.prepare(SQLiteConnection.java:500)
at android.database.sqlite.SQLiteSession.prepare(SQLiteSession.java:588)
at android.database.sqlite.SQLiteProgram.<init>(SQLiteProgram.java:58)
at android.database.sqlite.SQLiteQuery.<init>(SQLiteQuery.java:37)
at android.database.sqlite.SQLiteDirectCursorDriver.query(SQLiteDirectCursorDriver.java:44)
at android.database.sqlite.SQLiteDatabase.rawQueryWithFactory(SQLiteDatabase.java:1316)
at android.database.sqlite.SQLiteDatabase.queryWithFactory(SQLiteDatabase.java:1163)
at android.database.sqlite.SQLiteDatabase.query(SQLiteDatabase.java:1034)
at android.database.sqlite.SQLiteDatabase.query(SQLiteDatabase.java:1240)
at com.citrix.email.provider.EmailProvider.ctx_query(EmailProvider.java:1871)
at citrixSuper.android.content.ContentProvider.query_aroundBody4(Unknown Source)
at citrixSuper.android.content.ContentProvider.query_aroundBody5$advice(Unknown Source)
at citrixSuper.android.content.ContentProvider.query_aroundBody6(Unknown Source)
at citrixSuper.android.content.ContentProvider.query_aroundBody7$advice(Unknown Source)
at citrixSuper.android.content.ContentProvider.query(Unknown Source)
at android.content.ContentProvider.query(ContentProvider.java:966)
at citrixSuper.android.content.ContentProvider.ctx_query(Unknown Source)
at citrixSuper.android.content.ContentProvider.query_aroundBody8(Unknown Source)
at citrixSuper.android.content.ContentProvider.query_aroundBody9$advice(Unknown Source)
at citrixSuper.android.content.ContentProvider.query_aroundBody10(Unknown Source)
at citrixSuper.android.content.ContentProvider.query_aroundBody11$advice(Unknown Source)
at citrixSuper.android.content.ContentProvider.query(Unknown Source)
at android.content.ContentProvider$Transport.query(ContentProvider.java:211)
at android.content.ContentResolver.query(ContentResolver.java:478)
at citrix.android.content.ContentResolver.query_aroundBody2(Unknown Source)
at citrix.android.content.ContentResolver.query_aroundBody3$advice(Unknown Source)
at citrix.android.content.ContentResolver.query(Unknown Source)
at com.citrix.emailcommon.utility.o.a(Utility.java:531)
at com.citrix.email.activity.setup.b$a.a(AccountCheckSettingsFragment.java:731)
at com.citrix.email.activity.setup.b$a.doInBackground(AccountCheckSettingsFragment.java:645)
at android.os.AsyncTask$2.call(AsyncTask.java:292)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
... 3 more

 

 

I then tried setting him up on a newer phone, android 7.1.1 on a Nexus 6.  Slightly shorter error message verbage, but the same exact stuff in the error log. It's not the android version, it's not the physical phone. That leaves the android app or the user. I'm setting up a user right now with an apostrophe in its name to test to make sure it's not the user.

 

Doing some digging, it looks like there's a specific issue working with SQLite on Android, that revolves around single quotes being delimiters. My thought is that there isn't code to escape the apostrophe inside the person's name, in the Secure Mail application.  Probably got changed/removed in the newer version of Secure Mail, I'm guessing  I can't imagine that this is an uber-common problem, since the majority of people do not have apostrophes (aka single-quotes) in their names.

 

Has anyone else run into this issue? Should I open an actual ticket?

 

Thank you..

 



Kausar Tasneem Citrix Employees

Kausar Tasneem
  • 71 posts

Posted 08 September 2017 - 12:10 AM

Jorden,

 

Xenmobile SecureApps 10.7 has been released, Can you test with SecureMail 10.7 version and see if the issue persists ?

 

I haven't seen any similar issues reported with SecureMail. If the behavior is same with SecureMail 10.7, then I suggest we open a Support Ticket to investigate further.

 

Regards,

Kausar



Kausar Tasneem Citrix Employees

Kausar Tasneem
  • 71 posts

Posted 08 September 2017 - 01:15 AM

fortunately, there are very few people with apostrophes in their names.  O'Brien, in this case.

 

had some problems, uninstalled, and reinstalled Secure Mail 10.6.20-18, on android 5.1, on a motorola XT1055.

 

got an error, "unfortunately, Secure Mail has stopped"

 

exported logs, found a crash.txt file, looked at it:

 

UncaughtException stack trace:
Timestamp: 09-07 09:29:22.697 -0500
name=AsyncTask #1; tid=636; priority=5; state=RUNNABLE; group=main
 
java.lang.RuntimeException: An error occured while executing doInBackground()
at android.os.AsyncTask$3.done(AsyncTask.java:304)
at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:355)
at java.util.concurrent.FutureTask.setException(FutureTask.java:222)
at java.util.concurrent.FutureTask.run(FutureTask.java:242)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
at java.lang.Thread.run(Thread.java:818)
Caused by: android.database.sqlite.SQLiteException: near "brien": syntax error (code 1): , while compiling: SELECT _id, displayName, emailAddress, syncKey, syncLookback, syncInterval, hostAuthKeyRecv, hostAuthKeySend, flags, isDefault, compatibilityUuid, senderName, ringtoneUri, protocolVersion, newMessageCount, securitySyncKey, signature, policyKey, notifiedMessageId, notifiedMessageCount, serverType, maxProtocolVersion, lastQueriedOptionsCommandTime, calendarRingtoneUri FROM Account WHERE emailAddress IN ('username@domain.mail.onmicrosoft.com','name.o'brien@domain.com','name.obrien@domain.com')
at android.database.sqlite.SQLiteConnection.nativePrepareStatement(Native Method)
at android.database.sqlite.SQLiteConnection.acquirePreparedStatement(SQLiteConnection.java:889)
at android.database.sqlite.SQLiteConnection.prepare(SQLiteConnection.java:500)
at android.database.sqlite.SQLiteSession.prepare(SQLiteSession.java:588)
at android.database.sqlite.SQLiteProgram.<init>(SQLiteProgram.java:58)
at android.database.sqlite.SQLiteQuery.<init>(SQLiteQuery.java:37)
at android.database.sqlite.SQLiteDirectCursorDriver.query(SQLiteDirectCursorDriver.java:44)
at android.database.sqlite.SQLiteDatabase.rawQueryWithFactory(SQLiteDatabase.java:1316)
at android.database.sqlite.SQLiteDatabase.queryWithFactory(SQLiteDatabase.java:1163)
at android.database.sqlite.SQLiteDatabase.query(SQLiteDatabase.java:1034)
at android.database.sqlite.SQLiteDatabase.query(SQLiteDatabase.java:1240)
at com.citrix.email.provider.EmailProvider.ctx_query(EmailProvider.java:1871)
at citrixSuper.android.content.ContentProvider.query_aroundBody4(Unknown Source)
at citrixSuper.android.content.ContentProvider.query_aroundBody5$advice(Unknown Source)
at citrixSuper.android.content.ContentProvider.query_aroundBody6(Unknown Source)
at citrixSuper.android.content.ContentProvider.query_aroundBody7$advice(Unknown Source)
at citrixSuper.android.content.ContentProvider.query(Unknown Source)
at android.content.ContentProvider.query(ContentProvider.java:966)
at citrixSuper.android.content.ContentProvider.ctx_query(Unknown Source)
at citrixSuper.android.content.ContentProvider.query_aroundBody8(Unknown Source)
at citrixSuper.android.content.ContentProvider.query_aroundBody9$advice(Unknown Source)
at citrixSuper.android.content.ContentProvider.query_aroundBody10(Unknown Source)
at citrixSuper.android.content.ContentProvider.query_aroundBody11$advice(Unknown Source)
at citrixSuper.android.content.ContentProvider.query(Unknown Source)
at android.content.ContentProvider$Transport.query(ContentProvider.java:211)
at android.content.ContentResolver.query(ContentResolver.java:478)
at citrix.android.content.ContentResolver.query_aroundBody2(Unknown Source)
at citrix.android.content.ContentResolver.query_aroundBody3$advice(Unknown Source)
at citrix.android.content.ContentResolver.query(Unknown Source)
at com.citrix.emailcommon.utility.o.a(Utility.java:531)
at com.citrix.email.activity.setup.b$a.a(AccountCheckSettingsFragment.java:731)
at com.citrix.email.activity.setup.b$a.doInBackground(AccountCheckSettingsFragment.java:645)
at android.os.AsyncTask$2.call(AsyncTask.java:292)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
... 3 more

 

 

I then tried setting him up on a newer phone, android 7.1.1 on a Nexus 6.  Slightly shorter error message verbage, but the same exact stuff in the error log. It's not the android version, it's not the physical phone. That leaves the android app or the user. I'm setting up a user right now with an apostrophe in its name to test to make sure it's not the user.

 

Doing some digging, it looks like there's a specific issue working with SQLite on Android, that revolves around single quotes being delimiters. My thought is that there isn't code to escape the apostrophe inside the person's name, in the Secure Mail application.  Probably got changed/removed in the newer version of Secure Mail, I'm guessing  I can't imagine that this is an uber-common problem, since the majority of people do not have apostrophes (aka single-quotes) in their names.

 

Has anyone else run into this issue? Should I open an actual ticket?

 

Thank you..

adding further, there was a similar BUG with WorxMail 10.4.0 which was fixed with 10.4.10 . Seems to me like it can be a regression. Please test with 10.7 SecureMail and let me know the results



Jorden Kleier Members

Jorden Kleier
  • 4 posts

Posted 08 September 2017 - 06:56 PM

Just got done testing Secure Mail 10.7.0-14 with a test account, this time on a Samsung S7 Edge.

 

I added an email alias with an apostrophe as an alias, and it failed. removed the alias with the apostrophe single-quote, and it started working just fine.

 

 
 
UncaughtException stack trace:
Timestamp: 09-08 01:35:17.272 -0500
name=AsyncTask #1; tid=6935; priority=5; state=RUNNABLE; group=main
 
java.lang.RuntimeException: An error occurred while executing doInBackground()
at android.os.AsyncTask$3.done(AsyncTask.java:318)
at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:354)
at java.util.concurrent.FutureTask.setException(FutureTask.java:223)
at java.util.concurrent.FutureTask.run(FutureTask.java:242)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
at java.lang.Thread.run(Thread.java:762)
Caused by: android.database.sqlite.SQLiteException: near "3": syntax error (code 1): , while compiling: SELECT _id, displayName, emailAddress, syncKey, syncLookback, syncInterval, hostAuthKeyRecv, hostAuthKeySend, flags, isDefault, compatibilityUuid, senderName, ringtoneUri, protocolVersion, newMessageCount, securitySyncKey, signature, policyKey, notifiedMessageId, notifiedMessageCount, serverType, maxProtocolVersion, lastQueriedOptionsCommandTime, calendarRingtoneUri FROM Account WHERE emailAddress IN ('citrix.test3@domain.com','citrix.test'3@domain.com','ctx3@domain.mail.onmicrosoft.com')
#################################################################
Error Code : 1 (SQLITE_ERROR)
Caused By : SQL(query) error or missing database.
(near "3": syntax error (code 1): , while compiling: SELECT _id, displayName, emailAddress, syncKey, syncLookback, syncInterval, hostAuthKeyRecv, hostAuthKeySend, flags, isDefault, compatibilityUuid, senderName, ringtoneUri, protocolVersion, newMessageCount, securitySyncKey, signature, policyKey, notifiedMessageId, notifiedMessageCount, serverType, maxProtocolVersion, lastQueriedOptionsCommandTime, calendarRingtoneUri FROM Account WHERE emailAddress IN ('citrix.test3@domain.com','citrix.test'3@domain.com','ctx3@domain.mail.onmicrosoft.com'))
#################################################################


Kausar Tasneem Citrix Employees

Kausar Tasneem
  • 71 posts

Posted 10 September 2017 - 11:29 PM

 

Just got done testing Secure Mail 10.7.0-14 with a test account, this time on a Samsung S7 Edge.

 

I added an email alias with an apostrophe as an alias, and it failed. removed the alias with the apostrophe single-quote, and it started working just fine.

 

 
 
UncaughtException stack trace:
Timestamp: 09-08 01:35:17.272 -0500
name=AsyncTask #1; tid=6935; priority=5; state=RUNNABLE; group=main
 
java.lang.RuntimeException: An error occurred while executing doInBackground()
at android.os.AsyncTask$3.done(AsyncTask.java:318)
at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:354)
at java.util.concurrent.FutureTask.setException(FutureTask.java:223)
at java.util.concurrent.FutureTask.run(FutureTask.java:242)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
at java.lang.Thread.run(Thread.java:762)
Caused by: android.database.sqlite.SQLiteException: near "3": syntax error (code 1): , while compiling: SELECT _id, displayName, emailAddress, syncKey, syncLookback, syncInterval, hostAuthKeyRecv, hostAuthKeySend, flags, isDefault, compatibilityUuid, senderName, ringtoneUri, protocolVersion, newMessageCount, securitySyncKey, signature, policyKey, notifiedMessageId, notifiedMessageCount, serverType, maxProtocolVersion, lastQueriedOptionsCommandTime, calendarRingtoneUri FROM Account WHERE emailAddress IN ('citrix.test3@domain.com','citrix.test'3@domain.com','ctx3@domain.mail.onmicrosoft.com')
#################################################################
Error Code : 1 (SQLITE_ERROR)
Caused By : SQL(query) error or missing database.
(near "3": syntax error (code 1): , while compiling: SELECT _id, displayName, emailAddress, syncKey, syncLookback, syncInterval, hostAuthKeyRecv, hostAuthKeySend, flags, isDefault, compatibilityUuid, senderName, ringtoneUri, protocolVersion, newMessageCount, securitySyncKey, signature, policyKey, notifiedMessageId, notifiedMessageCount, serverType, maxProtocolVersion, lastQueriedOptionsCommandTime, calendarRingtoneUri FROM Account WHERE emailAddress IN ('citrix.test3@domain.com','citrix.test'3@domain.com','ctx3@domain.mail.onmicrosoft.com'))
#################################################################

 

I suggest you open a support ticket. It needs further investigation from Dev Team.

 

Regards,

Kausar



Dan Peterson Members

Dan Peterson
  • 3 posts

Posted 13 September 2017 - 03:14 PM

I am experiencing this same issue in my environment.  Was support able to provide any feedback?

 

Thanks,

Dan



Jorden Kleier Members

Jorden Kleier
  • 4 posts

Posted 13 September 2017 - 03:38 PM

Actually, I haven't opened a ticket  with support yet.  I found that by removing the email alias with the apostrophe in it, the user can install the app on the phone.  Then I added the alias back once the app was installed, and we had not had any issues with testing.

 

The actual user actually wanted us to leave the apostrophe alias out because it had always been a hassle anyways, and he was tired of it.

 

Then I got caught up in putting out the next fire, but I'll work on getting a ticket started today.



Jorden Kleier Members

Jorden Kleier
  • 4 posts

Posted 13 September 2017 - 03:52 PM

Ticket opened, I will post updates.



Edgar Lobo Citrix Employees

Edgar Lobo
  • 6 posts

Posted 21 September 2017 - 02:00 PM

Hello,

 

We are currently working with Engineering to address the issue. Updates on this particular issue will be shared once we receive them.

 

Thanks,

 



Jason Salgado Members
  • #10

Jason Salgado
  • 5 posts

Posted 22 September 2017 - 02:48 PM

We have the same issue.  I emailed our TRM and Edgar Lobo logs as well, just in case they need them.