WebRTC SDK unable to run 'sample' on Windows & Linux (Ubunt/Centos)

Hello,
I'v succeeded to run start:sample on Macbook, but not on the other OS. I've been trying to run WebRTC SDK sample on Windows & Linux.Please let me get some help for the following issues.

< Windows >

  • After executing 'npm run start:sample', I can access via localhost, but connot do via port forwarding.
    (Port forwarding condition is verified with a different web-server program.)
  • Tried to specify 'host' on the 'start' script, but no effect. ( "start": "stupid-server -s -p 8443 -h 192.168.0.120" )

< Linux >

  • I've tried on Ubuntu18, Centos7. I cannot access 'localhost:8443/test/test-pages/dev'. Error tells me 'ERR_EMPTY_RESPONSE'.
  • Especially, I'm facing some 'entrypoint related errors' while running 'test/test-pages/build-dev.sh' :
    > [0] sdk-sample.js 3.47 MiB null [emitted] null
    > [0] sdk-sample.js.map 3.41 MiB null [emitted] [dev] null
    > [0] Entrypoint null = sdk-sample.js sdk-sample.js.map
    > [0] [../../src/client-private.ts] /home/jbmpark/work/genesys-cloud-webrtc-sdk/src/client-private.ts 7.68 KiB {null} [built]
    > [0] [../../src/client.ts] /home/jbmpark/work/genesys-cloud-webrtc-sdk/src/client.ts 54.5 KiB {null} [built]
    > [0] [../../src/conversations/conversation-update.ts] /home/jbmpark/work/genesys-cloud-webrtc-sdk/src/conversations/conversation-update.ts 1.47 KiB {null} [built]
    > [0] [../../src/logging.ts] /home/jbmpark/work/genesys-cloud-webrtc-sdk/src/logging.ts 1.32 KiB {null} [built]
    > [0] [../../src/media/headset.ts] /home/jbmpark/work/genesys-cloud-webrtc-sdk/src/media/headset.ts 20 KiB {null} [built]
    > [0] [../../src/media/media.ts] /home/jbmpark/work/genesys-cloud-webrtc-sdk/src/media/media.ts 71.5 KiB {null} [built]
    > [0] [../../src/sessions/session-manager.ts] /home/jbmpark/work/genesys-cloud-webrtc-sdk/src/sessions/session-manager.ts 41.3 KiB {null} [built]
    > [0] [../../src/types/enums.ts] /home/jbmpark/work/genesys-cloud-webrtc-sdk/src/types/enums.ts 1.52 KiB {null} [built]
    > [0] [../../src/types/interfaces.ts] /home/jbmpark/work/genesys-cloud-webrtc-sdk/src/types/interfaces.ts 457 bytes {null} [built]
    > [0] [../../src/utils.ts] /home/jbmpark/work/genesys-cloud-webrtc-sdk/src/utils.ts 5.82 KiB {null} [built]
    > [0] [./dev/common/app-controller.js] 7.77 KiB {null} [built]
    > [0] [./dev/common/main.js] 1.34 KiB {null} [built]
    > [0] [./dev/common/sdk-controller.js] 38.1 KiB {null} [built]
    > [0] [./dev/common/utils.js] 1.01 KiB {null} [built]
    > [0] [./dev/sdk-proxy.js] 107 bytes {null} [built]

If any guides exist, please let me receive. Or please help me for these issues.

@jbmpark Sorry you've been experiencing issues. We probably need to go through our scripts and name them better, but will you please try it with npm run build-run-local then try going to https://localhost:8443/test/test-pages/dev. It doesn't force https and I believe you get the EMPTY_RESPONSE when you hit the http url.

@jensen.gar
Thank you for your suggestion, but no difference I got.
First of all, 'npm run build-run-local' does not finish. I think there is some 'path' issue on Linux. I've only changed the build file 'build-dev.sh' to use /bin/bash (added #!/bin/bash) after facing 'popd not found' issue.
Here is a log :

> genesys-cloud-webrtc-sdk@7.3.3 build-run-local
> concurrently "./test/test-pages/build-dev.sh" "npm start"

[0] ~/work/genesys-cloud-webrtc-sdk/test/test-pages ~/work/genesys-cloud-webrtc-sdk
[0] Building dev sample...
*[1] *
[1] > genesys-cloud-webrtc-sdk@7.3.3 start
[1] > stupid-server -s -p 8443 -h 192.168.0.15
*[1] *
[1] Listening on 192.168.0.15:8443...
*[0] *
[0] webpack is watching the files...
*[0] *
[0] Browserslist: caniuse-lite is outdated. Please run:
[0] npx browserslist@latest --update-db
[0] Why you should do it regularly: https://github.com/browserslist/browserslist#browsers-data-updating
[0] Hash: 8c90184c51ed87e0c021
[0] Version: webpack 4.46.0
[0] Time: 5080ms
[0] Built at: 08/17/2022 5:50:56 PM
[0] Asset Size Chunks Chunk Names
*[0] 0.sdk-sample.js 2.54 KiB 0 [emitted] *
*[0] 0.sdk-sample.js.map 1.83 KiB 0 [emitted] [dev] *
*[0] 1.sdk-sample.js 19.3 KiB 1 [emitted] *
*[0] 1.sdk-sample.js.map 18.2 KiB 1 [emitted] [dev] *
*[0] 2.sdk-sample.js 2.18 KiB 2 [emitted] *
*[0] 2.sdk-sample.js.map 1.27 KiB 2 [emitted] [dev] *
[0] sdk-sample.js 3.47 MiB null [emitted] null
[0] sdk-sample.js.map 3.41 MiB null [emitted] [dev] null
[0] Entrypoint null = sdk-sample.js sdk-sample.js.map
[0] [../../src/client-private.ts] /home/jbmpark/work/genesys-cloud-webrtc-sdk/src/client-private.ts 7.68 KiB {null} [built]
[0] [../../src/client.ts] /home/jbmpark/work/genesys-cloud-webrtc-sdk/src/client.ts 54.5 KiB {null} [built]
[0] [../../src/conversations/conversation-update.ts] /home/jbmpark/work/genesys-cloud-webrtc-sdk/src/conversations/conversation-update.ts 1.47 KiB {null} [built]
[0] [../../src/logging.ts] /home/jbmpark/work/genesys-cloud-webrtc-sdk/src/logging.ts 1.32 KiB {null} [built]
[0] [../../src/media/headset.ts] /home/jbmpark/work/genesys-cloud-webrtc-sdk/src/media/headset.ts 20 KiB {null} [built]
[0] [../../src/media/media.ts] /home/jbmpark/work/genesys-cloud-webrtc-sdk/src/media/media.ts 71.5 KiB {null} [built]
[0] [../../src/sessions/session-manager.ts] /home/jbmpark/work/genesys-cloud-webrtc-sdk/src/sessions/session-manager.ts 41.3 KiB {null} [built]
[0] [../../src/types/enums.ts] /home/jbmpark/work/genesys-cloud-webrtc-sdk/src/types/enums.ts 1.52 KiB {null} [built]
[0] [../../src/types/interfaces.ts] /home/jbmpark/work/genesys-cloud-webrtc-sdk/src/types/interfaces.ts 457 bytes {null} [built]
[0] [../../src/utils.ts] /home/jbmpark/work/genesys-cloud-webrtc-sdk/src/utils.ts 5.82 KiB {null} [built]
[0] [./dev/common/app-controller.js] 7.77 KiB {null} [built]
[0] [./dev/common/main.js] 1.34 KiB {null} [built]
[0] [./dev/common/sdk-controller.js] 38.1 KiB {null} [built]
[0] [./dev/common/utils.js] 1.01 KiB {null} [built]
[0] [./dev/sdk-proxy.js] 107 bytes {null} [built]
[0] + 557 hidden modules
*[0] *
[0] WARNING in /home/jbmpark/work/genesys-cloud-webrtc-sdk/src/types/interfaces.ts 3:0-41
[0] "export 'IPendingSession' was not found in 'genesys-cloud-streaming-client'
[0] @ /home/jbmpark/work/genesys-cloud-webrtc-sdk/src/client.ts
[0] @ ./dev/sdk-proxy.js
[0] @ ./dev/common/sdk-controller.js
[0] @ ./dev/common/app-controller.js
[0] @ ./dev/common/main.js
*[0] *
[0] WARNING in /home/jbmpark/work/genesys-cloud-webrtc-sdk/src/types/interfaces.ts 3:0-41
[0] "export 'ISessionInfo' was not found in 'genesys-cloud-streaming-client'
[0] @ /home/jbmpark/work/genesys-cloud-webrtc-sdk/src/client.ts
[0] @ ./dev/sdk-proxy.js
[0] @ ./dev/common/sdk-controller.js
[0] @ ./dev/common/app-controller.js
[0] @ ./dev/common/main.js
*[0] *
[0] WARNING in ./dev/common/sdk-controller.js 120:43-49
[0] "export 'getSdk' was not found in '../sdk-proxy'
[0] @ ./dev/common/app-controller.js
[0] @ ./dev/common/main.js

Hello, first I want to echo Garrett's sentiments and apologize for the issues you are currently facing. As for the logs you are seeing after running npm run build-run-local, I ran it on my end and got roughly the same except for a few small changes. Then navigating to the page behaved as expected. When I first started working on the SDK however (on a Windows machine), there was something I had to do and that seemingly helped with the process. I created a new script in the package.json called build:all. I am not sure if it is needed or will help but I started noticing differences after it. The script looks like this "build:all": "npm run build && npm run build:cjs && npm run build:es && npm run build:cdn && npm run build:sample". Again not sure how necessary this is but it ensures everything gets built. Once that completes, then I run npm run build-run-local. Let me know if this helps in anyway. If not, I can try and continue to provide assistance.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.