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

PUBLIC_URL and basename problems on minified version #275

Open
Biegal opened this issue Jun 21, 2024 · 0 comments
Open

PUBLIC_URL and basename problems on minified version #275

Biegal opened this issue Jun 21, 2024 · 0 comments

Comments

@Biegal
Copy link

Biegal commented Jun 21, 2024

Describe the bug
TLDR: Playback doesn't load with PUBLIC_URL=. set.

Hi,
I'm not sure if that's a bug, or did I misunderstood something, but I have hard time running a final build of latest version (we're trying to make an upgrade from player version around BBB 2.2 or 2.3) using PUBLIC_URL=.. We're using that in pair with REACT_APP_MEDIA_ROOT_URL to serve recordings from a separate domain.
With latest version it works in dev, but not on minimized version. Checked different browsers and machines.

To Reproduce

  1. Pull latest code
  2. Use PUBLIC_URL=. REACT_APP_MEDIA_ROOT_URL=https://some-s3-bucket.com/recordings npm run start
  3. Open URL in the browser and test some recordings - should work (like http://localhost:3000/d3a7504b938be957c8f9a8923d0435d90eba0222-1143407945744)
  4. Run PUBLIC_URL=. REACT_APP_MEDIA_ROOT_URL=https://some-s3-bucket.com/recordings npm run build
  5. Serve the ./build directory somehow, could be nginx or serve
  6. Try the same URL in the browser, it won't load

Expected behavior
I would expect player to work no matter if running in dev, or deploying to server.

Screenshots
If it won't load, it's just a blank screen

Desktop (please complete the following information):

  • OS - tried on macos
  • Browser - any (safari, brave, chrome)

Smartphone (please complete the following information):
Didn't tried on smartphone

Additional context
I did some small investigation, and my temporary solution is to remove basename from /src/components/router.js.
Originally it's basename={process.env.PUBLIC_URL} which is substituted with the basename=. in the end (by setting PUBLIC_URL=. as stated in the docs).
Without that basename, the built and minified version works like a charm again.

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

1 participant