JMC Hangs - Local SQLite Database locked - after getting new comments

I am using the latest JMC tag named "tip" and I am using JIRA on demand

I just incorporated JIRA mobile connect into my ios app and it is behaving a bit oddly.

After turning the debug mode on, I was able to dig a bit deeper and I find the source of this problem is that the sqlite database is locked.

The sequence of events is like follows:-

1. I launched my app for the first time

2. I created an issue successfully using JIRA mobile connect

3. I shut down my app

4. I updated the issue by adding comments in JIRA online via the web interface

5. I re-started my ios app

6. JMC gets the updates from JIRA rest api using https://xxxx.atlassian.net/rest/jconnect/1.0/issue/updates?sinceMillis=1408380024967&uuid=9371F70F-12CD-47EC-AB3E-4B0398FF453E&apikey=YYY&project=AAA- and it is able to find the updates that I had made in step 4

7. Since it finds changes,

JMCIssueStore.m

calls

updateWithData

method which has logic in it i.e.

[self createSchema:YES]

which attempts to drop the existing 2 tables and recreate the schema.

8. On the 1st table drop attempt i.e.

[db executeUpdate:@"DROP table if exists ISSUE"],

the database is found to be locked and JMC goes in an infinite loop retrying to execute this statement.

Has anyone encountered this or something similar? Any pointers would be greatly appreciated.

3 answers

1 accepted

The whole issue stemmed from a documentation error in the integration process of JIRA Mobile Connect specifically step 9 here where they asked to exclude all the JMC files from using ARC - which I had done. This is the root cause of the problem.

After going through the Angry Nerds JMC files and comparing it with my own, I realised they were exactly the same and still the Angry Nerds sample worked and mine didnt. So, I retraced all my integration steps and on reaching step 9, it struck me that when I was going through the code, there were no sign of any manual release statements - which was odd if the code was indeed not using ARC.

I removed all my -fno-objc-arc flags from all the JMC files. And hey presto! the crashing issue isnt there anymore.

Thanks for this.

ARC was enabled to JMC a while back, and obviously the documentation was not updated.

If you provide a PR, with the ammended README, I will definitely merge it to master.

Cheers,

Nick

Sure. I will make the changes and send you a PR.

Thanks. Quick Question. I am a bit new to this community and I was wondering how I can keep track of what are the things that people are working on / bucket list that need doing so that I can maybe contribute in some way.

Cheers!

Just merged :)

The issue tracker for JMC is at https://connect.atlassian.net/browse/CONNECT/?selectedTab=com.atlassian.jira.jira-projects-plugin:issues-panel.

There is no work-in-flight I currently know of. Feel free to kick something however if you wish.

The new screensizes will probably need some changes to be working well, so if you're up for that challenge, it'd be very welcome!

Hi , i am trying to add jira mobile connect to my xcode project and it gives out 165 errors when i compile. can you please let me know why as there is nothing wrong with my project . i have even added to a sample project and when i compile i get 160 errors because of jira mobile connect . please let me know i have been waiting this issue to get resolved from past 2 weeks . Thanks

Thanks. Quick Question. I am a bit new to this community and I was wondering how I can keep track of what are the things that people are working on / bucket list that need doing so that I can maybe contribute in some way.

Hi , i am trying to add jira mobile connect to my xcode project and it gives out 165 errors when i compile. can you please let me know why as there is nothing wrong with my project . i have even added to a sample project and when i compile i get 160 errors because of jira mobile connect . please let me know i have been waiting this issue to get resolved from past 2 weeks . Thanks

Suggest an answer

Log in or Join to answer
Community showcase
Sarah Schuster
Posted Jan 29, 2018 in Jira

What are common themes you've seen across successful & failed Jira Software implementations?

Hey everyone! My name is Sarah Schuster, and I'm a Customer Success Manager in Atlassian specializing in Jira Software Cloud. Over the next few weeks I will be posting discussion topics (8 total) to ...

2,950 views 12 18
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot