Building a Game Player with ChatGPT and Rails - Part 2
DougDoug is a Twitch streamer (and programmer!) who recently did a fun stream making ChatGPT play a children’s point-and-click adventure game. It’s a long bu...
I’ve been on vacation this week, which means two things:
Yesterday, these two just happened to overlap!
I bought a ticket to see DC League of Super Pets at the local AMC. I’m a pretty frequent customer there, given that it’s only a couple of minutes away from home, and I always use the AMC theatres app.
In this case, when I got to the theatre, I opened the app while sitting in my car so I could pull up my ticket, but got the error below:
OK, I did the normal troubleshooting steps:
Most telling, though, was that even attempting to sign in to AMC thru their website (on Android Chrome) wasn’t working - there was no error displayed, it would simply show the loading animation then stay on the sign-in screen.
Nothing worked, so I was thinking it was just a server issue with AMC. Then I remembered that they also email a receipt with the QR code and confirmation number; the confirmation number was enough to get me in, but strangely the QR code wasn’t loading in the email itself. Also strange was the fact that, once I got in the theatre, no one else seemed to be having any issues. When I got home, it seemed whatever the issue was had been resolved as the app could open just fine.
This morning, I was looking in to getting tickets for Nope while at the local coffee shop, and again the app was working fine, but on the way home I stopped off for a donut, and curiously, when I checked the app again, I got the same network connection issue. Hmmm.
Things were starting to smell like an odd network issue rather than a server issue. When I got home, I ran an experiment - I checked the app while connected to my wifi and had no issues. Then I switched over to mobile data and boom! The issue was back. Remembering that there had also been issues with the web version, I connected my laptop to mobile data via hotspot, and was able to inspect the network calls:
Looks like pretty standard requests - GraphQL for API requests, Cloudinary for caching, and Google Analytics for tracking (Dear AMC: nice stack!). But they’re all getting hit with what appears to be CSRF failures, or at least that’s how the browser is interpreting them. We’ve also had to troubleshoot some issues around GraphQL and edge caching at Stitch Fix, so it makes sense to me that there could be some unaccounted-for edge cases. I also went back and double-checked the email receipt; the QR code is displayed via a GraphQL call, so that fits with everything else.
Two side notes on the email:
Now, why would my particular mobile provider be having issues? I don’t know exactly why, but it seems to be linked to my using Google Fi. When checking details on my IP, it appears that Google Fi, by default, masks some elements behind a VPN, so location-wise it looks like I’m in Mountain View, CA:
(As a note, I’m currently located in Cary/Raleigh, NC).
I don’t typically have the Fi VPN enabled, so this was a bit surprising. Interestingly, I found that enabling the Fi VPN while on mobile data actually enables the AMC app and website to work correctly! I also checked out a few other websites that use Cloudinary for edge caching, and didn’t see any issues, so I’m thinking it must have something to do with how Cloudinary is specifically configured for AMC (and very likely, specifically configured against their GraphQL implementation).
Also, the last time I saw a movie at AMC, I did not run into these issues, meaning the root cause can likely be traced back to some change made between 2022-07-16 (when I saw Paws of Fury: The Legend of Hank) and 2022-07-29.
So, in the spirit of the following XKCD comic, I’m leaving these details here in case the engineers at AMC find them helpful. Definitely not urgent for me, as I’ve discovered a couple of workarounds, but might be good to look into in case it affects other customers.
DougDoug is a Twitch streamer (and programmer!) who recently did a fun stream making ChatGPT play a children’s point-and-click adventure game. It’s a long bu...
Puma has a pretty interesting feature called after_reply - if there’s a potentially costly operation that’s not on the critical path to responding to a consu...
Watching Twitch streamers and their highlight videos is a guilty pleasure of mine. DougDoug does a lot of streams where the main idea utilizes AI, typically ...
ChatGPT, created by OpenAI, is an amazing tool that’s helpful in refining rote tasks, and will eventually become as commonplace as spellcheck tools. However,...
Most product, design, and engineering folk are well-aware of their app’s Happy Paths - that is, under all the right circumstances, the imagined optimal set o...
I’ve been on vacation this week, which means two things:
Our team recently came across a fun little quirk in the as_json method of an ActiveRecord model.
Jurassic World Dominion just came in movie theaters. It is absolutely terrible, and I love it.
When you’re cleaning up a monolith Rails app, it’s essential to have usage metrics to know what pieces of code are safe to remove. Tools like Datadog APM and...