cupok's avatar

cupok liked a comment+100 XP

1d ago

Hi guys, I've stumbled upon a few bugs when a lesson ends and tries to automatically switch to the next lesson. I have not found a form to submit bugs, so I'm trying to post here. Please point me in the right direction if there's a special place for it

  1. When a lesson finishes in fullscreen video mode, instead of switching it displays an error: "Invalid playback URL. The video URL or playback-token are formatted with incorrect or incomplete information". Exiting fullscreen mode switches to the next video right away. This issue appeared in some other cases a few times too but I cannot remember the exact steps to reproduce at the moment
  2. If you finish a lesson you've already finished before then auto switch marks as "not complete". I'm not sure it is the intended behavior 😅

Just in case, I'm using Google Chrome 147.0.7727.56 on macOS

cupok's avatar

cupok wrote a reply+100 XP

1d ago

Can confirm the issue!

On-screen error: "Invalid playback URL — The video URL or playback-token are formatted with incorrect or incomplete information."

Network response (403): {"error":{"messages":["Not Authorized"],"type":"not_authorized"}}

Environment:

  • Browser: Google Chrome 147.0.7727.102 (arm64)
  • OS: macOS Tahoe 26.4.1 (25E253)

https://www.chromium.org/Home/chromium-security/corb-for-developers/


Update: dug into this further with Claude. CORB/ORB ruled out — relaunched Chrome with --disable-features=CrossSiteDocumentBlockingAlways,CrossSiteDocumentBlockingIfIsolating and the 403s persisted unchanged. The manifest 403s are coming from Mux's edge, not from Chrome.

The actual cause looks like a token/URL desync in the fullscreen next-episode flow. Decoded the JWTs from a working vs. failing .m3u8 request:

  • Working — URL playback_id: u6VKm…, token sub: u6VKm… ✅ match
  • Failing — URL playback_id: u6VKm…, token sub: NuS3Y2YC… ❌ mismatch

Both tokens have aud: "v" and valid exp (the failing one is actually 72 seconds fresher than the working one, so not an expiry issue). The token is just bound to a different playback_id than the manifest URL is requesting — almost certainly the next episode's id.

My read: in default mode, "next episode" does a full page navigation, so URL and token get rewritten together. In fullscreen mode, the player swaps source in-place and the two updates desync — a fresh token gets minted for the upcoming episode, but the manifest URL still points at the current one. Mux correctly returns 403 because token.sub doesn't match the requested resource.

Happy to share the cURL captures of both requests if useful.

cupok's avatar

cupok liked a comment+100 XP

2mos ago

Thanks! Actually, I meant something more like Xdebug or browser console debugging tools.

Actually, Xdebug is rather low-level and time-consuming when used for Laravel debugging. Both the dump/dd debug function in Herd and the Ray debugger are far more efficient and effective debugging Laravel apps.

Also the right choice of editor (I used to use Visual Code, now evaluating PHPStorm) can prevent a lot of potential errors.

cupok's avatar

cupok liked a comment+100 XP

2mos ago

I am mostly a backend developer, I don't know about debugging Javascript.

I believe this latest course is the only one about debugging PHP in Laracasts: https://laracasts.com/series/debugging-real-world-production-nightmares

In my day job, I gotta debug regularly, just like everyone else. We log a lot to AWS Cloudwatch, and we mostly gotta look at the logs to find out what happen. Context has been wildly helpful, we put the request id, order id and session id to the context to see the whole customer journey.

Tools like Datadog, NewRelic and Laravel Nightwatch are also popular.

cupok's avatar

cupok wrote a reply+100 XP

2mos ago

Thanks! Actually, I meant something more like Xdebug or browser console debugging tools.

cupok's avatar

cupok liked a comment+100 XP

2mos ago

look for the "code breaking workshop" videos

cupok's avatar

cupok wrote a comment+100 XP

2mos ago

@JeffreyWay I wonder when we'll pass this "Be VERY careful" stage? And when we do, what should we expect from this power?

cupok's avatar

cupok liked a comment+100 XP

2mos ago

Quick PSA. Be very, very careful if you intend to install this on your primary machine.

Ideally, opt for a dedicated old laptop or VPS.

cupok's avatar

cupok liked a comment+100 XP

2mos ago

Ask it to make a full Laracasts series on itself #inception 🙃

cupok's avatar

cupok liked a comment+100 XP

3mos ago

Quick note! At 13:07, we use the Bot's chat id to compare it to the authorized user id. Technically, this works for a private chat with the Bot. However, we should handle the possibility of group chats and channels by instead fetching the user directly. It's more clear that way, anyhow.

Use $bot->user()->id instead of $bot->chat()->id.

if ($bot->user()->id !== config('nutgram.authorized_user') {
	$bot->sendMessage('You are not authorized to use this bot.');
}
cupok's avatar

cupok liked a comment+100 XP

3mos ago

While Laracasts does not have a dedicated full-length course solely on debugging PHP or JavaScript as of now, debugging techniques are covered in various lessons throughout the site—especially in courses focused on Laravel and modern JavaScript development. 

For PHP/Laravel:
- Check out the "Laravel From Scratch" series, which covers common debugging tactics using tools like Xdebug, Laravel Telescope, and more.
- The "What's New in Laravel" and "Laravel Debugbar" snippets also often include useful debugging content.

For JavaScript:
- The "Modern JavaScript Explained For Dinosaurs" and various Vue/React courses touch on practical debugging using browser dev tools, breakpoints, and logging.

**Tip:** To quickly get better at debugging, it helps to:
- Use IDE features (like Xdebug for PHP in PhpStorm or VS Code).
- Leverage browser dev tools (Chrome/Firefox) for JavaScript debugging.
- Get comfortable reading stack traces and error logs.

If there's a specific debugging scenario or tool you'd like covered, you can suggest it in the Laracasts "Request a Series" forum—Jeffrey and the team are always looking for feedback!

If you need immediate help with debugging, feel free to post your specific code/problem, and the community won't hesitate to help!
cupok's avatar

cupok started a new conversation+100 XP

3mos ago

Hi, do you guys have course about debugging PHP or JS? Would be nice to have otherwise!