Jump to content

4.7.2 Error loading javascript


humor4fun

Recommended Posts

humor4fun

Hello! I'm new to Emby, coming from many years of Plex, wordpress, nginx, and many other servers/services. I decided to start poking around with Emby by installing it side-by-side with my Plex server (windows 10, private network connection managed by a separate nginx reverse proxy, UniFi network hardware).

 

So, I've got Emby installed, configured to start processing some library contents, and it all is working just fine on the localhost and local network. Next I set up an entry in my reverse proxy to grab a subdomain (emby.mydomain.com) and forward everything over to the emby server on port 8096 (default http). The problem arose when trying to access the service using the subdomain. (note, this woks exactly fine with plex and other local services that do an out-and-back-in path using subdomains).

 

I end up with a mostly blank screen that shows the emby logo and appears to have some errors loading javascript files preventing the site from functioning at all.

Here is the screen I see:

image.thumb.png.d90a8c6275c66613ac57e2ab30a2e9e5.png

Here is my developer debug info when loading the page:

app.js?v=4.7.2.0:1 Setting require baseUrl to https://emby.mydomain.com/web
alameda.js?v=4.7.2.0:1 getJsUrlWithExtension: modules/browser.js?v=4.7.2.0
alameda.js?v=4.7.2.0:1 getJsUrlWithExtension: https://emby.mydomain.com/web/modules/babelhelpers.js?v=4.7.2.0
alameda.js?v=4.7.2.0:1 getJsUrlWithExtension: modules/emby-apiclient/appstorage-localstorage.js?v=4.7.2.0
alameda.js?v=4.7.2.0:1 getJsUrlWithExtension: modules/apphost.js?v=4.7.2.0
alameda.js?v=4.7.2.0:1 getJsUrlWithExtension: modules/common/servicelocator.js?v=4.7.2.0
alameda.js?v=4.7.2.0:1 getJsUrlWithExtension: modules/common/appsettings.js?v=4.7.2.0
alameda.js?v=4.7.2.0:1 getJsUrlWithExtension: modules/emby-apiclient/events.js?v=4.7.2.0
alameda.js?v=4.7.2.0:1 getJsUrlWithExtension: modules/fullscreen/fullscreenmanager.js?v=4.7.2.0
alameda.js?v=4.7.2.0:1 getJsUrlWithExtension: modules/dom.js?v=4.7.2.0
alameda.js?v=4.7.2.0:1 getJsUrlWithExtension: modules/common/textencoding.js?v=4.7.2.0
alameda.js?v=4.7.2.0:1 getJsUrlWithExtension: modules/emby-apiclient/connectionmanager.js?v=4.7.2.0
alameda.js?v=4.7.2.0:1 getJsUrlWithExtension: modules/emby-apiclient/credentials.js?v=4.7.2.0
alameda.js?v=4.7.2.0:1 getJsUrlWithExtension: modules/querystring/querystring.js?v=4.7.2.0
alameda.js?v=4.7.2.0:1 getJsUrlWithExtension: modules/common/usersettings/usersettings.js?v=4.7.2.0
alameda.js?v=4.7.2.0:1 getJsUrlWithExtension: modules/emby-apiclient/apiclient.js?v=4.7.2.0
alameda.js?v=4.7.2.0:1 getJsUrlWithExtension: modules/emby-apiclient/wakeonlan.js?v=4.7.2.0
alameda.js?v=4.7.2.0:1 getJsUrlWithExtension: modules/common/usersettings/usersettingsbuilder.js?v=4.7.2.0
connectionmanager.js?v=4.7.2.0:1 Begin ConnectionManager constructor
app.js?v=4.7.2.0:1 creating ApiClient singleton
credentials.js?v=4.7.2.0:1 credentials initialized with: {}
apiclient.js?v=4.7.2.0:1 ApiClient serverAddress: https://emby.mydomain.com
apiclient.js?v=4.7.2.0:1 ApiClient appName: Emby Web
apiclient.js?v=4.7.2.0:1 ApiClient appVersion: 4.7.2.0
apiclient.js?v=4.7.2.0:1 ApiClient deviceName: Microsoft Edge Windows
apiclient.js?v=4.7.2.0:1 ApiClient deviceId: bcc83efd-28d0-4187-8b94-1418ef47ab89
connectionmanager.js?v=4.7.2.0:1 returning instance from getOrAddApiClient
app.js?v=4.7.2.0:1 loaded ApiClient singleton
alameda.js?v=4.7.2.0:1 getJsUrlWithExtension: modules/common/globalize.js?v=4.7.2.0
app.js?v=4.7.2.0:1 loadFirstLevelPresentationDependencies
app.js?v=4.7.2.0:1 loadPlugins
alameda.js?v=4.7.2.0:1 getJsUrlWithExtension: modules/shell.js?v=4.7.2.0
alameda.js?v=4.7.2.0:1 getJsUrlWithExtension: modules/approuter.js?v=4.7.2.0
alameda.js?v=4.7.2.0:1 getJsUrlWithExtension: modules/common/itemhelper.js?v=4.7.2.0
alameda.js?v=4.7.2.0:1 getJsUrlWithExtension: modules/common/pluginmanager.js?v=4.7.2.0
alameda.js?v=4.7.2.0:1 getJsUrlWithExtension: modules/layoutmanager.js?v=4.7.2.0
alameda.js?v=4.7.2.0:1 getJsUrlWithExtension: modules/skinmanager.js?v=4.7.2.0
alameda.js?v=4.7.2.0:1 getJsUrlWithExtension: modules/loading/loading.js?v=4.7.2.0
alameda.js?v=4.7.2.0:1 getJsUrlWithExtension: modules/viewmanager/viewmanager.js?v=4.7.2.0
alameda.js?v=4.7.2.0:1 getJsUrlWithExtension: modules/backdrop/backdrop.js?v=4.7.2.0
alameda.js?v=4.7.2.0:1 getJsUrlWithExtension: modules/pagejs/page.js?v=4.7.2.0
alameda.js?v=4.7.2.0:1 getJsUrlWithExtension: modules/focusmanager.js?v=4.7.2.0
alameda.js?v=4.7.2.0:1 getJsUrlWithExtension: modules/common/playback/playbackmanager.js?v=4.7.2.0
alameda.js?v=4.7.2.0:1 getJsUrlWithExtension: modules/common/methodtimer.js?v=4.7.2.0
alameda.js?v=4.7.2.0:1 getJsUrlWithExtension: modules/common/playback/playqueuemanager.js?v=4.7.2.0
alameda.js?v=4.7.2.0:1 getJsUrlWithExtension: modules/common/input/api.js?v=4.7.2.0
approuter.js?v=4.7.2.0:1 router href: https://emby.mydomain.com/web/index.html
approuter.js?v=4.7.2.0:1 router self.location.pathname: /web/index.html
approuter.js?v=4.7.2.0:1 router getRequestFile() result: /index.html
approuter.js?v=4.7.2.0:1 router baseUrl: https://emby.mydomain.com/web
approuter.js?v=4.7.2.0:1 router self.location.pathname: /web/index.html
approuter.js?v=4.7.2.0:1 router getRequestFile() result: /index.html
approuter.js?v=4.7.2.0:1 Setting page base to /web
app.js?v=4.7.2.0:1 Loading installed plugins
app.js?v=4.7.2.0:1 Loading plugin module: ./modules/common/playback/playbackvalidation.js
alameda.js?v=4.7.2.0:1 getJsUrlWithExtension: modules/common/playback/playbackvalidation.js?v=4.7.2.0
app.js?v=4.7.2.0:1 Loading plugin module: ./modules/common/playback/playaccessvalidation.js
alameda.js?v=4.7.2.0:1 getJsUrlWithExtension: modules/common/playback/playaccessvalidation.js?v=4.7.2.0
app.js?v=4.7.2.0:1 Loading plugin module: ./modules/common/playback/experimentalwarnings.js
alameda.js?v=4.7.2.0:1 getJsUrlWithExtension: modules/common/playback/experimentalwarnings.js?v=4.7.2.0
pluginmanager.js?v=4.7.2.0:1 Loading plugin: modules/soundeffects/defaultsoundeffects/plugin
alameda.js?v=4.7.2.0:1 getJsUrlWithExtension: https://emby.mydomain.com/web/modules/soundeffects/defaultsoundeffects/plugin.js?v=4.7.2.0
app.js?v=4.7.2.0:1 Loading plugin module: ./modules/logoscreensaver/plugin.js
alameda.js?v=4.7.2.0:1 getJsUrlWithExtension: modules/logoscreensaver/plugin.js?v=4.7.2.0
app.js?v=4.7.2.0:1 Loading plugin module: ./modules/backdropscreensaver/plugin.js
alameda.js?v=4.7.2.0:1 getJsUrlWithExtension: modules/backdropscreensaver/plugin.js?v=4.7.2.0
app.js?v=4.7.2.0:1 Loading plugin module: ./modules/photoscreensaver/plugin.js
alameda.js?v=4.7.2.0:1 getJsUrlWithExtension: modules/photoscreensaver/plugin.js?v=4.7.2.0
app.js?v=4.7.2.0:1 Loading plugin module: ./modules/htmlaudioplayer/plugin.js
alameda.js?v=4.7.2.0:1 getJsUrlWithExtension: modules/htmlaudioplayer/plugin.js?v=4.7.2.0
app.js?v=4.7.2.0:1 Loading plugin module: ./modules/htmlvideoplayer/plugin.js
alameda.js?v=4.7.2.0:1 getJsUrlWithExtension: modules/htmlvideoplayer/plugin.js?v=4.7.2.0
app.js?v=4.7.2.0:1 Loading plugin module: ./modules/photoplayer/plugin.js
alameda.js?v=4.7.2.0:1 getJsUrlWithExtension: modules/photoplayer/plugin.js?v=4.7.2.0
app.js?v=4.7.2.0:1 Loading plugin module: ./modules/sessionplayer.js
alameda.js?v=4.7.2.0:1 getJsUrlWithExtension: modules/sessionplayer.js?v=4.7.2.0
app.js?v=4.7.2.0:1 Loading plugin module: ./modules/chromecast/chromecastplayer.js
alameda.js?v=4.7.2.0:1 getJsUrlWithExtension: modules/chromecast/chromecastplayer.js?v=4.7.2.0
app.js?v=4.7.2.0:1 Loading plugin module: ./modules/youtubeplayer/plugin.js
alameda.js?v=4.7.2.0:1 getJsUrlWithExtension: modules/youtubeplayer/plugin.js?v=4.7.2.0
app.js?v=4.7.2.0:1 Loading plugin module: ./modules/confirmstillplaying/plugin.js
alameda.js?v=4.7.2.0:1 getJsUrlWithExtension: modules/confirmstillplaying/plugin.js?v=4.7.2.0
alameda.js?v=4.7.2.0:1 getJsUrlWithExtension: modules/common/inputmanager.js?v=4.7.2.0
pluginmanager.js?v=4.7.2.0:1 creating plugin instance
pluginmanager.js?v=4.7.2.0:1 loading plugin strings
pluginmanager.js?v=4.7.2.0:1 creating plugin instance
pluginmanager.js?v=4.7.2.0:1 loading plugin strings
pluginmanager.js?v=4.7.2.0:1 creating plugin instance
pluginmanager.js?v=4.7.2.0:1 loading plugin strings
pluginmanager.js?v=4.7.2.0:1 creating plugin instance
pluginmanager.js?v=4.7.2.0:1 loading plugin strings
pluginmanager.js?v=4.7.2.0:1 creating plugin instance
pluginmanager.js?v=4.7.2.0:1 loading plugin strings
pluginmanager.js?v=4.7.2.0:1 creating plugin instance
pluginmanager.js?v=4.7.2.0:1 loading plugin strings
pluginmanager.js?v=4.7.2.0:1 creating plugin instance
pluginmanager.js?v=4.7.2.0:1 loading plugin strings
alameda.js?v=4.7.2.0:1 getJsUrlWithExtension: modules/htmlvideoplayer/htmlmediahelper.js?v=4.7.2.0
alameda.js?v=4.7.2.0:1 getJsUrlWithExtension: modules/htmlvideoplayer/basehtmlplayer.js?v=4.7.2.0
pluginmanager.js?v=4.7.2.0:1 creating plugin instance
pluginmanager.js?v=4.7.2.0:1 loading plugin strings
pluginmanager.js?v=4.7.2.0:1 creating plugin instance
pluginmanager.js?v=4.7.2.0:1 loading plugin strings
pluginmanager.js?v=4.7.2.0:1 creating plugin instance
pluginmanager.js?v=4.7.2.0:1 loading plugin strings
pluginmanager.js?v=4.7.2.0:1 creating plugin instance
pluginmanager.js?v=4.7.2.0:1 loading plugin strings
pluginmanager.js?v=4.7.2.0:1 creating plugin instance
pluginmanager.js?v=4.7.2.0:1 loading plugin strings
pluginmanager.js?v=4.7.2.0:1 creating plugin instance
pluginmanager.js?v=4.7.2.0:1 loading plugin strings
pluginmanager.js?v=4.7.2.0:1 creating plugin instance
pluginmanager.js?v=4.7.2.0:1 loading plugin strings
app.js?v=4.7.2.0:1 loadExternalScripts
app.js?v=4.7.2.0:1 loadHeader
alameda.js?v=4.7.2.0:1 getJsUrlWithExtension: modules/appheader/appheader.js?v=4.7.2.0
index.html:1 
        
       Tracking Prevention blocked access to storage for https://www.gstatic.com/cv/js/sender/v1/cast_sender.js.
alameda.js?v=4.7.2.0:1 getJsUrlWithExtension: modules/common/datetime.js?v=4.7.2.0
alameda.js?v=4.7.2.0:1 getJsUrlWithExtension: modules/maintabsmanager.js?v=4.7.2.0
alameda.js?v=4.7.2.0:1 getJsUrlWithExtension: modules/navdrawer/navdrawer.js?v=4.7.2.0
alameda.js?v=4.7.2.0:1 getJsUrlWithExtension: modules/navdrawer/navdrawercontent.js?v=4.7.2.0
alameda.js?v=4.7.2.0:1 getJsUrlWithExtension: modules/emby-elements/emby-scroller/emby-scroller.js?v=4.7.2.0
alameda.js?v=4.7.2.0:1 getJsUrlWithExtension: modules/emby-elements/emby-select/emby-select.js?v=4.7.2.0
alameda.js?v=4.7.2.0:1 getJsUrlWithExtension: modules/emby-elements/emby-button/paper-icon-button-light.js?v=4.7.2.0
alameda.js?v=4.7.2.0:1 getJsUrlWithExtension: modules/emby-elements/emby-button/emby-button.js?v=4.7.2.0
alameda.js?v=4.7.2.0:1 getJsUrlWithExtension: modules/emby-elements/emby-tabs/emby-tabs.js?v=4.7.2.0
alameda.js?v=4.7.2.0:1 
        
      
        
        
      
        
      
       
        
       GET https://emby.mydomain.com/web/modules/navdrawer/navdrawer.js?v=4.7.2.0 net::ERR_ABORTED 404
load @ alameda.js?v=4.7.2.0:1
(anonymous) @ alameda.js?v=4.7.2.0:1
waitForDep @ alameda.js?v=4.7.2.0:1
main @ alameda.js?v=4.7.2.0:1
takeQueue @ alameda.js?v=4.7.2.0:1
(anonymous) @ alameda.js?v=4.7.2.0:1
load (async)
load @ alameda.js?v=4.7.2.0:1
(anonymous) @ alameda.js?v=4.7.2.0:1
waitForDep @ alameda.js?v=4.7.2.0:1
main @ alameda.js?v=4.7.2.0:1
(anonymous) @ alameda.js?v=4.7.2.0:1
(anonymous) @ app.js?v=4.7.2.0:1
importFromPath @ app.js?v=4.7.2.0:1
loadHeader @ app.js?v=4.7.2.0:1
Promise.then (async)
start @ app.js?v=4.7.2.0:1
(anonymous) @ app.js?v=4.7.2.0:1
(anonymous) @ app.js?v=4.7.2.0:1
alameda.js?v=4.7.2.0:1 
        
       Uncaught (in promise) Error: Load failed: modules/navdrawer/navdrawer.js: https://emby.mydomain.com/web/modules/navdrawer/navdrawer.js?v=4.7.2.0
    at HTMLScriptElement.<anonymous> (alameda.js?v=4.7.2.0:1:5791)
(anonymous) @ alameda.js?v=4.7.2.0:1
Promise.then (async)
start @ app.js?v=4.7.2.0:1
(anonymous) @ app.js?v=4.7.2.0:1
(anonymous) @ app.js?v=4.7.2.0:1
alameda.js?v=4.7.2.0:1 
        
      
        
        
      
        
      
       
        
       GET https://emby.mydomain.com/web/modules/navdrawer/navdrawercontent.js?v=4.7.2.0 net::ERR_ABORTED 404
load @ alameda.js?v=4.7.2.0:1
(anonymous) @ alameda.js?v=4.7.2.0:1
waitForDep @ alameda.js?v=4.7.2.0:1
main @ alameda.js?v=4.7.2.0:1
takeQueue @ alameda.js?v=4.7.2.0:1
(anonymous) @ alameda.js?v=4.7.2.0:1
load (async)
load @ alameda.js?v=4.7.2.0:1
(anonymous) @ alameda.js?v=4.7.2.0:1
waitForDep @ alameda.js?v=4.7.2.0:1
main @ alameda.js?v=4.7.2.0:1
(anonymous) @ alameda.js?v=4.7.2.0:1
(anonymous) @ app.js?v=4.7.2.0:1
importFromPath @ app.js?v=4.7.2.0:1
loadHeader @ app.js?v=4.7.2.0:1
Promise.then (async)
start @ app.js?v=4.7.2.0:1
(anonymous) @ app.js?v=4.7.2.0:1
(anonymous) @ app.js?v=4.7.2.0:1
alameda.js?v=4.7.2.0:1 getJsUrlWithExtension: modules/scroller/smoothscroller.js?v=4.7.2.0
alameda.js?v=4.7.2.0:1 getJsUrlWithExtension: modules/actionsheet/actionsheet.js?v=4.7.2.0
index.html:1 
        
       Tracking Prevention blocked access to storage for https://www.gstatic.com/eureka/clank/102/cast_sender.js.
alameda.js?v=4.7.2.0:1 getJsUrlWithExtension: modules/imageloader/imageloader.js?v=4.7.2.0
alameda.js?v=4.7.2.0:1 getJsUrlWithExtension: modules/dialoghelper/dialoghelper.js?v=4.7.2.0
alameda.js?v=4.7.2.0:1 getJsUrlWithExtension: modules/lazyloader/lazyloader-intersectionobserver.js?v=4.7.2.0
chromecastplayer.js?v=4.7.2.0:1 chromecast.initialize
chromecastplayer.js?v=4.7.2.0:1 chromecast init success

The same issue occurs when using a mobile device, or trying to access the subdomain from a cellular connection (out of network). What is super weird, is that when using Emby Connect, I can login with my EC account, enter my subdomain (emby.mydomain.com) and then login with the local emby user account and access the libraries as expected.

 

Troubleshooting applied:

  • The emby applications are running normally;
  • the stated navdrawer.js file exists within the dashboard-ui/modules/navdrawer/navdrawer.js location as expected;
  • I re-installed the latest (4.7.2) server and the same issue occurs;
  • Windows Firewall is configured to allow the 3 emby applications through both public and private networks;
  • I have tried restarting the emby executables, restarting the embyserver through the dashboard, and rebooting the whole server machine multiple times;
  • This behaviour occurs in Chrome and Edge, on both Android10 and windows11 (latest updates for browsers and OSes);
  • I have tried enabling port forwarding through UniFi (8096 -> local.ip.add.ress:8096 and also 8920 -> local.ip.add.ress:8920)
  • I have followed the nginx configuration guide posted on the forums to ensure my reverse proxy complies with the advice given here.
Link to comment
Share on other sites

humor4fun

Clearing browser data, deleting cookies, in cognito, alternate browser, forced refresh (not using cache).... These do not work 

Link to comment
Share on other sites

That's odd. Seems to be working just fine from here. Are you using a reverse proxy?

 

Link to comment
Share on other sites

humor4fun

Yes I believe I said that.  I'll post my sites-available config shortly. Is there any special pathing that needs to be enabled for emby? I can't find a reason why that JavaScript file can't be served.

Link to comment
Share on other sites

humor4fun

contents of  /var/etc/nginx/sites-enabled/emby.mydomain.com (this file is linked from /sites-available)

#####################################################
#Emby Server Config
#http emby.mydomain.com
server {
    listen          80;
    server_name     emby.mydomain.com;
    rewrite ^/(.*)  https://emby.mydomain.com/$1 permanent;
  
}



#ssl emby.mydomain.com
server {
    listen          443 ssl http2;
    server_name		emby.mydomain.com;
  
    access_log     			/var/log/nginx/emby.mydomain.com_access.log combined;
    error_log     			/var/log/nginx/emby.mydomain.com_error.log error;
   	ssl_certificate			/etc/letsencrypt/live/emby.mydomain.com/fullchain.pem;
   	ssl_certificate_key 	/etc/letsencrypt/live/emby.mydomain.com/privkey.pem;
  	client_max_body_size    500m;
	
    ###### Security stuff
    ssl_session_timeout     30m;
    ssl_protocols           TLSv1.2 TLSv1.1 TLSv1;
    add_header              X-Xss-Protection "1; mode=block" always;
	add_header              X-Content-Type-Options "nosniff" always;
	add_header              Strict-Transport-Security "max-age=2592000; includeSubdomains" always;
	add_header              X-Frame-Options "SAMEORIGIN" always;
	proxy_hide_header       X-Powered-By;
	add_header              'Referrer-Policy' 'no-referrer';
	add_header              Content-Security-Policy "frame-ancestors mydomain.com emby.mydomain.com;";
    #######
    
    location /.well-known {
        root    /var/www/html/;
        client_max_body_size 1m;
    }
    
    location / {
      	# 8920 for 'emby' https
        # 8096 for 'emby' http
        proxy_pass		   http://192.168.1.33:8096;

        #proxy_redirect     off;
        proxy_set_header   Host              $http_host;
        proxy_set_header   X-Real-IP         $remote_addr;
        proxy_set_header   X-Forwarded-For   $proxy_add_x_forwarded_for;
        proxy_set_header   Range            $http_range;
		proxy_set_header   If-Range         $http_if_range;
        
        #websockets
        proxy_http_version 	1.1;
		proxy_set_header	Upgrade 		$http_upgrade;
		proxy_set_header 	Connection 		"upgrade";
    }
    
    location ~ /(na|error|none|swagger) {
        deny all;
        return 404;
    }
}

#####################################################

 

Link to comment
Share on other sites

humor4fun

SOLVED

 

I'm really not sure why this makes a difference, but it does. My safety "deny" block was not keying to the start of the path, so it the /na was matching /navdrawer and then that js file would be blocked.  

 

BROKEN:

    location ~ /(na|error|none|swagger) {
        deny all;
        return 404;
    }

 

FIXED:

    location ^~ /(na|error|none|swagger) {
        deny all;
        return 404;
    }

 

 

Edit: Future readers should reference this guide: 

 

Edited by humor4fun
  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...