Hi, I’m having issues with running a websocket server connection with manifest version 5. I’m not getting any error logs. When I switch back to version 4 everything is working correctly. I couldn’t find any info on what changes with version 5 that could cause my problem.
here is my index.js:
async function connectToPythonWebSocket() {
const ws = new WebSocket("ws://127.0.0.1:9000");
ws.addEventListener("open", () => {
console.log("Connected to Python WebSocket server");
});
ws.addEventListener("message", (event) => {
console.log("Received data:", event.data);
const data = JSON.parse(event.data);
processFolderData(data.folder_count, data.folder_names).then(() => {
// console.log("Data processed");
});
});
ws.addEventListener("error", (error) => {
console.error("WebSocket error:", error);
});
}
connectToPythonWebSocket();
function processFolderData(folder_count, folder_names) {
return new Promise((resolve) => {
//..some code..
const folderDataReceivedEvent = new CustomEvent('folderDataReceived', {
detail: {
folder_count: folder_count,
folder_names: filteredFolderNames
}
});
document.dispatchEvent(folderDataReceivedEvent);
resolve();
});
}
my manifest.json:
{
"id": "Test-s92ugg",
"name": "broken plugin",
"version": "1.0.0",
"main": "index.html",
"dependencies": {
"@adobe/uxp": "^1.0.0",
"ws": "^8.0.0"
},
"requiredPermissions": {
"launchProcess": {
"schemes": [
"https",
"mailto",
"file"
],
"extensions": [
".pdf"
]
},
"network": {
"domains": [
"https://cc-extensions.com"
]
},
"allowCodeGenerationFromStrings": true,
"localFileSystem": "plugin",
"clipboard": "read"
},
"pub_date": null,
"host": [
{
"app": "PS",
"minVersion": "24.4.1",
"data": {
"apiVersion": 2
}
}
],
"manifestVersion": 5,
"entrypoints": [
{
"type": "panel",
"id": "vanilla"
}
]
}
and package.json:
{
"name": "te-asset-exporter",
"version": "1.0.0",
"description": "a plugin that processes images and saves them in folders",
"author": "Adobe Inc",
"license": "Apache-2.0",
"dependencies": {
"ws": "^8.13.0"
}
}
Any information on that or ideas would be much appreciated!