Closed justM4D closed 6 months ago
I have also noticed this behavior. However, as I only recently started using Teddycloud, I thought I had made a mistake during the installation.
What always works for me at the moment is the browser's incognito mode. This prevents the container from crashing.
I have also tried deactivating all extensions, but even then the container crashes in normal browser mode when I go to the Teddycloud website.
It would be interesting to have to http communication to the source of the crash.
What always works for me at the moment is the browser's incognito mode. This prevents the container from crashing.
Good catch. I can confirm it works in incognito mode.
It would be interesting to have to http communication to the source of the crash.
I'd try debugging the problem, but I'm not set up for c++ development and am a bit short on time for fun like that. If you have a tip on what I can do to help, I'll try.
I think it may already help to catch the data from the browser send to the cloud
After it loaded successfully in incognito mode, it now also works in a normal browser session without crashing, even after restarting the container and whole host VM.
So I can't recreate it now :(
May be related to
https://github.com/toniebox-reverse-engineering/teddycloud/issues/121
Unfortunately, I am not a software developer or network specialist. However, I was able to use Wireshark to record the network traffic in "normal" browser mode and in incognito mode. I noticed something that might help to narrow down the problem. In the first screenshot you can see that the error occurs about 1.3 seconds after starting the communication with the server.
I then filtered for HTTP. In the second screenshot you can see the communication with the server crash on the left and the communication without crash in incognito mode on the right.
The HTTP packets are smaller in incognito mode and, above all, no cookies are transmitted. Since Grafana is also running on my Docker server, for example, the cookie for Grafana is probably also transmitted by the browser. However, Grafana and Teddycloud have different ports and I don't know whether this is a browser error or normal behavior because the IP address is identical. You can also see that there is no response to the /v1/time HTTP/1.1 packet on the left side.
Anyway, after I cleared the browser cache, I was able to communicate with Teddycloud again in "normal" browser mode without causing a crash.
P.S: My native language is German and since my English is unfortunately only rudimentary, I used DeepL to translate this text.
Thank you for digging in. This may help me to reproduce the problem and fix it.
I have saved the log files. If it would help, I could also make these files available. But I would need some help or a good program or script to anonymize the files.
The previous info is already enough.
I just retried it on my other computer and it crashes again. I think dermigoe might be right about the cookies.
I've played around with different configurations of running teddycloud directly on my unraid or in a separate vm, but I've always renamed the host to "tc", so it's reachable as "tc.fritz.box".
My browser has several cookies saved for the domain "tc.fritz.box" now, which are meant for other services.
After restarting the service and re-activating the tc-tab (without a refresh), it crashed again. I deleted the cookies, and now it works in normal browser mode.
So my assumption is that either the existance of "any" cookie crashes the service, or some special value might be the culprit. Since the server is running with c, it might be as simple as a string not being terminated properly, leading to the buffer overflow in my original log.
This cookie looks like it might have a null value, which also might be problematic, if uncaught.
It seems to be happening if the cookie length is over a certain limit. Clearing the cookies may be a workaround.
I've narrowed it down to a length issue. For example:
[ { "domain": "tc.fritz.box", "hostOnly": true, "httpOnly": false, "name": "foo", "path": "/", "sameSite": "unspecified", "secure": false, "session": true, "storeId": "0", "value": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "id": 2 } ]
causes it to crash
I increased the server buffer to 32kB in the develop branch. This should fix it.
I can try it out in case you have a dev branch docker image somewhere. Otherwise I'd have to get a dev environment set up first
Yes, there is a develop tag on docker for that.
The error (only allowing up to 512 Byte for the header) was found and upgraded to 32kb. That should be more than enough for any normal user.
I'd say this is fixed :)
Version: tc_v0.3.5@sha256:c3944721895dee3cdf50d1b5713bdc1a22e429e252b3ef1e11d6747171321d39 System: Unraid as Docker and from within a VM with Docker, both times with its own IP
I had the service running once successfully and got it somewhat configured and connected to the toniebox.
A few days later (without changing anything as far as I know) I couldn't get it to run again.
I tried
Just now I noticed that after starting the service and just looking at the log, it does interact with my box (like changing the Tonie and even sends it "local" content for my custom ID). But as soon as I open the website, it gets loaded and the service crashes down with following log output:
This is what the Browser Dev Tools show as errors: