rokudev / samples

Collection of sample channels for side-loading on your Roku device
MIT License
454 stars 290 forks source link

app.mk ping command fails on macos #28

Open GabLeRoux opened 3 years ago

GabLeRoux commented 3 years ago
Checking dev server at 192.168.0.XXX...
ERROR: Device is not responding to ping.

QUICK_PING_ARGS is using Linux's version when running on MacOS and it's using non existing flags on MacOS Big Sur.

See here: https://github.com/rokudev/samples/blob/b6cc2e0e904239c15e6c8af12d8c2c590f2ac8bc/getting%20started/makefile/app.mk#L138

-c 1 is fine, but -w 1 is bad.

Proof

❯ ping -c 1 localhost
PING localhost (127.0.0.1): 56 data bytes
64 bytes from 127.0.0.1: icmp_seq=0 ttl=64 time=0.033 ms

--- localhost ping statistics ---
1 packets transmitted, 1 packets received, 0.0% packet loss
round-trip min/avg/max/stddev = 0.033/0.033/0.033/0.000 ms
❯ ping -c 1 -w 1 localhost
ping: invalid option -- w
usage: ping [-AaDdfnoQqRrv] [-c count] [-G sweepmaxsize]
            [-g sweepminsize] [-h sweepincrsize] [-i wait]
            [-l preload] [-M mask | time] [-m ttl] [-p pattern]
            [-S src_addr] [-s packetsize] [-t timeout][-W waittime]
            [-z tos] host
       ping [-AaDdfLnoQqRrv] [-c count] [-I iface] [-i wait]
            [-l preload] [-M mask | time] [-m ttl] [-p pattern] [-S src_addr]
            [-s packetsize] [-T ttl] [-t timeout] [-W waittime]
            [-z tos] mcast-group
Apple specific options (to be specified before mcast-group or host like all options)
            -b boundif           # bind the socket to the interface
            -k traffic_class     # set traffic class socket option
            -K net_service_type  # set traffic class socket options
            -apple-connect       # call connect(2) in the socket
            -apple-time          # display current time
jduval23 commented 3 years ago

We added SetCertificatesFile() function so roUrlTransfer() function can handle HTTPS content feed

GabLeRoux commented 3 years ago

@jduval23 I don't think the function you mentioned is related to this issue.

I just tried again with what's on master branch right now:

wget https://raw.githubusercontent.com/rokudev/samples/master/getting%20started/makefile/app.mk -O ../app.mk
make install
*** Creating UnsplashScreensaver.zip ***
  >> removing old application zip /Users/gableroux/repos/roku/dist/apps/UnsplashScreensaver.zip
  >> creating destination directory /Users/gableroux/repos/roku/dist/apps
  >> setting directory permissions for /Users/gableroux/repos/roku/dist/apps
  >> copying imports
  >> creating application zip /Users/gableroux/repos/roku/dist/apps/UnsplashScreensaver.zip
  adding: images/channel-poster_hd.png (stored 0%)
  adding: images/channel-poster_sd.png (stored 0%)
  adding: images/channel-poster_fhd.png (stored 0%)
  adding: LICENSE.md (deflated 41%)
  adding: images/ (stored 0%)
  adding: images/splash-screen_sd.jpg (deflated 0%)
  adding: images/splash-screen_fhd.jpg (deflated 0%)
  adding: images/splash-screen_hd.jpg (deflated 0%)
  adding: manifest (deflated 57%)
  adding: source/ (stored 0%)
  adding: source/Main.brs (deflated 55%)
  adding: docs/ (stored 0%)
  adding: docs/header.jpg (deflated 0%)
  adding: README.md (deflated 48%)
  adding: components/ (stored 0%)
  adding: components/ScreensaverFade.xml (deflated 49%)
  adding: components/ScreensaverFade.brs (deflated 62%)
  adding: .env (deflated 11%)
  adding: .env.example (deflated 18%)
*** packaging UnsplashScreensaver complete ***
*** Note: application check not available ***
Checking dev server at 192.168.0.16...
ERROR: Device is not responding to ping.
make: *** [install] Error 1
ping -c 1 192.168.0.16

PING 192.168.0.16 (192.168.0.16): 56 data bytes
64 bytes from 192.168.0.16: icmp_seq=0 ttl=64 time=182.351 ms

--- 192.168.0.16 ping statistics ---
1 packets transmitted, 1 packets received, 0.0% packet loss
round-trip min/avg/max/stddev = 182.351/182.351/182.351/0.000 ms

I'm pretty sure the PR #29 I sent is the right fix and this issue shouldn't be closed.

And here's an actual output of the same of the above, but with the fixed app.mk:

wget https://raw.githubusercontent.com/rokudev/samples/3139c3fa6a43f137720b075c8818cc4c2d2a7f91/getting%20started/makefile/app.mk -O ../app.mk
make install
*** Creating UnsplashScreensaver.zip ***
  >> removing old application zip /Users/gableroux/repos/roku/dist/apps/UnsplashScreensaver.zip
  >> creating destination directory /Users/gableroux/repos/roku/dist/apps
  >> setting directory permissions for /Users/gableroux/repos/roku/dist/apps
  >> copying imports
  >> creating application zip /Users/gableroux/repos/roku/dist/apps/UnsplashScreensaver.zip
  adding: images/channel-poster_hd.png (stored 0%)
  adding: images/channel-poster_sd.png (stored 0%)
  adding: images/channel-poster_fhd.png (stored 0%)
  adding: LICENSE.md (deflated 41%)
  adding: images/ (stored 0%)
  adding: images/splash-screen_sd.jpg (deflated 0%)
  adding: images/splash-screen_fhd.jpg (deflated 0%)
  adding: images/splash-screen_hd.jpg (deflated 0%)
  adding: manifest (deflated 57%)
  adding: source/ (stored 0%)
  adding: source/Main.brs (deflated 55%)
  adding: docs/ (stored 0%)
  adding: docs/header.jpg (deflated 0%)
  adding: README.md (deflated 48%)
  adding: components/ (stored 0%)
  adding: components/ScreensaverFade.xml (deflated 49%)
  adding: components/ScreensaverFade.brs (deflated 62%)
  adding: .env (deflated 11%)
  adding: .env.example (deflated 18%)
*** packaging UnsplashScreensaver complete ***
*** Note: application check not available ***
Checking dev server at 192.168.0.16...
Device reports as "grosse tv".
Dev server is ready.
Installing UnsplashScreensaver...
Result: Application Received: 1030370 bytes stored.
Install Success.
fahrnbach commented 2 months ago

This is fixed and approved but not yet merged. see https://github.com/rokudev/samples/pull/29