Hello i have a web app and i can't pass this issue
My Proxmox mngt is on 10.10.0.15:8006
```
const handleManageVM = async (vmid, node) => {
try {
const authTokens = {
token: account.token,
pveToken: account.pve_token,
csrfToken: account.csrf_token,
};
const [response, error] = await apiRequest('get', `onion/vms/${vmid}/${node}/novnc`, null, authTokens);
if (response) {
const data = response.data;
console.log('Dane sesji noVNC:', data.ticket);
// Set the PVEAuthCookie in the browser's document.cookie
document.cookie = `PVEAuthCookie=${encodeURIComponent(account.pve_token)}; path=/; secure;`;
// Create the WebSocket URL with URL-encoded ticket
const encodedTicket = encodeURIComponent(data.ticket);
const wsUrl = `wss://${config.PROXMOX_SERVER}:8006/api2/json/nodes/${node}/qemu/${vmid}/vncwebsocket?port=${data.port}&vncticket=${encodedTicket}`;
if (consoleRef.current) {
// Clear the previous instance if exists
if (rfbRef.current) {
rfbRef.current.disconnect();
}
// Set up the RFB (noVNC) instance
rfbRef.current = new RFB(consoleRef.current, wsUrl, {
credentials: { password: data.ticket } // Use ticket as the password
});
rfbRef.current.viewOnly = false;
rfbRef.current.scaleViewport = true;
rfbRef.current.addEventListener('connect', () => {
console.log('Connected to VNC server');
});
rfbRef.current.addEventListener('disconnect', () => {
console.log('Disconnected from VNC server');
});
rfbRef.current.addEventListener('credentialsrequired', () => {
console.log('Credentials required');
});
}
} else {
setError('Wystąpił błąd podczas uzyskiwania sesji noVNC: ' + error);
}
} catch (err) {
setError('Wystąpił błąd: ' + err.message);
}
};
```
GETwss://10.10.0.15:8006/api2/json/nodes/proxmax/qemu/100/vncwebsocket?port=5900&vncticket=PVEVNC:66D0A43E::IGM4PMtvYvQnqHPk7C8duOGxiXveg+gz550zZAeLcBYf11gTWGKFgxjKPlDmwLuW67k6iO+EWC4Lu4btihr0T5o/0nRiqRFFL+FoNcLUyrVO0k4sZVVdtsCqCdoXiNF2l0bFqymr6x6MQHUFZKPIZxbs+L0C3mPuOlH96lnLqmWXEnLTlDwARpzZrxpOjFW25ehvSVhIcXjRwGjNycQ9LQuW43angWuU5ArXG04y9BkWHcvuvpmk6iPOllkPecVH/bW4Thuz9ZXX6UuozRNZWcLB9urGEYewccdyQt9IkybGtoN8JRCsrDl2sLCk2ToQuLG1RuJ4CODGQmR4DnGPaw==[HTTP/1.1 401 No ticket 3013ms]
Firefox can’t establish a connection to the server at wss://10.10.0.15:8006/api2/json/nodes/proxmax/qemu/100/vncwebsocket?port=5900&vncticket=PVEVNC%3A66D0A43E%3A%3AIGM4PMtvYvQnqHPk7C8duOGxiXveg%2Bgz550zZAeLcBYf11gTWGKFgxjKPlDmwLuW67k6iO%2BEWC4Lu4btihr0T5o%2F0nRiqRFFL%2BFoNcLUyrVO0k4sZVVdtsCqCdoXiNF2l0bFqymr6x6MQHUFZKPIZxbs%2BL0C3mPuOlH96lnLqmWXEnLTlDwARpzZrxpOjFW25ehvSVhIcXjRwGjNycQ9LQuW43angWuU5ArXG04y9BkWHcvuvpmk6iPOllkPecVH%2FbW4Thuz9ZXX6UuozRNZWcLB9urGEYewccdyQt9IkybGtoN8JRCsrDl2sLCk2ToQuLG1RuJ4CODGQmR4DnGPaw%3D%3D.
apiRequest('get', `onion/vms/${vmid}/${node}/novnc`, null, authTokens); is my middleware for this api call
api2/json/nodes/{node}/qemu/{vmid}/vncproxy
anyone can help? I can provide any info you want
My Proxmox mngt is on 10.10.0.15:8006
```
const handleManageVM = async (vmid, node) => {
try {
const authTokens = {
token: account.token,
pveToken: account.pve_token,
csrfToken: account.csrf_token,
};
const [response, error] = await apiRequest('get', `onion/vms/${vmid}/${node}/novnc`, null, authTokens);
if (response) {
const data = response.data;
console.log('Dane sesji noVNC:', data.ticket);
// Set the PVEAuthCookie in the browser's document.cookie
document.cookie = `PVEAuthCookie=${encodeURIComponent(account.pve_token)}; path=/; secure;`;
// Create the WebSocket URL with URL-encoded ticket
const encodedTicket = encodeURIComponent(data.ticket);
const wsUrl = `wss://${config.PROXMOX_SERVER}:8006/api2/json/nodes/${node}/qemu/${vmid}/vncwebsocket?port=${data.port}&vncticket=${encodedTicket}`;
if (consoleRef.current) {
// Clear the previous instance if exists
if (rfbRef.current) {
rfbRef.current.disconnect();
}
// Set up the RFB (noVNC) instance
rfbRef.current = new RFB(consoleRef.current, wsUrl, {
credentials: { password: data.ticket } // Use ticket as the password
});
rfbRef.current.viewOnly = false;
rfbRef.current.scaleViewport = true;
rfbRef.current.addEventListener('connect', () => {
console.log('Connected to VNC server');
});
rfbRef.current.addEventListener('disconnect', () => {
console.log('Disconnected from VNC server');
});
rfbRef.current.addEventListener('credentialsrequired', () => {
console.log('Credentials required');
});
}
} else {
setError('Wystąpił błąd podczas uzyskiwania sesji noVNC: ' + error);
}
} catch (err) {
setError('Wystąpił błąd: ' + err.message);
}
};
```
GETwss://10.10.0.15:8006/api2/json/nodes/proxmax/qemu/100/vncwebsocket?port=5900&vncticket=PVEVNC:66D0A43E::IGM4PMtvYvQnqHPk7C8duOGxiXveg+gz550zZAeLcBYf11gTWGKFgxjKPlDmwLuW67k6iO+EWC4Lu4btihr0T5o/0nRiqRFFL+FoNcLUyrVO0k4sZVVdtsCqCdoXiNF2l0bFqymr6x6MQHUFZKPIZxbs+L0C3mPuOlH96lnLqmWXEnLTlDwARpzZrxpOjFW25ehvSVhIcXjRwGjNycQ9LQuW43angWuU5ArXG04y9BkWHcvuvpmk6iPOllkPecVH/bW4Thuz9ZXX6UuozRNZWcLB9urGEYewccdyQt9IkybGtoN8JRCsrDl2sLCk2ToQuLG1RuJ4CODGQmR4DnGPaw==[HTTP/1.1 401 No ticket 3013ms]
Firefox can’t establish a connection to the server at wss://10.10.0.15:8006/api2/json/nodes/proxmax/qemu/100/vncwebsocket?port=5900&vncticket=PVEVNC%3A66D0A43E%3A%3AIGM4PMtvYvQnqHPk7C8duOGxiXveg%2Bgz550zZAeLcBYf11gTWGKFgxjKPlDmwLuW67k6iO%2BEWC4Lu4btihr0T5o%2F0nRiqRFFL%2BFoNcLUyrVO0k4sZVVdtsCqCdoXiNF2l0bFqymr6x6MQHUFZKPIZxbs%2BL0C3mPuOlH96lnLqmWXEnLTlDwARpzZrxpOjFW25ehvSVhIcXjRwGjNycQ9LQuW43angWuU5ArXG04y9BkWHcvuvpmk6iPOllkPecVH%2FbW4Thuz9ZXX6UuozRNZWcLB9urGEYewccdyQt9IkybGtoN8JRCsrDl2sLCk2ToQuLG1RuJ4CODGQmR4DnGPaw%3D%3D.
apiRequest('get', `onion/vms/${vmid}/${node}/novnc`, null, authTokens); is my middleware for this api call
api2/json/nodes/{node}/qemu/{vmid}/vncproxy
anyone can help? I can provide any info you want