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

Undefined config causing many GETs to /undefined?url=[actual url] #290

Open
Cheese-Echidna opened this issue Aug 22, 2024 · 7 comments
Open

Comments

@Cheese-Echidna
Copy link

Cheese-Echidna commented Aug 22, 2024

I am building a content (mostly video) streaming app in NextJS (think plex but worse) and have been trying to use NextVideo for video playback.

When I try and play a video through the player, it stalls out and after a while the video stops playing.

Looking at the console, I see a lot (about 1 every 2s) of requests that are returning 404.

The requests are going to /undefined?url= followed by the actual url of the video content.

Checking out the source of the error, it seems to be coming from video-loader.js

let requestUrl = '${config2.path}?url=${encodeURIComponent('${src}')}';

I'm guessing config2 is undefined or null.

Is there anything I can do on my end to prevent this issue. I am literally just returning a div containing <NextVideo src={myVideo}/> where myVideo is a the path to a video.

Also, your bug report form 404s
https://github.com/muxinc/next-video/blob/dabac8fd37f46c5508030248ac4f59b9253bfd41/.github/CONTRIBUTING.md#issues
Sends you to:
https://github.com/muxinc/next-video/blob/dabac8fd37f46c5508030248ac4f59b9253bfd41/issues/new/choose

Thanks

@kinjal017
Copy link

I am also getting the same error and behavior, it would be nice to have the fix for these soon.

@lh15
Copy link

lh15 commented Aug 28, 2024

Same here

Seems like some config is supposed to be set here

@lh15
Copy link

lh15 commented Aug 28, 2024

Is this only supposed to work for mux?

message += `Did you configure the \`${config.path}\` route to handle video API requests?\n`;

@luwes
Copy link
Collaborator

luwes commented Sep 9, 2024

thanks for reporting!

how does your next.config.(m)js look like?

is this setting set in tsconfig.json? "moduleResolution": "bundler",

@marcobarbosa
Copy link

thanks for reporting!

how does your next.config.(m)js look like?

is this setting set in tsconfig.json? "moduleResolution": "bundler",

Same issue here. I already have "moduleResolution": "blunder" in tsconfig.

I'm only using BackgroundVideo with a remote URL and my console gets flooded with non-stop failed GET requests.

Screenshot 2024-09-18 at 08 11 24

@luwes
Copy link
Collaborator

luwes commented Sep 18, 2024

@marcobarbosa this is expected.

See Remote videos with string source URL at https://github.com/muxinc/next-video#remote-videos

If you like to play remote string sources with no uploading/processing via the request handler you can use the player only imports. See https://github.com/muxinc/next-video#player-only-demo

@matheusmcz
Copy link

matheusmcz commented Sep 26, 2024

Hi guys, i have the same issue. I'm using Custom Player with custom controls and remote video url provided by a BFF and all seems working fine, but every 2s this requests have been called and returning 404 (same thing that @marcobarbosa sended).
There is some setting to add in next.config or ts.config?

My next config have the basic setup:
import { withNextVideo } from "next-video/process"; export default withNextVideo(nextConfig);

ts.config aready have "moduleResolution": "bundler",

@luwes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants