elements icon indicating copy to clipboard operation
elements copied to clipboard

Bug: Mux player getting 403 only in production

Open alexandrelipp opened this issue 1 year ago • 2 comments

Is there an existing issue for this?

  • [X] I have searched the existing issues

Which Mux Elements/Packages does this apply to? Select all that apply

mux-player-react

Which browsers are you using?

Chrome

Which operating systems are you using?

Windows

Description

When playing a video using a signed URL everything works, but I'm getting 403 with this error: MediaError: A network error caused the media download to fail. The video is still playing as expected, but why is there a request that fails? In non-production env everything works without errors

Reduced test case

No response

Steps to reproduce

  1. Use a signed video url
  2. Play in a production env in the mux player

Current Behavior

403

Expected Behavior

Remove request that fails

Errors

[mux-player 2.6.0] MediaError: A network error caused the media download to fail. at sQ. (30.757e86786f25ac29.js:1:100063) at l.emit (a4634e51.b8188b20774a2005.js:1:199740) at sQ.emit (a4634e51.b8188b20774a2005.js:1:387179) at sQ.trigger (a4634e51.b8188b20774a2005.js:1:387265) at el.handleNetworkError (a4634e51.b8188b20774a2005.js:1:47483) at Object.onError (a4634e51.b8188b20774a2005.js:1:44614) at sM.readystatechange (a4634e51.b8188b20774a2005.js:1:339901)

What version of the package are you using?

2.6.0

alexandrelipp avatar May 22 '24 20:05 alexandrelipp

I am using firebase to host a nextjs application, but the mux player is in a client component. The signed URL is generated server side

alexandrelipp avatar May 22 '24 21:05 alexandrelipp

Have you found a solution?

ruptyx avatar Jun 08 '24 08:06 ruptyx

Hi @alexandrelipp.

I tried reproducing the issue, but I wasn’t able to. I installed @mux/mux-player-react in a Next.js project and added this code in a client component:

<MuxPlayer tokens={{ playback: 'JWT Token', }} playbackId="playbackId" />

I used a JWT token generated from https://jwt.mux.dev/ and deployed the project on Firebase Hosting. The video plays correctly for me.

Did you follow the exact same steps, or is there anything different in your setup that I might not have tested? Let me know, and I’d be happy to help troubleshoot further.

Thanks!

ronalduQualabs avatar Apr 02 '25 17:04 ronalduQualabs

Hi @alexandrelipp, just checking on this were you able to follow the same steps I took? Let me know if you ran into anything or need a hand!

ronalduQualabs avatar Apr 23 '25 16:04 ronalduQualabs

Hi @alexandrelipp, just checking if you got a chance to try my steps. Let me know if you ran into anything or need a hand!

ronalduQualabs avatar Apr 25 '25 16:04 ronalduQualabs

There hasn't been any recent activity on this issue, so I'm going to close it for now. Feel free to reopen or comment if the problem persists or if you have more information to share.

Thanks!

ronalduQualabs avatar Apr 28 '25 18:04 ronalduQualabs