UnityRenderStreaming icon indicating copy to clipboard operation
UnityRenderStreaming copied to clipboard

[BUG]: Failed to use locally packed WebApp

Open xiasun opened this issue 2 years ago • 2 comments

Package version

3.1.0-exp.4

Environment

* OS: Windows 11
* Unity version: 2021.3.10
* Graphics API: DirectX11
* Browser: Chrome 106

Steps To Reproduce

I ran npm run pack to pack a webserver.exe with npm run pack locally ( with no modification on commit 2080d509b74bda6af9c14d3014a4ee612b935906 )

After webserver.exe was generated, I started it with webserver.exe -w.

Then I start the game, and launch page http://localhost/videoplayer/index.html in chrome, following error was printed from browser console:

 Failed to load resource: the server responded with a status of 404 (Not Found)    signaling.js:1 
 Failed to load resource: the server responded with a status of 404 (Not Found)    peer.js:1 
 Failed to load resource: the server responded with a status of 404 (Not Found)    logger.js:1 
 Failed to load resource: the server responded with a status of 404 (Not Found)    keymap.js:1 

If I run server with run.bat, everyting is fine.

Current Behavior

No response

Expected Behavior

No response

Anything else?

No response

xiasun avatar Oct 18 '22 08:10 xiasun

I had a similar issue with the latest webserver build on Windows and on Linux. I think there are a few JS files that aren't being included in the build. UnityRenderStreaming-3.1.0-exp.4/WebApp/client/src/renderstreaming.js UnityRenderStreaming-3.1.0-exp.4/WebApp/client/src/signaling.js

I see them as 404 in the browser console.

Using the previous version still works.

Also, a dockerized version would be very helpful. I made a Dockerfile, that build a container. Dockerfile.txt

Dockerfile: FROM node

WORKDIR /app

COPY webserver .

RUN chmod -R 777 webserver RUN ./webserver -w &

EXPOSE 80

ChanceTheMaker avatar Oct 18 '22 15:10 ChanceTheMaker

Thank you @ChanceTheMaker, I currently copied the four missing js files into a newly created module folder to make the packing process work, as a temp solution.

But I can't get the point why would it work to call the packed webserver program inside container? There seems to be no difference between calling direcly from host system?

xiasun avatar Oct 19 '22 02:10 xiasun

@xiasun We reproduced the issue and will fix soon. Thank you.

karasusan avatar Oct 25 '22 02:10 karasusan

memo: URS-543

karasusan avatar Oct 25 '22 02:10 karasusan

@karasusan Any news here? When it be possible to fix it?

yslab1 avatar Oct 27 '22 11:10 yslab1

looks great!

xiasun avatar Nov 11 '22 09:11 xiasun