ViewTube / viewtube

▶️ ViewTube: The open source, privacy-conscious way to enjoy your favorite YouTube content. Docs: https://viewtube.wiki, Status: https://uptime.viewtube.io

Home Page:https://viewtube.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

"window is not defined" error when signed in

fromonesource opened this issue · comments

Describe the Bug

When I go directly to https://myviewtu.be/watch?v=DeR17AlTNQg I get the error "window is not defined". If I navigate to the homepage and then back, the error is gone and the video loads fine.

Steps to Reproduce the Bug

  1. Sign into a local viewtube user account
  2. Go to https://yourviewtu.be/watch?v=DeR17AlTNQg
  3. See the error

Expected Behaviour

Video loads and plays

Screenshot/Screen recording

image

Device Info

  • Browser: Brave
  • Version: 1.58.137

Additional Context

Hi!
I get the exact same error whenever I open a video on a new tab/window of the browser.
I guess something goes wrong when you are not coming from the homepage.

commented

I can't seem to be able to reproduce this, is it still ocurring?

I have just pulled from development and tried again:

  • on Edge (Chromium): no issues.
  • on Firefox: I get the "window is not defined" whenever: I open a link in a new tab or window; I copy/paste the URL on a new tab; I refresh the page.

In the console and the logs I don't see any difference from when I use Firefox or Edge 🤷:

  • Console:
image
  • Logs:
    Nov 24 08:56:09 XYZ pnpm[2004]: using nestApp.inject for /api/videos/2oWbDCql4JA external: undefined Nov 24 08:56:09 XYZ pnpm[2004]: using nestApp.inject for /api/videos/2oWbDCql4JA external: undefined
commented

I have the same error on ipad safari.

when i'm logged in, click subscriptions and then click on a video. Somehow it loads but nothing happens, if i refresh the site I get "windownis not defined".

It does not happen everytime.

I've also come across this issue in Chrome, when attempting to set up URL redirecting.

commented

I have resolved the issue in the referenced pull request. If there are still problems with this, please @ me or open an issue