[RESOLVED] Unable to import from Studio: channel won't update to latest version

Channel (Name of the channel you were working on): Watobe Library (token: fifan-takup)

Description of problem:
For the past week, we’ve been unable to import more content to Kolibri from Studio due to a channel version mismatch. On Studio, the latest published version is 171, but on Kolibri it’s 165. When I click Update on the Import page of our Channel, it gets stuck on Updating Channel… the loading bar times out after an hour or so and says Update failed. Because of this I am unable to import any new resources from Studio to our server - any idea what might be causing it?

I know Studio recently underwent some changes to the UI, but things were still working fine up until about a week ago. We are running a pretty old version of Kolibri (0.12.1) because we made various changes to the code and haven’t wanted to cause merge conflicts by upgrading - could there be something in the import mechanism of Kolibri 0.12 that is no longer supported by the latest version of Studio?

Hello dear @eriklonnroth,

thank you for your report. I’ll check out if there were any recent updates of Studio that might break import in Kolibri with the team. Meanwhile:

  1. Can you send us information about your browser and OS?
  2. Can you check if you see any errors in the browser console?
  3. Can you share Kolibri logs? You can find logs in the Kolibri home folder which is by default ~/.kolibri
  4. Regarding your custom updates of the Kolibri code, were there any changes of import functionality that we should be aware of while debugging this problem?

Kind regards,
Michaela

Thanks,

  1. Can you send us information about your browser and OS? - I’m on OSX with Brave browser. However, the same problem was experienced by other admin users on other OSes and browsers (Windows with Chrome)

  2. Can you check if you see any errors in the browser console?
    Yes, this error appears when attempting to update the channel:

  3. Can you share Kolibri logs? You can find logs in the Kolibri home folder which is by default ~/.kolibri
    Nothing written to kolibri.log since May 2020 when we furst spun up the server:

  4. Regarding your custom updates of the Kolibri code, were there any changes of import functionality that we should be aware of while debugging this problem?
    No, we had everything working fine up until a few weeks ago and we hadn’t pushed any changes to the import functionality from our side.

Hi @eriklonnroth,

There was an issue with the channel databases published on Kolibri Studio around the time when your Kolibri instance was set up. The issue was resolved swiftly, but if a channel was published and imported during this time, it’s likely that Kolibri will have issues updating the local channel database for newer versions of the channel. Newer versions of Kolibri are more robust in handling channel import issues like this, but I believe the version you’re running requires a manual fix. I suggest making a backup prior to proceeding, just in case.

To solve the issue, you’ll need to delete the local copy of the channel database:

rm ~/.kolibri/content/databases/a044c649034b467fa90ebf34731bc44c.sqlite3

This won’t delete any of the content imported into Kolibri, but should stop Kolibri from trying to bring the local copy of the channel database up to date.

Please let us know if this resolves your issue.

Regards,
Blaine

Thanks Blaine,
We’re actually running Kolibri with PostgreSQL, not SQLite. I checked the server, and the path you shared is already empty:

I am, however, able to see the content channel metadata that mentions version 165 in pgAdmin:

Any advice on how to proceed?

Thanks
Erik

Hey @blaine just checking if you had any thoughts on how to proceed with PostgreSQL? Shall I try deleting the database record in content_channelmetadata or is there some other approach?

Just a little update: I tried deleting said record from the database on our staging server to see what would happen. It said “No Channels installed” when I returned to the Import screen on Kolibri. When I try to add back our Channel using the token it actually gets hung trying to update the channel listing:

Here’s a screen grab from the browser console:

Hi @eriklonnroth,

Do you perhaps have custom Kolibri content directory defined? It would be configured in your options.ini file as CONTENT_DIR or perhaps an environment variable KOLIBRI_CONTENT_DIR. If you are using a custom content directory, that’s where you should be able to find that SQLite file I referenced.

I’m unsure if deleting the records from content_channelmetadata has put Kolibri into a broken state or not. Since you’re using PostgreSQL, it’s possible there’s an issue specifically with this combination of Kolibri version and Postgres. Although, I didn’t have any issues importing the channel in my own testing of Kolibri 0.12 without Postgres so I still lean towards believing this stems from an issue with the existing channel database.

Regards,
Blaine

Okay we managed to resolve the issue simply by restarting the server, which flushed cache. After that, we were able to update the channel listing and import content.

1 Like

That’s great news, @eriklonnroth.