Picture of Jonathan Briggs
Error An error occurred while getting schemas - it's a bad day
by Jonathan Briggs - Tuesday, 17 September 2019, 1:53 PM
 

So I've done something very silly and messed up whilst playing around with an extension. I think I've created (in error) a duplicate and am getting in the console:

Error: Already found extension config attribute with key […] and then a load of node modules locations. And a lib/content manager reference.

I know I should never have done this (and will learn) but the upshot is that I can't get into the Authoring Tool, getting the response 'An error occurred while getting schemas'

Is there anything I can do short of restoring to a backup (it's on Azure/Ubuntu)? Can I replace the node modules somehow?

I *was* having a good day, too… 

Any help greatly appreciated,

Jonathan

Picture of Chuck Lorenz
Re: Error An error occurred while getting schemas - it's a bad day
by Chuck Lorenz - Tuesday, 17 September 2019, 3:59 PM
 

Yes, there may be some things you can try. But let's begin with just a couple of details of your situation.

  • version of authoring tool?
  • have you indeed duplicated the extension? (check for duplicate entries in Plugin Management; a screenshot may be helpful in order to know what to call each "version")
  • is the plug-in in question an Adapt core plugin? which one?



Picture of Jonathan Briggs
Re: Error An error occurred while getting schemas - it's a bad day
by Jonathan Briggs - Tuesday, 17 September 2019, 4:13 PM
 

Hi, thanks for offering to help!

It's 

Authoring tool 0.10.0.

Framework 2.4.0.

Here's the console:

error [17 Sep 19 14:06:44 +00:00] Already found extension config attribute with key _launchNewWindow (adapt-launchNewWindow-de)

Error: Already found extension config attribute with key _launchNewWindow (adapt-launchNewWindow-de)

    at /home/jonathan_4091_b/adapt_authoring/lib/contentmanager.js:702:31

    at /home/jonathan_4091_b/adapt_authoring/node_modules/async/dist/async.js:3110:16

    at eachOfArrayLike (/home/jonathan_4091_b/adapt_authoring/node_modules/async/dist/async.js:1069:9)

    at eachOf (/home/jonathan_4091_b/adapt_authoring/node_modules/async/dist/async.js:1117:5)

    at Object.eachLimit (/home/jonathan_4091_b/adapt_authoring/node_modules/async/dist/async.js:3172:5)

    at processPluginLocations (/home/jonathan_4091_b/adapt_authoring/lib/contentmanager.js:689:13)

    at processPlugin (/home/jonathan_4091_b/adapt_authoring/lib/contentmanager.js:652:7)

    at /home/jonathan_4091_b/adapt_authoring/lib/contentmanager.js:636:15

    at /home/jonathan_4091_b/adapt_authoring/node_modules/async/dist/async.js:3110:16

    at replenish (/home/jonathan_4091_b/adapt_authoring/node_modules/async/dist/async.js:1011:17)

    at /home/jonathan_4091_b/adapt_authoring/node_modules/async/dist/async.js:1016:9

    at eachLimit$1 (/home/jonathan_4091_b/adapt_authoring/node_modules/async/dist/async.js:3196:24)

    at Object.<anonymous> (/home/jonathan_4091_b/adapt_authoring/node_modules/async/dist/async.js:1046:16)

    at /home/jonathan_4091_b/adapt_authoring/lib/contentmanager.js:635:19

    at /home/jonathan_4091_b/adapt_authoring/node_modules/mongoose/lib/model.js:4638:16

    at /home/jonathan_4091_b/adapt_authoring/node_modules/mongoose/lib/utils.js:264:16

    at _hooks.execPost (/home/jonathan_4091_b/adapt_authoring/node_modules/mongoose/lib/query.js:4320:11)

    at /home/jonathan_4091_b/adapt_authoring/node_modules/mongoose/node_modules/kareem/index.js:135:16

    at _combinedTickCallback (internal/process/next_tick.js:131:7)

    at process._tickDomainCallback (internal/process/next_tick.js:218:9)

error [17 Sep 19 14:06:45 +00:00] Already found extension config attribute with key _launchNewWindow (adapt-launchNewWindow-de)

Error: Already found extension config attribute with key _launchNewWindow (adapt-launchNewWindow-de)

    at /home/jonathan_4091_b/adapt_authoring/lib/contentmanager.js:702:31

    at /home/jonathan_4091_b/adapt_authoring/node_modules/async/dist/async.js:3110:16

    at eachOfArrayLike (/home/jonathan_4091_b/adapt_authoring/node_modules/async/dist/async.js:1069:9)

    at eachOf (/home/jonathan_4091_b/adapt_authoring/node_modules/async/dist/async.js:1117:5)

    at Object.eachLimit (/home/jonathan_4091_b/adapt_authoring/node_modules/async/dist/async.js:3172:5)

    at processPluginLocations (/home/jonathan_4091_b/adapt_authoring/lib/contentmanager.js:689:13)

    at processPlugin (/home/jonathan_4091_b/adapt_authoring/lib/contentmanager.js:652:7)

    at /home/jonathan_4091_b/adapt_authoring/lib/contentmanager.js:636:15

    at /home/jonathan_4091_b/adapt_authoring/node_modules/async/dist/async.js:3110:16

    at replenish (/home/jonathan_4091_b/adapt_authoring/node_modules/async/dist/async.js:1011:17)

    at /home/jonathan_4091_b/adapt_authoring/node_modules/async/dist/async.js:1016:9

    at eachLimit$1 (/home/jonathan_4091_b/adapt_authoring/node_modules/async/dist/async.js:3196:24)

    at Object.<anonymous> (/home/jonathan_4091_b/adapt_authoring/node_modules/async/dist/async.js:1046:16)

    at /home/jonathan_4091_b/adapt_authoring/lib/contentmanager.js:635:19

    at /home/jonathan_4091_b/adapt_authoring/node_modules/mongoose/lib/model.js:4638:16

    at /home/jonathan_4091_b/adapt_authoring/node_modules/mongoose/lib/utils.js:264:16

    at _hooks.execPost (/home/jonathan_4091_b/adapt_authoring/node_modules/mongoose/lib/query.js:4320:11)

    at /home/jonathan_4091_b/adapt_authoring/node_modules/mongoose/node_modules/kareem/index.js:135:16

    at _combinedTickCallback (internal/process/next_tick.js:131:7)

    at process._tickDomainCallback (internal/process/next_tick.js:218:9)

 

The situation is that previously I'd made language variants of another extension successfully. I tried the same approach with Launch New Window (so not core) and I guess I shouldn't have done that. Honestly I'm not a total idiot, even if it looks like I am! Launch New Window was already in and I imported the -de version. I thought I'd made it specific. But obviously not.

Picture of Matt Leathes
Re: Error An error occurred while getting schemas - it's a bad day
by Matt Leathes - Tuesday, 17 September 2019, 5:05 PM
 
"Honestly I'm not a total idiot, even if it looks like I am!"

If it makes you feel any better, I've been working on Adapt since around the v2.0.0 release and I STILL make stupid mistakes like this when working with the Authoring tool...!

Picture of Chuck Lorenz
Re: Error An error occurred while getting schemas - it's a bad day
by Chuck Lorenz - Tuesday, 17 September 2019, 5:21 PM
 

"Honestly I'm not a total idiot," LOL! nah, we all take calculated risks in order to get things done. And sometimes something goes awry. Been there.

I suspect that you have several variations on adapt-launchNewWindow loading in your project, such as adapt-launchNewWindow-de and adapt-launchNewWindow, and that they are both/all referencing the same key: "_launchNewWindow"

Can you check the bower.json of each and see if they all have the same value of "targetAttribute"? If they are the same, you might try renaming it in the duplicated versions to ensure unique values, like "_launchNewWindowDE". If you go this route, you'll also have to update "_launchNewWindow" in the associated properties.schema. Increment the version of adapt-launchNewWindow-de and upload to the AAT.

I highly recommend that you proceed carefully and conservatively; the steps above illustrate the calculated risk I would be taking. Ensure that there is in the AAT a version of adapt-launchNewWindow that uses the original name and the original "target attribute" of "_launchNewWindow" until you have alternatives uploaded and enabled in the course. Again, data is likely to be lost if you delete any of the plugins that are currently using the "target attribute" of "_launchNewWindow". The AAT may want to delete your configuration data if it cannot find the plugin that was originally in use or it may throw an error if it cannot find "_launchNewWindow".

(If you have the luxury of time, you might also want to wait to see if anyone else weighs in.)

 

 

Picture of Jonathan Briggs
Re: Error An error occurred while getting schemas - it's a bad day
by Jonathan Briggs - Wednesday, 18 September 2019, 11:59 AM
 

So I'm back up and running, without any damage. The solution was here:

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

And also big thanks to Simon Date for being on call.