Picture of Mick  Leyden
Error when migrating from Windows to Linux
by Mick Leyden - Tuesday, 9 May 2017, 4:45 AM
 

Hey All, 

We have been using an adapt install on a desktop running 32bit Windows 7. It has worked ok, but has caused a few headaches, particularly with multiple users logging in. I've gone on a search for a better solution and have settled on an Ubuntu Virtual Machine, hosted through google cloud compute. 

I've got the Adapt Authoring tool installed and up and running, I have migrated our database using MongoDump on the Windows computer and Mongorestore on the VM. I have also moved the Data and plugins folders from Windows to the VM. 

After the Mongorestore I was able to successfully log into Adapt and could see our courses there (yay!). But all of the links to images were broken. (doh!). 

I found the cause of this was because windows uses a backslash in the file path and linux uses a forward slash so the file path to all of the assets was broken. To fix this I did a find and replace on the assets table of the database. (copy the Json for the table from Studio3T into Brackets, find \ and replace with /, paste the updated Json into Studio 3T). After doing that my asset links started working! (Yay!)

The state of play is now, if I attempt to publish a course that only uses core components and the Vanilla theme, everything works like a charm.(Double yay!)

However, if I use our custom theme or the Adapt Community theme (downloaded from plugin browser) and attempt to publish I get this error in the console: (doh!)

I also found that if I stick with Vanilla, but publish a course that has a custom component (in this case stacklist, but have had it with others) the preview will just hang on the spinning loading icon. A look in the error console shows an error saying "Uncaught error: stacklist component not found. Is it installed and included?"

It seems to me that somewhere the authoring tool can not find or connect to the plugins folder. The weird thing, the same errors occur even if I import the plugin again, via plugin management. I tried deleting the theme and stacklist from the database then reimporting, this appears to work successfully but somewhere, the path to the plugins folder is broken because the error persists.

I assume somewhere the path to the plugins folder is broken, but I've looked all over the place and am out of ideas, can anyone else suggest where I might be able to look?

thanks!

mick

Picture of Tom Taylor
Re: Error when migrating from Windows to Linux
by Tom Taylor - Tuesday, 9 May 2017, 8:14 AM
 

Hi Mick,

Congrats on getting this far!

A few things off the top of my head:

  • Did you copy the temp folder from your old install, or install everything afresh?
  • If you're using your windows conf/config.json, there may be extra file paths that need updating (I'm thinking serverRoot in particular).
  • If you're using a config.json from a fresh install, and copied the temp folder from windows, some of the folders will be named incorrectly; the first folder in temp should be the same as the ID for your master tenant (you can find this in your config.json).

Let me know if none of these apply, and I'll have another think.

Picture of Mick  Leyden
Re: Error when migrating from Windows to Linux
by Mick Leyden - Wednesday, 10 May 2017, 7:39 AM
 

Hey Tom,

Thanks for the reply. I think you are on the right track. 

I was using the freshly installed config.json, I dont remember copying the temp folder but I noticed a mismatch in there. In the screenshot above it is trying to output to 58bf5a884780032016afaa5a.

I checked the config and it had: 590c06c8b55e7ab118622399 set as the tenant master ID. I then had a look in the temp folder in the VM and it did have a folder for both of those IDs but the 590cxxxx folder did not have any of the custom extensions or themes in the SRC folder. 

I thought, you beauty, I have found the problem. So I uploaded the missing extensions tried again and it was still no good. I was then struck by the fact the console was reporting the error on the 58fbxxx folder. So I updated config.json to show 58bf5a884780032016afaa5a, as the tenant master. Which is what the tenant master was on the windows folder, I then made sure all menus and extensions were present in the SRC folder... and I still get the same error, only this time I get it with all courses including freshly created courses!

So where I have got to now, the MasterTenantID in config.json is now the same as the windows installation. It is also the same as the folder that the authoring tool is attempting to output too. It also matches the Tenant ID recorded in the tenants table of the database (I just found that now). 

However new courses that have not been imported are no longer working since I have changed the TennantID from 59xxx. 

While writing this, I thought perhaps if I change everything, including the database back to the original tenant ID from config.json (590cxxxx), I might have more success. But when I try to edit it in Studio3T it tells me that field cannot be changed. 

Any other ideas? 

 

...as an aside, I must confess, I have been using adapt for 12 months or so and have thought many times, why the hell don't they just make an import export feature?!?!.... I am now beginning to understand! It is a lot more complex than I thought!