Comments (26)
@jmillan @nazar-pc are we ok with the temporary solution I suggest in my comment above?
executeCmd('rd /s /q worker\\out\\msys', /* exitOnError */ false);
from mediasoup.
Asking to a workmate.
from mediasoup.
So @nazar-pc, I fail to understand that possible reason. It's not possible.
I do not know how/what/where, but it is clear that the files are not there. Or maybe they are extracted into worker/out/msys
, but it is not worker/out/msys
that we think it is or something (maybe pwd
inside of Python script is different, so it extracts files elsewhere, providing an absolute path would fix that particular issue).
from mediasoup.
Windows ecosystem is pathetic. I've google the above error and there are just tons of posts telling you to reinstall Windows, format HD, etc.
from mediasoup.
@haiyangwu @nazar-pc maybe you know something about this recent error in Windows?
from mediasoup.
Looks like it is a cleanup step after getmake.py
, maybe make
was not fixed to a specific version and has changed now?
from mediasoup.
A workaround is to avoid error being thrown in the cleanWorkerArtifacts()
function as follows:
executeCmd('rd /s /q worker\\out\\msys', /* exitOnError */ false);
So basically we do not clean worker artifacts after building the worker, which IMHO is not that bad.
Looks like it is a cleanup step after
getmake.py
, maybemake
was not fixed to a specific version and has changed now?
Absolutely no idea. getmake.py
clearly run this:
get('https://sourceforge.net/projects/mingw/files/MSYS/Base/make/make-3.81-3/make-3.81-3-msys-1.0.13-bin.tar.lzma/download', '847f0cbbf07135801c8e67bf692d29b1821e816ad828753c997fa869a9b89988')
And it does this at the beginning (I have no idea what it is about) which clearly extracts stuff into 'worker/out/msys' folder.
def get(url, digest):
data = urllib.request.urlopen(url).read()
assert hashlib.sha256(data).hexdigest() == digest
tar = tarfile.open(fileobj=io.BytesIO(data))
tar.extractall('worker/out/msys')
tar.close()
from mediasoup.
I would prefer to understand why it happens though. Are you able to spin up a Windows VM to see what is actually going on in file system there?
from mediasoup.
Definitely I don't have any (virtual) Windows setup to test :(
from mediasoup.
I have an idea: create a temporal PR that catches that error and then prints the content of the worker/out/msys folder (if it exists, and it should because postinstall installed things in there). Do you know the exact command for that? Is it dir worker\\out\\msys?
from mediasoup.
I mean you can install any VM management (like VirtualBox Parallels, VmWare), download official Windows ISO and install it in a VM. Then you will have, that is how I debugged some Windows issues, I don't run Windows daily either.
from mediasoup.
Yes, but I'm super busy with tons of tasks (specially at work) and honestly I cannot deal with virtual machines right now.
from mediasoup.
I have an idea: create a temporal PR that catches that error and then prints the content of the worker/out/msys folder (if it exists, and it should because postinstall installed things in there). Do you know the exact command for that? Is it
dir worker\\out\\msys?
If you want to debug it in CI then makes sense to me, but only as a debugging step. Would be great if someone on Windows debugged this though.
from mediasoup.
Hi! I have tried to install mediasoup on my windows machine, and it works for me.
C:\Users\arcan\git\test>npm i mediasoup
added 21 packages in 6m
6 packages are looking for funding
run `npm fund` for details
- [email protected]
- Microsoft Visual Studio Community 2019 Version 16.11.9
- Windows 11 Home 22H2 22621.2428
msys folder is not present after installation
C:\Users\arcan\git\test\node_modules\mediasoup\worker\out>ls
Release/
Some output from postinstall
The Meson build system
Version: 1.2.1
Source dir: C:\Users\arcan\git\test\node_modules\mediasoup\worker
Build dir: C:\Users\arcan\git\test\node_modules\mediasoup\worker\out\Release\build
Build type: native build
Project name: mediasoup-worker
Project version: undefined
C compiler for the host machine: cl (msvc 19.29.30139 "Microsoft (R) C/C++ Optimizing Compiler Version 19.29.30139 for x64")
C linker for the host machine: link link 14.29.30139.0
C++ compiler for the host machine: cl (msvc 19.29.30139 "Microsoft (R) C/C++ Optimizing Compiler Version 19.29.30139 for x64")
C++ linker for the host machine: link link 14.29.30139.0
Host machine cpu family: x86_64
Host machine cpu: x86_64
Downloading openssl source from https://www.openssl.org/source/openssl-3.0.8.tar.gz
Download size: 15151328
Downloading: ..........
Downloading openssl patch from https://wrapdb.mesonbuild.com/v2/openssl_3.0.8-1/get_patch
Download size: 11463052
...
Deleting C:\Users\arcan\git\test\node_modules\mediasoup\worker\subprojects\libsrtp-2.5.0
Deleting C:\Users\arcan\git\test\node_modules\mediasoup\worker\subprojects\packagecache\openssl-3.0.8.tar.gz
Deleting C:\Users\arcan\git\test\node_modules\mediasoup\worker\subprojects\packagecache\openssl_3.0.8-1_patch.zip
Deleting C:\Users\arcan\git\test\node_modules\mediasoup\worker\subprojects\openssl-3.0.8
make: Leaving directory `/c/Users/arcan/git/test/node_modules/mediasoup/worker'
npm-scripts [INFO] [postinstall] executeCmd(): make clean-pip -C worker
make: Entering directory `/c/Users/arcan/git/test/node_modules/mediasoup/worker'
rm -f -rf /c/Users/arcan/git/test/node_modules/mediasoup/worker/out/pip
make: Leaving directory `/c/Users/arcan/git/test/node_modules/mediasoup/worker'
npm-scripts [INFO] [postinstall] executeCmd(): rd /s /q worker\out\msys
npm info run [email protected] postinstall { code: 0, signal: null }
which seems like the folder msys was there and the command deleted it sucesfully. If I execute command after installation, it says error
C:\Users\arcan\git\test\node_modules\mediasoup>rd /s /q worker\out\msys
The system cannot find the file specified.
which leads me to conclusion that the CI build did not created msys folder. When I create msys folder manually and run the command again, it executes without error and deletes the folder. So the command itself works as expected.
from mediasoup.
Only differences I see are
- CI mscv
19.35
, my machine19.29
- CI using
mingw32-make
, my machine justmake
- CI pip
23
, my machine pip21
my make
GNU Make 3.81
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
This program built for i686-pc-msys
from mediasoup.
Thanks @ArcanisCz, super useful.
from mediasoup.
If the problem is only a failing command in case folder does not exist, maybe smth like https://stackoverflow.com/questions/14502612/delete-a-directory-and-its-files-using-command-line-but-dont-throw-error-if-it can be usefull?
Or the real underlying problem is that the msys
folder is not created and should have been there always?
from mediasoup.
Do you want me to see contents of the folder before deletion on my system?
from mediasoup.
If the problem is only a failing command in case folder does not exist, maybe smth like https://stackoverflow.com/questions/14502612/delete-a-directory-and-its-files-using-command-line-but-dont-throw-error-if-it can be usefull?
That's basically the solution I suggested before. See #1179 (comment)
But it's not a nice solution because worker\out\msys
folder SHOULD exist at that point. I've explained all the flow in the issue description above (updated right now). It's impossible that such a folder doesn't exist at that time when compilation finishes.
Do you want me to see contents of the folder before deletion on my system?
Yes please. Not sure if you need to checkout mediasoup repo for that.
from mediasoup.
The only possible reason for worker/out/msys
to not exist is for file extraction to fail, which explains why wrong make
is used as described above.
from mediasoup.
The folder is there from basically start of postinstall script (when meson/python initializes) and its there due to postinstall (was not created when I --ignore-scripts)
from mediasoup.
That is how it should be. If CI fails then in CI downloading/extraction flow is broken for some reason.
from mediasoup.
In case you want to see full output from my machine:
Not sure how can I help more now, if you need me to test/try anything please ping me 🙏
from mediasoup.
The only possible reason for
worker/out/msys
to not exist is for file extraction to fail, which explains why wrong make is used as described above.
Wow, but... if file extraction fails then it means that getmake.py
script failed, and if it failed it means that executeCmd(
${String(res.stdout).trim()} worker\scripts\getmake.py)
did throw, and hence installMsysMake()
did also throw, and hence buildWorker()
did also throw, and if so the whole script terminates and cleanWorkerArtifacts()
CANNOT be executed so it cannot fail.
So @nazar-pc, I fail to understand that possible reason. It's not possible.
from mediasoup.
In case you want to see full output from my machine:
Your logs say that everything is fine and the whole thing behaves as expected:
npm-scripts [INFO] [postinstall] buildWorker()
npm-scripts [INFO] [postinstall] installMsysMake()
npm-scripts [INFO] [postinstall] executeCmd(): C:\Users\arcan\AppData\Local\Programs\Python\Python38\python.exe worker\scripts\getmake.py
npm-scripts [INFO] [postinstall] executeCmd(): make -C worker
...
npm-scripts [INFO] [postinstall] executeCmd(): rd /s /q worker\out\msys
npm info run [email protected] postinstall { code: 0, signal: null }
Not sure how can I help more now, if you need me to test/try anything please ping me 🙏
Thanks!
from mediasoup.
Or maybe they are extracted into
worker/out/msys
, but it is notworker/out/msys
that we think it is or something (maybepwd
inside of Python script is different, so it extracts files elsewhere, providing an absolute path would fix that particular issue).
from mediasoup.
Related Issues (20)
- Memory leak HOT 6
- Multi-thread bug when using usrsctp in N Worker threads in Rust HOT 1
- opus dtx incorrectly judged HOT 7
- Possible missing break in H264_SVC::ParseSingleNalu()
- Must join all XxxConsumer classes into a single one
- set MS_LOG_DEV_LEVEL 3, lead to build errors HOT 1
- #define MS_LOG_DEV_LEVEL 3, build error HOT 1
- SeqManager<T>::SeqLowerThan() crashes when used as compare function in abseil set or map (only in debug mode) HOT 24
- Use uint64_t for containers with RTP seq number as key
- arm64 prebuilt binaries are replacing x64 ones HOT 4
- test-PipeTransport.ts randomly fails HOT 2
- RtpPacket::SetPayloadLength get wrong payloadLength HOT 2
- Possible memory leak HOT 34
- DataConsumer::SendMessage cause onQueuedCallback* cb leak and DATACONSUMER_SEND have no response HOT 1
- FeedbackRtpTransport.cpp may have an overflow mistake HOT 9
- Worker crash when closing `WebRtcServer` if there are TCP connections active HOT 2
- Mediasoup worker died, exiting in 2 seconds... HOT 2
- [Rust] Error log “XXX closing failed on drop: Channel already closed”
- Add interface for RTC::Shared, Channel::ChannelNotifier and ChannelMessageRegistrator HOT 3
- [Rust] Transport with only audio producer results in server-side transport cc is not created. HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mediasoup.