rstudio / proxyrec

1 stars 1 forks source link

(Playback) Error: Request failed with status 404 #8

Open christianhomberg opened 6 years ago

christianhomberg commented 6 years ago

The following command for playback gives me a 404 error

./proxyrec playback app-recording.txt -t http://127.0.0.1:[port] -d '5min 30sec' -s 2000 -o [outdir]

Error message:

!!!!!!!^C

0 succeeded, 7 failed
7 incidences of:
Error: Request failed with status 404:
<h1>Not Found</h1>
    at ShinyEvent.execute.protocol.request (/snapshot/proxyrec/lib/shiny-events.js:0)
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:169:7)
---------------------------------------------
    at startPlayback (/snapshot/proxyrec/lib/main.js:0)
    at Object.<anonymous> (/snapshot/proxyrec/lib/main.js:0)
    at Module._compile (pkg/prelude/bootstrap.js:1226:22)
    at Object.Module._extensions..js (module.js:580:10)
    at Module.load (module.js:503:32)
    at tryModuleLoad (module.js:466:12)
    at Function.Module._load (module.js:458:3)
    at Function.Module.runMain (pkg/prelude/bootstrap.js:1281:12)
    at startup (bootstrap_node.js:200:16)

Can't provide the app-recording.txt here, but profile[id].txt in outdir looks like this:

1   2017-09-22T11:30:56.962Z    32  REQ_HOME    0
2   2017-09-22T11:30:56.969Z    7   REQ 0
3   2017-09-22T11:30:56.975Z    6   REQ 0
4   2017-09-22T11:30:56.982Z    7   REQ 0
5   2017-09-22T11:30:56.988Z    6   REQ 0
6   2017-09-22T11:30:56.994Z    6   REQ 0
7   2017-09-22T11:30:57.002Z    8   REQ 0
8   2017-09-22T11:30:57.009Z    7   REQ 0
9   2017-09-22T11:30:57.015Z    6   REQ 0
10  2017-09-22T11:30:57.021Z    6   REQ 0
11  2017-09-22T11:30:57.027Z    6   REQ 0
12  2017-09-22T11:30:57.034Z    7   REQ 0
13  2017-09-22T11:30:57.040Z    6   REQ 0
14  2017-09-22T11:30:57.046Z    6   REQ 0
15  2017-09-22T11:30:57.053Z    6   REQ 0
# Failure
# Job finished in 124ms
slopp commented 6 years ago

Are all of the playbacks failing on the same request? Can you provide line 15 of app-recording.txt? It would be helpful to know if the request is for a relative asset or if your Shiny app is requesting an absolute path.

christianhomberg commented 6 years ago

Yes, they all fail on the same request.

app-recording.txt

line 14 {"type":"REQ","created":"2017-09-22T11:23:57.911Z","method":"GET","url":"/bootstrap.css","statusCode":200}
line 15 {"type":"REQ","created":"2017-09-22T11:23:57.973Z","method":"GET","url":"/selectize.bootstrap3.css","statusCode":200}
line 16 {"type":"REQ","created":"2017-09-22T11:23:57.981Z","method":"GET","url":"/shinydashboard.css","statusCode":200}
slopp commented 6 years ago

Christian - it appears you are running the application locally (via runApp() or the RStudio IDE) ... is that correct?.

proxyrec was designed to run on deployed applications.

If you are interested in recording and playing back a single run of a local app, see: https://github.com/rstudio/shinytest

jcheng5 commented 6 years ago

@slopp Actually I intended it to work for locally running apps too, and at least for a while that was working.

jcheng5 commented 6 years ago

@christianhomberg When you run that app in a browser, does that request result in a 404? (e.g. in Chrome Developer Tools' Network tab)

christianhomberg commented 6 years ago

It's right that I run the app locally. I can run it in a browser without any problems.