I’ve installed the Chat with RTX demo successfully multiple times and on different drives, including the default folder. However, every time I’ve launched the demo, the browser window opens and says “Invalid session. Reopen RTX Chat from desktop to continue chatting.” I am not sure what the root cause of this issue is.
Specs:
Windows 11 Pro 22631.3155
RTX 4090, Driver Version 551.52
Not sure if @svelury solved the issue or not. I originally installed to none default folder and got the issue; then I changed to install to default directory by doing ‘clean install’, but the problem still persists.
Windows 11 Pro 22621.3155
RTX 4090, Driver Version 551.52
I don’t really know what is the deeper issue that is causing this bug, or if it’s just that nvidia didn’t catch the bug. anyway, the following fixes the surface issue and allows the interface to open properly:
First find this file:
C:\Users\{Your user dir}\AppData\Local\NVIDIA\ChatWithRTX\RAG\trt-llm-rag-windows-main\ui\user_interface.py
Find the context of line 298.
Place the following line of code:
key, value = cookie.split(‘=’)
Replace with:
split_index = cookie.find(‘=’) key, value = cookie[:split_index], cookie[split_index+1:]
Save file and restart application.
Remember to take care to make sure the indentation is the same, python is sensitive to this.
The reason why I’m providing the bug fix here is because I don’t really know how to make a community contribution to this RTX Chat from Nvidia.
Anyway the problem with this bug is that nvidia’s code tries to split a cookie directly into strings by ‘=’, but there are times when there is more than one = in the string, such as a ‘=’ that is included by a “”, which causes the 'key, value = ’ code to try to unwrap an array larger than 2.
The solution does not work if you put “Share=true” to create a public URL or specify server name in the Launch() to be 0.0.0.0 inside “user_interface.py”
you still get the issue “Invalid session. Reopen RTX Chat from desktop to continue chatting.” when u access the public URL from other PC or from other PC on LAN if you are setting servername to 0.0.0.0
thank you for the answer. I have also followed that guide, but i still have the same problem. invalid Session when accessing over LAN, it works as expected locally.
this is my edit:
for i, cookie in enumerate(cookies):
split_index = cookie.find(‘=’)
key, value = cookie[:split_index], cookie[split_index+1:]
if key == ‘s_chat’:
session_key = value
2024/march/10 i had the invalid session and i just delete this row of code, after so it never poped out (i have apsolte no idea what problem it has but i mean now can i just browse it by lan
Open with your favorite text/code editor this file:
C:\Users%USERPROFILE%\AppData\Local\NVIDIA\ChatWithRTX\RAG\trt-llm-rag-windows-main\ui\user_interface.py
Find the following entry:
key, value = cookie.split(‘=’)
Change this entry to:
key, value = cookie.split(‘=’, 1)