adrianliechti / cassette

Web Session Recorder and Player
MIT License
0 stars 0 forks source link

Deploying Cassette to AWS but not working #3

Closed raseniero closed 1 week ago

raseniero commented 2 weeks ago

Hi Adrian,

We are using your cassette recording in our project and we are deploying it to AWS EC2 but we are having issues where it is not recording (or calling the /events). I think its because of the setup since we are deploying this without docker.

We really like your solution but can you help us on this?

Thanks, Ramon

adrianliechti commented 2 weeks ago

Ciao @raseniero

We are of course delighted about that :)

Could you maybe elaborate about your current setup? (especially network configuration). I ask because as an example HTTPS/TLS is very important for most of the Browsers. Web Browser are picky. So if the target Website runs over HTTPS and the Script tag is embedded with HTTP; this mights be a first issue. Another thing are Content Security options in the Web Site itself - in that case, you would need to whitelist that script)

Interesting for sure are the browser web console logs (Network Tab) in the Browser. Often you see why the browser rejects the outgoing request.

We can then think together about solutions: e.g. a Proxy in Front which is handling the TLS Stuff with eg. Let's Encrypt (Caddy might be a good and simple choice); or that we include this functionality in Cassette itself

raseniero commented 1 week ago

Hi Adrian,

We are getting a CORS error and the /events/ is not functioning and recording are not happing. Have you tried to deploy this to AWS before? See image below image

Thanks, Ramon

adrianliechti commented 1 week ago

@raseniero From what I see, the Issue is in the Proxy in front of Cassette dealing with TLS and Routing (404 etc.) You might want to have a look on that

raseniero commented 1 week ago

Hi Adrian,

We were able to solve the 404 issues by adding the correct CORS settings in NGINX.

But now we are having new issues, the recording is only happening on the 1st 10 secs then we get empty sessions after every 10 seconds. It seems that it is not recording after the 1st recording.

We've compared the AWS setup vs the local-dev docker setup (which is working just fine) and we notice that on local-dev the /cassette.min.cjs has two request, Preflight and GET, but in the AWS there is only one and its the GET request.

Any thoughts?

I wonder if you're available to chat on Slack or Skype or Team on this.

Thanks, Ramon

adrianliechti commented 1 week ago

this project is not supported by me. its state is currently a proof of concept to test a feasibility internally and some clients. i will update the readme to make this clear.

i would recommend you to use another tool like https://openreplay.com or https://posthog.com. they provide better documentation and communities to help you in your specific integration issues.

have a good one