Picture of Fabian Fernandez
Failed to parse schema for package
by Fabian Fernandez - Friday, 5 June 2015, 5:16 PM
 

I'm trying to upload my plugin to adapt authoring without success.
Its says:
"There was an error uploading the plugin:
Failed to parse schema for package adapt-beswift-character"

Any ideas?
I'm attaching a screenshot and my plugin zip file.


Picture of Chuck Lorenz
Re: Failed to parse schema for package
by Chuck Lorenz - Saturday, 6 June 2015, 4:23 PM
 

Hi Fabian,

Is it possible that you are "overcomplicating" the properties.schema? Looks like you have chosen to reproduce the model.schema in your properties.schema. If I am reading your code correctly, it appears that you want to set characterId in addition to the standard component attributes (layout, title, body, etc). Compare your properties.schema with the one found in adapt-contrib-text. It is providing a means for setting an additional property called instruction. Does it make sense in your situation to imitate it with something like this:

"properties":{
"characterId": {
"type":"string",
"required":true,
"title": "Character ID",
"minLength": 1
}

If I have misread your code, can you summarize what you are attempting with your code?

Chuck

Picture of Fabian Fernandez
Re: Failed to parse schema for package
by Fabian Fernandez - Monday, 8 June 2015, 8:13 PM
 

Hi Chuck.
I need to have the characterId property be of type enum os it displays a list of possible values (at least that's what I understand the enum does in this case, correct me if Im wrong).

Attached is my properties.schema file.

Any idea?

 

Picture of Fabian Fernandez
Re: Failed to parse schema for package
by Fabian Fernandez - Monday, 8 June 2015, 8:42 PM
 

I have also tried with the properties.schema file of adapt-contrib-text and it prompts me with the same error, do I have anything else wrong?

https://raw.githubusercontent.com/adaptlearning/adapt-contrib-text/master/properties.schema

Picture of Fabian Fernandez
Re: Failed to parse schema for package
by Fabian Fernandez - Monday, 8 June 2015, 8:33 PM
 

BTW: Ive tried with the propertiesyou shared but it gives me the same error.

Picture of Chuck Lorenz
Re: Failed to parse schema for package
by Chuck Lorenz - Monday, 8 June 2015, 9:05 PM
 

Hi Fabian,

To my eyes the properties.schema you provided looks pretty good. My guess, however, is that the editorOnly line (and the preceding comma) should come out of the characterId object.

 

Chuck

Picture of Fabian Fernandez
Re: Failed to parse schema for package
by Fabian Fernandez - Tuesday, 9 June 2015, 6:10 PM
 

I tried but still same problem :S
I'm starting to think that it has nothing to do with the properties.schema as I tried switching the file with the one used in adapt-contrib-text and the problem was the same... any ideas what else could it be? Any other schema related file?

Picture of Chuck Lorenz
Re: Failed to parse schema for package
by Chuck Lorenz - Tuesday, 9 June 2015, 9:11 PM
 

Yes, Fabian, it seems to be something other than the properties.schema. I successfully uploaded it in my local installation of the authoring tool. I took the zip file you provided, extracted it, replaced the properties.schema with the version you had provided but amended it as I had recommended (deleted "editorOnly" from "characterId), zipped it again, and uploaded through the Plugin Manager. I did not get the "failed to parse" error.

Once in the component editor, however, no fields were available for configuration. So, expect that you still have some issues to confront once you get passed the "failed to parse" error. 

Picture of Chuck Lorenz
Re: Failed to parse schema for package
by Chuck Lorenz - Tuesday, 9 June 2015, 9:17 PM
 

OK, one more change to the properties.schema that made the fields display in the component editor: delete your enum line and add in the inputType as shown below:

"characterId": {
    "type": "string",
    "required": true,
    "inputType": {"type": "Select", "options":["Mario", "Luigi"]},
    "default": "Mario"
}
Picture of Fabian Fernandez
Re: Failed to parse schema for package
by Fabian Fernandez - Wednesday, 10 June 2015, 5:55 PM
 

Seems like I'm not having any luck with this :(
I tried removing again the editorOnly property from charcterId and even changing the enum line to an inputType as you said in the last comment but still I'm receiving the failed to parse schema error message.

Could you please share the zip file containing the plugin you were able to upload?

BTW: I'm running the Adapt Authoring under Win7 64 bit, not sure if this has something to do with it but just wanted to let you know just in case.

My node version is v0.10.33

Thanks a LOT for your time Chuck!

Picture of Chuck Lorenz
Re: Failed to parse schema for package
by Chuck Lorenz - Wednesday, 10 June 2015, 6:29 PM
 

Hey Adapt Community, I'm running out of ideas. Can anyone think of something else that Fabian can check?

I can't speak to any issues with your OS, I'm not running Win7 64. But your node version is what's recommended.

Attached is the zip you requested.

Chuck

Picture of Fabian Fernandez
Re: Failed to parse schema for package
by Fabian Fernandez - Wednesday, 10 June 2015, 9:18 PM
 

Great! It worked and I compared my properties.schema (with the change you said) against the properties.schema you had zipped in your computer. The interesting thing is that (at least on Notepad++) the encoding of my schema is "UTF-8" and yours is "UTF-8 without BOM".

Is that the issue?

Picture of Chuck Lorenz
Re: Failed to parse schema for package
by Chuck Lorenz - Wednesday, 10 June 2015, 11:49 PM
 

Glad you appear to be over that hump, and glad you had the insight to check the encoding. Personally, this is the first time I'm hearing of someone with Adapt running into the BOM issue, but it seems a reasonable cause to me. I had a similarly frustrating experience several years back when working with some XML.

Picture of Fabian Fernandez
Re: Failed to parse schema for package
by Fabian Fernandez - Friday, 19 June 2015, 6:32 PM
 

Yeap, it was the BOM issue.

I'm using Visual Studio to edit the files and that was the reason.
Thanks!