Picture of Lars Halkjær
Wrong framework version?
by Lars Halkjær - Wednesday, 29 November 2017, 11:53 AM
 

The package.json file for the framework has this entry:

"name": "adapt_framework",
"version": "3.0.0",

But it seems to be version 2.2.3.

It makes plugin updates to the AT fail with this error:

AT plugin error

 

Picture of Matt Leathes
Re: Wrong framework version?
by Matt Leathes - Wednesday, 29 November 2017, 12:54 PM
 

Could you give us a bit of background to this?

Picture of Lars Halkjær
Re: Wrong framework version?
by Lars Halkjær - Wednesday, 29 November 2017, 1:10 PM
 

I upgraded the AT to the latest version (0.4.0 / 2.2.3).

Afterwards we got the above error message when trying to upload a plug-in.

I searched for "3.0.0" in the framework code and found it in the frameworks package.json file as the version number.

Picture of Matt Leathes
Re: Wrong framework version?
by Matt Leathes - Wednesday, 29 November 2017, 2:41 PM
 

uh-oh... that might be my fault :-( I may have released 2.2.3 from the master branch instead of legacy, let me check

Picture of Matt Leathes
Re: Wrong framework version?
by Matt Leathes - Wednesday, 29 November 2017, 4:15 PM
 

Yep, that's exactly what I did. D'oh!

I'm told that doing the following should sort your install out...

node upgrade + Enter
Enter
n + Enter
Enter
tags/v2.2.3 + Enter

Picture of Lars Halkjær
Re: Wrong framework version?
by Lars Halkjær - Wednesday, 29 November 2017, 10:01 PM
 

I tried running "node upgrade" and my input was:

> Continue? Y/n (Y) y
> Update automatically? Y/n (Y) n
> Specific git revision to be used for the authoring tool. Accepts any valid revision type (e.g. branch/tag/commit) tags/v0.4.0
> Specific git revision to be used for the framework. Accepts any valid revision type (e.g. branch/tag/commit) tags/v2.2.3

But the file:

    adapt_authoring/temp/(tenant-id)/adapt_framework/package.json

still said version 3.0.0.

I tried editing the package.json, manually changing the version to 2.2.3.
This allowed the plugin in question to be uploadet with no error.

Picture of Sam Tsiu
Re: Wrong framework version?
by Sam Tsiu - Thursday, 30 November 2017, 5:39 AM
 

I had the same problem and manually edited the version to 2.2.3 from this file temp/id/adapt_framework/package.json solved the error.

Picture of Matt Leathes
Re: Wrong framework version?
by Matt Leathes - Thursday, 30 November 2017, 9:48 AM
 

I would maybe just double-check you are on 2.2.3 before doing that - have a look in temp/id/adapt_framework/src/core/js/libraries - if you see a file called es5-shim.min.js you're definitely using 2.2.x and it's safe to update package.json in this way.

Picture of Lars Halkjær
Re: Wrong framework version?
by Lars Halkjær - Thursday, 30 November 2017, 10:25 AM
 

I justed looked for the "es5-shim.min.js" file i ther libraries folder, but unfortunately it is not there.

Did I do the above update correct? I did not get any error messages.

I can se that I did not get the files belonging to the v2.2.3 tag (the "es5-shim.min.js" show up in github when you filter with the v2.2.3 tag), but rather what seems to be the master branch version.

Is there something else I need to do when running node upgrade?

Picture of Sam Tsiu
Re: Wrong framework version?
by Sam Tsiu - Thursday, 30 November 2017, 10:39 AM
 

no es5-shim.min.js is found. I guess I'm actually using the 3.0 version.

can I just switch to the 2.2.3 tag from command line?

Picture of Matt Leathes
Re: Wrong framework version?
by Matt Leathes - Thursday, 30 November 2017, 2:02 PM
 

Hi Sam

Yes I think you can... getting a bit above and beyond my poor knowledge of the authoring tool though, might best to jump in the authoring tool chat room to ask how best to proceed.

Picture of Sam Tsiu
Re: Wrong framework version?
by Sam Tsiu - Thursday, 30 November 2017, 3:12 PM
 

Thanks Matt.

The authoring tool's framework  HEAD is actually already checked out at v2.2.3. of 1ba2576 with package.json file says version '3.0.0', and nowhere  es5-shim.min.js could be found. 

 

Having a quick look of the framwork github repo of the v2.2.3 tag the commit is 245f47a and does have the es5-shim.min.js file.

I'm a bit confused. Will do a backup and update the tool and framework later.

 

Picture of Matt Leathes
Re: Wrong framework version?
by Matt Leathes - Thursday, 30 November 2017, 3:57 PM
 

We think it's probably refusing to re-fetch tag 2.2.3 since it already exists. I'm told that $ git fetch --tags --all might sort it out...

Picture of Sam Tsiu
Re: Wrong framework version?
by Sam Tsiu - Friday, 1 December 2017, 12:59 AM
 

Thanks Matt

$ git fetch --tags --all get the correct tag. 

Picture of Lars Halkjær
Re: Wrong framework version?
by Lars Halkjær - Tuesday, 12 December 2017, 2:10 PM
 

Unfortunately I had no luck with the git fetch --tag --all.

I still get the 3.0.0 version.

This also seems to be the root of the problem in this case (at least the part with the manifest titles not being updated):

https://community.adaptlearning.org/mod/forum/discuss.php?d=2519

If I replace the "replace.js" grunt config file, with the 2.2.3 one, it works.

Picture of Matt Leathes
Re: Wrong framework version?
by Matt Leathes - Thursday, 14 December 2017, 5:40 PM
 

the command should be git fetch --tags --all - unless the lack of 's' in your post was just a typo that might be the reason why it's not working?

Picture of Lars Halkjær
Re: Wrong framework version?
by Lars Halkjær - Friday, 15 December 2017, 2:58 AM
 

Alas it was a typo...

I did write git fetch --tags --all and the command seemed to execute without any errors.

But as I only recently changed from SVN to GIT, I am not a 100% sure what this is supposed to achieve...

As far as I can figure out It should ensure that data for all tagged versions is in my local repository?

But I haven't figured out how to switch the v3.0.0 files on my AT server with the v2.2.3 files.

Running the node upgrade "manually" specifying tags/v2.2.3 for the framework changes the package.json to the one with version 2.2.3, but the "es5-shim.min.js" file in the libraries folder is not there, and the above mentioned "replace.js" file is also the 3.0.0 version.

The AT servers we updated, before we discovered the problem, is failing when previewing and downloading.

Picture of Matt Leathes
Re: Wrong framework version?
by Matt Leathes - Monday, 18 December 2017, 2:54 PM
 

It should force it to re-download all the data for all the tags which should correct the problem with v2.2.3

I have to confess that I don't really use the AT much - but it looks to me like the 'adapt_framework' folder inside the 'authoring' folder is just a git clone of https://github.com/adaptlearning/adapt_framework so I guess you could just delete folder that then re-clone it and manually switch it to the 2.2.3 tag?

Might be best to check for sure in the authoring tool chat room.