openvsx icon indicating copy to clipboard operation
openvsx copied to clipboard

Invalid character found in field 'description'

Open bilucodota opened this issue 4 years ago • 7 comments
trafficstars

While VScode market place allows the use of emojis in desription. Ovsx fail for it.

image

bilucodota avatar Mar 03 '21 07:03 bilucodota

Ok the validation is too strict then: https://github.com/eclipse/openvsx/blob/a9154dc61d4aa50b9e6c7fcf60f8c3827aa3047e/server/src/main/java/org/eclipse/openvsx/ExtensionValidator.java#L132-L137

spoenemann avatar Mar 03 '21 08:03 spoenemann

I want to work on it

AbhiSahane0 avatar Mar 05 '21 14:03 AbhiSahane0

So, I have to add emojis there

AbhiSahane0 avatar Mar 09 '21 12:03 AbhiSahane0

Or to add description there

AbhiSahane0 avatar Mar 09 '21 12:03 AbhiSahane0

eclipse-workspace - openvsx_server_src_main_java_org_eclipse_openvsx_ExtensionValidator java - Eclipse IDE 09-03-2021 22_57_14 Sir, now it is solved, I think . This is because the Inverted Quma's("") which are not properly arranged, I think . I have pin the image of correction plzz look up at this and anything else plzz let me know sir.

AbhiSahane0 avatar Mar 10 '21 07:03 AbhiSahane0

@spoenemann any plans to get it working soon? Should I issue a PR?

bilucodota avatar Jun 16 '21 10:06 bilucodota

Sure, contributions are welcome!

spoenemann avatar Jun 16 '21 13:06 spoenemann

Hello, I wanted to look at this issue so I tried to reproduce this error but failed. I created an extension for tests and inserted some emojis in the description field in the package.json file.

{
   "name": "emojitest",
   "displayName": "helloWorld",
   "description": "adding emojis: šŸ“±šŸ’»šŸ˜„",
   "version": "0.0.1",
   "publisher": "Yining",
   "engines": {
       "vscode": "^1.71.0"
   },
   "categories": [
       "Other"
   ],
   "activationEvents": [
       "onCommand:emojitest.helloWorld",
   ],
   "main": "./out/extension.js",
   "contributes": {
       "commands": [
           {
               "command": "emojitest.helloWorld",
               "title": "Hello World new name"
           }
       ]
   },
   "scripts": {
       "vscode:prepublish": "npm run compile",
       "compile": "tsc -p ./",
       "watch": "tsc -watch -p ./",
       "pretest": "npm run compile && npm run lint",
       "lint": "eslint src --ext ts",
       "test": "node ./out/test/runTest.js"
   },
   "devDependencies": {
       "@types/vscode": "^1.71.0",
       "@types/glob": "^7.2.0",
       "@types/mocha": "^9.1.1",
       "@types/node": "16.x",
       "@typescript-eslint/eslint-plugin": "^5.27.0",
       "@typescript-eslint/parser": "^5.27.0",
       "eslint": "^8.16.0",
       "glob": "^8.0.3",
       "mocha": "^10.0.0",
       "typescript": "^4.7.2",
       "@vscode/test-electron": "^2.1.3"
   },
   "license": "MIT"
}

I wanted to publish this extension to the local instance of OVSX. Following this #https://github.com/eclipse/openvsx/issues/169 I managed to publish this extension without any problems.

$npx ovsx publish -p super_token
Executing prepublish script 'npm run vscode:prepublish'...
 
> [email protected] vscode:prepublish
> npm run compile
 
 
> [email protected] compile
> tsc -p ./
 
WARNING  A 'repository' field is missing from the 'package.json' manifest file.
Do you want to continue? [y/N] y
DONE  Packaged: /tmp/tmp-18084-GxKPIUMs6K7b-.vsix (10 files, 5.36KB)
 
šŸš€  Published yining.emoji v0.0.1

If I go to localhost:3000 I see the extension displayed and the emojis are also in the description.

Ok the validation is too strict then:

https://github.com/eclipse/openvsx/blob/a9154dc61d4aa50b9e6c7fcf60f8c3827aa3047e/server/src/main/java/org/eclipse/openvsx/ExtensionValidator.java#L132-L137

Here line 132 to line 134 specifies the validation condition. I believe the Character type of emojis is 19 and this is not included in any one of the conditions that are considered invalid here.

I’m wondering if you can share how you get that problem and if I’m doing anything wrong when reproducing this. Thank you.

yiningwang11 avatar Oct 06 '22 13:10 yiningwang11

ovsx used an older version of vsce for quite a while. It could be that this older version didn't allow emojis. @yiningwang11 Thanks for reproducing this issue! @bilucodota Please reopen this issue if you still get the same error.

amvanbaren avatar Dec 08 '22 11:12 amvanbaren