-
-
Notifications
You must be signed in to change notification settings - Fork 488
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Web interface fails after several days #567
Comments
This happens to me as well. MacOS Mojave, Chrome. Restarting Companion fixes it, but I too expect it to run forever. :) |
When this occurs, do you notice anything out of the ordinary in term of processor or RAM utilization? |
I haven't noticed any performance issues, and I never stopped to check. I also recently modified my production Macs to reboot once a week and auto start Companion (among other apps) so I don't see this error hardly at all anymore. |
I have the same Issue with running 24/7. Error is It occurs after arround/little under a week, when I restart it under Admin it then runs for a week but next Sunday it is crashed. I just had the situation that it was running before the Service and after it it was crashed. The issue is just with the web interface, everything else seems to run well for longer. Maybe the logs get to full or something because not all devices run 24/7 and the Modules throw errors or not reachable messages into the log. |
I'm still getting it too. @Phil0 which version of Companion are you running? |
Was using 1.4 on Mojave's but we have updated on Catalina now. I'm inspecting and will give feedback soon! |
I have been using 2.0 for a while now on mojave and still have the issue. |
I use another node app on github that had a similar issue and it has been fixed. It may not be related but could be helpful. karlcswanson/micboard#12 |
This can be duplicated by running the compiled version (I've only gotten it to do it on the compiled version -- see note at the bottom) and then setting your system clock ahead by a year (be sure to disable all running apps when doing this as it may cause havoc on some apps). Some observations I made are:
So in dev mode... when running the app in dev for over 12 hours and then changing the date, I did have it lock up and require a force quit. It's a little bit of a different issue though, and I couldn't get it to always do it so I'm not sure if the issues are related at all or if it was just a fluke. |
My best guess is that express doesn't like serving files out of the asar archive, so it is extracting the files for the web interface to a temp location before serving them, and sometime later the OS is whacking them once they are older than a certain date. |
Hmmm, I compiled with it specifying a hard coded path in my home directory and it still failed after the date changes. I suppose some magic could happen to duplicate the folder, so I can easily check that by editing some files in my hard coded path. I didn't see the folder in the temp folder (/var/folder), but I probably missed it. I'll check again later. That doesn't explain, in my opinion, why the file/folder it is attempting to access changes the last bit for separate web paths (for example, index.html might be |
This smells like «upgrade Electron». The version we’re running is very old. If anyone manages to upgrade it (and keep everything working), I’ll buy them a beer. Or a whole case. |
I do stand corrected on the path thing, I looked into it again and you are right. That might solve all the issues, actually. 😅 Or at least makes me feel less crazy. |
So, I got it to build with Electron 9.2 and Node 12.14.1 so that I could test if that'd fix this issue, and, unfortunately, this particular bug remains. :( I'm going to do more digging, since there must be a config/diff location/something to keep this from happening. |
This was fixed for me for a while, but with the latest dev builds it seems to have popped back up:
|
@onfire4g05 any thoughts? |
Could you send a screenshot of the errors in the chrome console. |
that did not provide the detail I thought it would. my fault not yours |
No problem, here's the network tab: Request URL: http://192.168.10.4:8000/ |
huh, so its the root page that is failing. I was expecting one of the libraries or something to be the problem.. |
so this is surprisingly easy to replicate by after running companion, finding and deleting all the temp files created under /var/folders. What I am finding is that when I do that, then I get the 404 errors. Looking at the build, the files are included inside the electron asar file, which they probably shouldnt. But by forcefully removing those, then it doesnt work at all. So I suspect that either the electron update broke this, or less likely maybe it was never truly fixed.
|
or perhaps we should look into why this happens only for the public folder. various other files are served via express in almost the exact same way, but are not extracted like this. why is that? |
A further update, this is a bigger problem than initially thought. All of the libraries used also break. So the same fix will need to be done for the exposed libraries too. This feels messy, but it will be short-lived code until #1402 is ready |
What I did, was just exclude them from asar. Since when they are in the asar The files will eventually stop working after Companion has been running for so many days. It's been a while since I looked at this, but I don't think the files were actually deleted (deleting the files will obviously cause the error). You can set the time in the future (about 10 days) and it'll always just stop working. |
Take a look at #1193, which fixed the issue by excluding these files from the asar. |
Yeah, the files are still being excluded from the asar, but that version of them simply isnt being used. I somehow missed the fact that the libraries were excluded from the asar too. |
This should be fixed in build 3096 (not 3095, I broke that in another way...) 5e11519 The previous fix was to unpack them from the asar file. Please give it a test, and if noone reports an issue within the next week or so I shall close this |
Describe the bug
I leave Companion running 24/7. After about a week, the web interface looks like there is no CSS. When I try to refresh the page, it gives the following error. This has happened on just about every version that has been available.
Error: ENOENT: no such file or directory, open '/var/folders/80/rgd9416d71sbkwzd_yhmgkl80000gn/T/.companion.bitfocus.no.sBN3AJ'
To Reproduce
Steps to reproduce the behavior:
Expected behavior
I expect it to run forever. :)
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: