Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: Component crashes since 2.5 update #908

Open
1 task done
KubaniGal opened this issue Apr 22, 2024 · 5 comments
Open
1 task done

Bug: Component crashes since 2.5 update #908

KubaniGal opened this issue Apr 22, 2024 · 5 comments
Labels
bug Something isn't working Status: Unconfirmed A potential issue that we haven't yet confirmed as a bug

Comments

@KubaniGal
Copy link

Is there an existing issue for this?

  • 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?

macOS

Description

Hi, ever since mux player react version updated to 2.5 (4 days ago) the component fails, i reverted back to 2.4.1 for now, but i wanted to report this to make sure it handled, this happens both locally and when running github checks.
when i reverted back to 2.4.1 the issue was resolved so it must have been the latest version update
this is the call stack and error:

mux.cjs.js:1 Uncaught TypeError: ue.default.getLevel is not a function
at ../node_modules/mux-embed/dist/mux.cjs.js (mux.cjs.js:1:17456)
at options.factory (react refresh:6:1)
at webpack_require (bootstrap:24:1)
at fn (hot module replacement:61:1)
at ../node_modules/@mux/playback-core/dist/index.cjs.js (index.cjs.js:1:1777)
at options.factory (react refresh:6:1)
at webpack_require (bootstrap:24:1)
at fn (hot module replacement:61:1)
at ../node_modules/@mux/mux-player-react/dist/index.cjs.js (index.cjs.js:1:801)
at options.factory (react refresh:6:1)

Thanks in advance.

Reduced test case

No response

Steps to reproduce

  1. delete and reinstall node modules(if needed) with version 2.5
  2. run locally and open localhost
  3. should see the error

Current Behavior

fails to navigate to app

Expected Behavior

should work as it did in previous versions

Errors

mux.cjs.js:1 Uncaught TypeError: ue.default.getLevel is not a function
at ../node_modules/mux-embed/dist/mux.cjs.js (mux.cjs.js:1:17456)
at options.factory (react refresh:6:1)
at webpack_require (bootstrap:24:1)
at fn (hot module replacement:61:1)
at ../node_modules/@mux/playback-core/dist/index.cjs.js (index.cjs.js:1:1777)
at options.factory (react refresh:6:1)
at webpack_require (bootstrap:24:1)
at fn (hot module replacement:61:1)
at ../node_modules/@mux/mux-player-react/dist/index.cjs.js (index.cjs.js:1:801)
at options.factory (react refresh:6:1)

What version of the package are you using?

2.5

@KubaniGal KubaniGal added bug Something isn't working Status: Unconfirmed A potential issue that we haven't yet confirmed as a bug labels Apr 22, 2024
@cjpillsbury
Copy link
Contributor

Hey @KubaniGal we may need some more details to be able to help investigate this, since we have many use cases of mux player react and haven't yet run into this problem. Is there any chance you can share a simplified reproduction case, like a github repo, codesandbox, or the like?

@KubaniGal
Copy link
Author

Hey, thanks for the reply..
i hope this will help, this is how we use the player in our project:

  <MuxPlayer
    data-hook={"mux-player"}
    style={{ height: "100%" }}
    streamType="on-demand"
    playbackId={recordedId}
  />

not sure i have more to provide, this works fine in any version that isnt 2.5, in 2.5 the error shows as i attached above

@scmilee
Copy link

scmilee commented Apr 24, 2024

We are also experiencing this issue when bumping to 2.5.0 from 2.4.x . We are bundling the mux-player-react in with our internal components library and when consuming the library from either our main React app or a create-react-app --template typescript we get the same type error as above.

Interestingly enough, when we directly import and consume mux-player-react in the create-react-app, everything works fine. Additionally, everything works fine in both scenarios when rolling back to 2.4.2. I see in the release for 2.5.0 a d.ts file was removed for mux-embed and maybe that has something to do with it?

Not exactly sure what would cause this nested dependency type issue.

note: mux-player-react is listed as a peerDependency in our internal component library if that makes a difference

@cjpillsbury
Copy link
Contributor

@KubaniGal @scmilee If either of you can share a codebase + steps to reproduce (codesandbox, stackblitz, public github repo) for the issue, that would go a long way. We and our customers use Mux Player across many react setups that appear to be working fine, so there's almost definitely some other detail in the setup (react versions, build tools, etc. etc.) that's causing the issue to show up.

scmilee added a commit to scmilee/908-reproduction that referenced this issue May 6, 2024
@scmilee
Copy link

scmilee commented May 6, 2024

Here is the sandbox, if the runtime error isn't covering the preview page it's in the terminal. And as mentioned before, direct usage of the lib will work, only seems to be an issue when it's bundled a level down.

Lib repo
ts react app repo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Status: Unconfirmed A potential issue that we haven't yet confirmed as a bug
Projects
None yet
Development

No branches or pull requests

3 participants